// load.c
// Generated by decompiling load.exe
// using Reko decompiler version 0.6.2.0.

#include "load.h"

void fn0000000000401000()
{
	return;
}

void fn0000000000401010(Eq_n * r8)
{
	*globals->ptr404480 = 0x01;
	*globals->ptr404490 = 0x01;
	*globals->ptr4044A0 = 0x01;
	*globals->ptr404470 = 0x01;
	word32 edx_n = 0x00;
	struct Eq_n * rax_n = globals->ptr404330;
	if (rax_n->w0000 == 23117)
	{
		rcx = (int64) rax_n->dw003C;
		struct Eq_n * rax_n = rax_n + rcx / 0x0040;
		if (rax_n->dw0000 == 0x4550)
		{
			word32 ecx_n = (word32) rax_n->w0018;
			rcx = DPB(rcx, ecx_n, 0);
			word16 cx_n = (word16) ecx_n;
			if (cx_n != 0x010B)
			{
				if (cx_n == 0x020B && rax_n->dw0084 > 0x0E)
					edx_n = (word32) (rax_n->dw00F8 != 0x00);
			}
			else if (rax_n->dw0074 > 0x0E)
				edx_n = (word32) (r8->dw00E8 != 0x00);
		}
	}
	word32 * rax_n = globals->ptr404460;
	globals->dw407008 = edx_n;
	if (*rax_n != 0x00)
		__set_app_type(DPB(rcx, 0x02, 0));
	else
		__set_app_type(DPB(rcx, 0x01, 0));
	word64 rax_n = fn0000000000401BE0();
	*globals->ptr4043C0 = rax_n;
	*globals->ptr4043B0 = rax_n;
	**globals->ptr404360 = (word32 **) *globals->ptr404420;
	fn00000000004017D0();
	if (*globals->ptr4042E0 == 0x01)
	{
		fn0000000000401AC0(0x00401AD0);
		return;
	}
	else
		return;
}

void fn0000000000401160()
{
	globals->dw407000 = *globals->ptr404450;
	word64 rax_n = DPB(globals->qw404410, __getmainargs(&globals->dw407020, &globals->ptr407018, &globals->ptr407010, DPB(r9, globals->ptr407010, 0)), 0);
	return;
}

void fn00000000004011B0(Eq_n * r10, Eq_n * r11, word32 * r15, Eq_n * gs)
{
fn00000000004011B0_entry:
	struct Eq_n * rsp_n = fp - 0xB0
	word64 rax_n = DPB(rax, 0x00, 0)
	ptr64 rcx_n = DPB(rcx, 0x0D, 0)
	word64 * rdi_n = fp - 0x90
	goto l00000000004011CE
l00000000004011B0:
l00000000004011CE:
	branch rcx_n == 0x00 l00000000004011D1
l00000000004011CE_n:
	*rdi_n = rax_n
	rdi_n = rdi_n + 0x01
	rcx_n = rcx_n - 0x01
	goto l00000000004011CE
l00000000004011D1:
	word64 rdi_n = globals->ptr404460
	branch *r15 != 0x00 l0000000000401490
l00000000004011E4:
	word64 * rbx_n = globals->ptr404390
	word64 rsi_n = gs->ptr0030->qw0008
	word64 rbp_n = DPB(rbp, 0x00, 0)
	goto l0000000000401214
l0000000000401203:
	branch rsi_n == rbp_n l0000000000401431
l000000000040120C:
	byte SCZO_n
	word32 eax_n
	byte SZO_n
	byte C_n
	word32 ecx_n
	word64 rdx_n
	word64 rax_n
	word32 r9d_n
	word64 r15_n
	byte Z_n
	struct Eq_n * gs_n
	word32 ebp_n
	word64 r12_n
	word32 r8d_n
	word32 edx_n
	byte dl_n
	word16 ax_n
	word32 r13d_n
	word64 r13_n
	word32 ebx_n
	word64 r8_n
	r12d()
l0000000000401214:
	word64 rbp_n
	union Eq_n * rsi_n
	word32 ebp_n
	Eq_n eax_n
	__lock()
	__cmpxchg(*rbx_n, rsi_n, Mem67, out Mem95)
	branch rbp_n != 0x00 l0000000000401203
l0000000000401221:
	rsi_n = globals->ptr4043A0
	ebp_n = 0x00
	rbp_n = DPB(rbp_n, 0x00, 0)
	branch *rsi_n == 0x01 l0000000000401448
l0000000000401235:
	branch *rsi_n == 0x00 l00000000004014A0
l000000000040123F:
	globals->dw407004 = 0x01
l0000000000401249:
	eax_n = *rsi_n
	branch eax_n == 0x01 l000000000040145D
l0000000000401254:
	branch ebp_n == 0x00 l0000000000401480
l000000000040125C:
	word64 rax_n = *globals->ptr404320
	branch rax_n == 0x00 l0000000000401277
l000000000040126B:
	word64 rsi_n
	byte SCZO_n
	word32 eax_n
	byte SZO_n
	byte C_n
	word32 ecx_n
	word64 rdx_n
	word64 rcx_n
	word64 rax_n
	word32 r9d_n
	word64 r15_n
	byte Z_n
	struct Eq_n * gs_n
	word32 ebp_n
	word64 r12_n
	word32 r8d_n
	word32 edx_n
	word32 r12d_n
	byte dl_n
	word16 ax_n
	word32 r13d_n
	word64 r13_n
	word32 ebx_n
	word64 r8_n
	eax_n()
l0000000000401277:
	word64 rcx_n
	word64 rbp_n
	word64 rsi_n
	word64 rdi_n
	word64 r8_n
	word64 r10_n
	word64 r11_n
	word64 r12_n
	word64 r13_n
	struct Eq_n * r15_n
	struct Eq_n * rax_n = DPB(fn0000000000401DC0(rbp_n, rdi_n, r10, r11, out rcx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n), SetUnhandledExceptionFilter(rsp_n->t0004), 0)
	*globals->ptr404380 = (struct Eq_n **) rax_n
	fn0000000000402260(rax_n, rbx_n, rbp_n, rsi_n, rdi_n, r15_n)
	fn0000000000402CE0(0x00401000)
	fn0000000000401BC0()
	globals->qw407968 = globals->ptr404330
	byte * rax_n = **globals->ptr404350
	branch rax_n == null l0000000000401327
l00000000004012C9:
	ui32 ecx_n = 0x00
	goto l00000000004012E2
l00000000004012D0:
	branch dl_n == 0x00 || (ecx_n & 0x01) == 0x00 l0000000000401300
	goto l00000000004012D9
l00000000004012D4:
l00000000004012D9:
	ecx_n = 0x01
l00000000004012DE:
	rax_n = rax_n + 0x01
l00000000004012E2:
	ci8 dl_n = (byte) (word32) *rax_n
	branch dl_n <= 0x20 l00000000004012D0
l00000000004012EA:
	ui32 r8d_n = ecx_n ^ 0x01
	branch dl_n != 0x22 l00000000004012F8
l00000000004012F4_n:
	ecx_n = r8d_n
l00000000004012F8:
	goto l00000000004012DE
l0000000000401300:
	branch dl_n != 0x00 l0000000000401315
	goto l0000000000401320
l0000000000401310:
l0000000000401315:
	struct Eq_n * rax_n = rax_n + 0x01
	branch (byte) (word32) rax_n->b0000 != 0x00 l0000000000401310
	rax_n = (byte *) &rax_n->b0001
	ci8 dl_n = (byte) (word32) rax_n->b0001
	branch dl_n != 0x00 && dl_n <= 0x20 l0000000000401310
l0000000000401320:
	globals->ptr407960 = rax_n
	globals->ptr407960 = rax_n
	globals->ptr407960 = rax_n
l0000000000401327:
	word32 r8d_n = r15_n->dw0000
	branch r8d_n == 0x00 l0000000000401348
l000000000040132F:
	word16 ax_n = 0x0A
	branch (rsp_n->b005C & 0x01) == 0x00 l000000000040133F
l0000000000401339_n:
	ax_n = rsp_n->w0060
l000000000040133F:
	globals->dw403000 = (word32) ax_n
l0000000000401348:
	int64 r13_n
	int32 r12d_n = globals->dw407020
	word64 r12_n = DPB(r12_n, r12d_n, 0)
	int64 r13_n = (int64) (r12_n + 0x01)
	Eq_n (* rcx_n)[] = r13_n << 0x03
	Eq_n rax_n[] = malloc(r13_n << 0x03)
	branch r12d_n <= 0x00 l00000000004014BE
l0000000000401376:
	word64 * rbx_n = DPB(rbx_n, 0x00, 0)
	rax_n = rax_n
l0000000000401380:
	Eq_n (* rax_n)[]
	void * rax_n = DPB(rax_n, strlen(rsp_n->ptr0000), 0)
	rax_n = malloc(rax_n + 0x01)
	rax_n[rbx_n] = rax_n
	memcpy(rsp_n->ptr0000, rsp_n->t0008, rsp_n->t0010)
	rbx_n = rbx_n + 0x01
	r8d_n = (word32) (rax_n + 0x01) (alias)
	rcx_n = rax_n
	branch r12d_n > (word32) rbx_n l0000000000401380
l00000000004013B2:
	r13_n = (r13_n << 0x03) - 0x08
l00000000004013B6:
	rax_n[r13_n / 0x08] = 0x00
	globals->ptr407018 = rax_n
	fn00000000004017A0(r8d_n)
	word64 * rax_n = *globals->ptr404340
	*rax_n = globals->ptr407010
	word64 r8_n = globals->ptr407010
	word32 r8d_n = (word32) r8_n
	word64 rdx_n = globals->ptr407018
	fn00000000004015B0(rdx_n, r8d_n, dwArg0C, qwArg14)
	word32 eax_n = (word32) rax_n
	word32 ecx_n = globals->dw407008
	globals->dw40700C = eax_n
	branch ecx_n == 0x00 l00000000004014C6
l000000000040140C:
	word32 edx_n = globals->dw407004
	branch edx_n != 0x00 l0000000000401421
l0000000000401416:
	word64 rsp_n
	word64 rbp_n
	word64 rdi_n
	word64 rsi_n
	word64 rbx_n
	byte SCZO_n
	word32 eax_n
	byte SZO_n
	byte C_n
	word32 ecx_n
	word64 rdx_n
	word64 rcx_n
	word64 rax_n
	word32 r9d_n
	word64 r15_n
	byte Z_n
	struct Eq_n * gs_n
	word32 ebp_n
	word64 r12_n
	word32 r8d_n
	word32 edx_n
	word32 r12d_n
	byte dl_n
	word16 ax_n
	word32 r13d_n
	word64 r13_n
	word32 ebx_n
	word64 r8_n
	word64 r10_n
	word64 r11_n
	cexit()
l0000000000401421:
	return
l0000000000401431:
	rsi_n = globals->ptr4043A0
	ebp_n = 0x01
	rbp_n = DPB(rbp_n, 0x01, 0)
	branch *rsi_n != 0x01 l0000000000401235
l0000000000401448:
	_amsg_exit(DPB(rcx_n, 0x1F, 0))
	branch *rsi_n != 0x01 l0000000000401254
	_amsg_exit(DPB(rcx_n, 0x1F, 0))
	eax_n = *rsi_n
	branch eax_n != 0x01 l0000000000401254
l000000000040145D:
	_initterm(globals->ptr4043D0, globals->ptr4043E0)
	*rsi_n = (union Eq_n *) 0x02
	branch ebp_n != 0x00 l000000000040125C
	_initterm(globals->ptr4043D0, globals->ptr4043E0)
	*rsi_n = (union Eq_n *) 0x02
	branch ebp_n != 0x00 l000000000040125C
l0000000000401480:
	*rbx_n = DPB(rbp_n, 0x00, 0)
	eax_n.u0 = 0x00
	goto l000000000040125C
l0000000000401490:
	GetStartupInfoA(tLocAC)
	rcx_n = fp - 0x90
	goto l00000000004011E4
l00000000004014A0:
	PVFV * rdx_n = globals->ptr404400
	PVFV * rcx_n = globals->ptr4043F0
	*rsi_n = (union Eq_n *) 0x01
	_initterm(rcx_n, rdx_n)
	goto l0000000000401249
l00000000004014BE:
	r13_n = DPB(r13_n << 0x03, 0x00, 0)
	goto l00000000004013B6
l00000000004014C6:
	exit(DPB(rcx_n, eax_n, 0))
fn00000000004011B0_exit:
}

void fn00000000004014D0(ui64 rdx, Eq_n * r11, word32 * r15, Eq_n * gs)
{
	word32 * rax_n = globals->ptr404460;
	*rax_n = 0x01;
	struct Eq_n * r10_n;
	fn00000000004017E0(rax_n, rdx, qwLoc2C, qwLoc24, out r10_n);
	fn00000000004011B0(r10_n, r11, r15, gs);
	return;
}

Eq_n Win32CrtStartup()
{
	word32 * rax_n = globals->ptr404460;
	*rax_n = 0x00;
	struct Eq_n * r10_n;
	Eq_n rax_n = fn00000000004017E0(rax_n, rdx, qwLoc2C, qwLoc24, out r10_n);
	fn00000000004011B0(r10_n, r11, r15, gs);
	return rax_n;
}

void fn0000000000401530()
{
	return;
}

void fn0000000000401540()
{
	if (globals->qw4030A0 != 0x00)
	{
		Eq_n eax_n = GetModuleHandleA(tLoc20);
		word64 rax_n = DPB(rax, eax_n, 0);
		if (rax_n != 0x00)
		{
			if (DPB(rax, GetProcAddress(tLoc20, tLoc18), 0) == 0x00)
				goto l0000000000401582;
		}
		word64 rsp_n;
		word64 rbp_n;
		byte SCZO_n;
		byte Z_n;
		word64 rcx_n;
		word32 eax_n;
		word64 rax_n;
		byte SZO_n;
		byte C_n;
		word64 rdx_n;
		eax_n();
	}
l0000000000401582:
	fn00000000004016D0();
	return;
}

void fn00000000004015A0()
{
	return;
}

void fn00000000004015B0(word64 rdx, word32 r8d, word32 dwArg0C, word64 qwArg14)
{
	fn00000000004017A0(r8d);
	word64 rax_n = globals->qw40826C;
	Eq_n eax_n = (word32) rax_n;
	word64 rsp_n;
	word64 rbp_n;
	byte SCZO_n;
	word32 ecx_n;
	word64 rdx_n;
	word64 rax_n;
	word64 rcx_n;
	word32 eax_n;
	word32 r8d_n;
	eax_n();
}

word64 fn0000000000401620()
{
	word64 rax_n = fn0000000000401BD0();
	if (rax_n == ~0x00)
	{
		union Eq_n * rax_n = globals->ptr404370;
		word64 rsp_n;
		word64 rbx_n;
		byte SCZO_n;
		word64 rcx_n;
		word64 rax_n;
		byte Z_n;
		word32 ecx_n;
		word64 rdx_n;
		word64 r8_n;
		(*rax_n)();
		return rax_n;
	}
	else
	{
		word64 rsp_n;
		word64 rbx_n;
		byte SCZO_n;
		word64 rcx_n;
		word64 rax_n;
		byte Z_n;
		word32 ecx_n;
		word64 rdx_n;
		word64 r8_n;
		lock();
		fn0000000000401BD0();
		word64 rax_n = fn0000000000401BD0();
		word64 rsp_n;
		word64 rbx_n;
		byte SCZO_n;
		word64 rcx_n;
		word64 rax_n;
		byte Z_n;
		word32 ecx_n;
		word64 rdx_n;
		word64 r8_n;
		_dllonexit();
		globals->qw407970 = fn0000000000401BE0();
		word64 rax_n = fn0000000000401BE0();
		globals->qw407978 = rax_n;
		word64 rsp_n;
		word64 rbx_n;
		byte SCZO_n;
		word64 rcx_n;
		word64 rax_n;
		byte Z_n;
		word32 ecx_n;
		word64 rdx_n;
		word64 r8_n;
		unlock();
		return rbx_n;
	}
}

void fn00000000004016D0()
{
	fn0000000000401620();
	return;
}

void fn00000000004016F0()
{
	word64 rax_n = *globals->ptr403010;
	if (rax_n != 0x00)
	{
		do
		{
			word64 rsp_n;
			byte SCZO_n;
			word64 rax_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			word32 eax_n;
			word64 rdx_n;
			eax();
			struct Eq_n * rax_n = globals->ptr403010;
			word64 rax_n = rax_n->qw0008;
			globals->ptr403010 = (word64 *) &rax_n->qw0008;
		} while (rax_n != 0x00);
	}
	return;
}

void fn0000000000401730(word32 r8d, word64 qwArg00)
{
	ui64 rcx_n[] = globals->ptr4042F0;
	ui64 rdx_n = rcx_n[0x00];
	Eq_n edx_n = (word32) rdx_n;
	Eq_n eax_n = edx_n;
	if (edx_n == ~0x00)
	{
		eax_n.u1 = 0x00;
		while (true)
		{
			Eq_n r8d_n = r8 + 0x01;
			r8 = DPB(r8, r8d_n, 0);
			rdx_n = r8;
			if (rcx_n[r8] == 0x00)
				break;
			eax_n = r8d_n;
		}
	}
	if (eax_n != 0x00)
	{
		union Eq_n * rbx_n = rcx_n + DPB(rdx_n, eax_n, 0);
		do
		{
			word64 rsp_n;
			word64 rsi_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rcx_n;
			word64 rdx_n;
			word32 edx_n;
			word32 eax_n;
			byte Z_n;
			byte SZO_n;
			byte C_n;
			word64 rax_n;
			word64 r8_n;
			word32 r8d_n;
			(*rbx_n)();
		} while (rbx_n - 0x08 != rsi_n);
	}
	fn00000000004016D0();
	return;
}

void fn00000000004017A0(word32 r8d)
{
	if (globals->dw407030 == 0x00)
	{
		globals->dw407030 = 0x01;
		fn0000000000401730(r8d, qwLoc08);
		return;
	}
	else
		return;
}

void fn00000000004017C0()
{
fn00000000004017C0_entry:
fn00000000004017C0_exit:
}

void fn00000000004017D0()
{
	return;
}

word32 * fn00000000004017E0(word32 * rax, ui64 rdx, word64 qwArg04, word64 qwArg0C, ptr64 & r10Out)
{
	*r10Out = r10;
	word32 * rbx_n = globals->ptr403080;
	if (rbx_n == rax)
	{
		GetSystemTimeAsFileTime(tLoc50);
		Eq_n eax_n = GetCurrentProcessId();
		Eq_n eax_n = GetCurrentThreadId();
		Eq_n eax_n = GetTickCount();
		QueryPerformanceCounter(tLoc50);
		ui64 rax_n = DPB(rax, eax_n, 0) ^ (qwLoc24 ^ 0x00);
		word64 r10_n;
		*r10Out = 0xFFFFFFFF;
		word32 * rax_n = (DPB(rax_n, eax_n, 0) ^ (DPB(qwLoc24 ^ 0x00, eax_n, 0) ^ rax_n)) & rdx;
		if (rax_n != rbx_n)
			rdx = ~rax_n;
		else
		{
			word64 r10_n;
			*r10Out = 3525336524;
		}
		globals->ptr403080 = rax_n;
		globals->qw403090 = rdx;
		return rax_n;
	}
	else
	{
		globals->qw403090 = ~rbx_n;
		return rax;
	}
}

void fn00000000004018C0(word64 rcx, word64 qwArg0C)
{
	RtlCaptureContext(tLoc78);
	Eq_n rbx_n = globals->t407158;
	word64 rsi_n = rcx;
	if (RtlLookupFunctionEntry(rbx_n, fp - 0x34, DPB(r8, 0x00, 0)) != null)
	{
		word64 rsp_n;
		word64 rbp_n;
		word64 rbx_n;
		byte SCZO_n;
		word64 rcx_n;
		word32 r8d_n;
		byte SZO_n;
		byte C_n;
		word64 rdx_n;
		word64 rax_n;
		word64 r8_n;
		word64 r9_n;
		byte Z_n;
		word32 ecx_n;
		word32 eax_n;
		word32 edx_n;
		KERNEL32.dll!RtlVirtualUnwind();
l0000000000401933:
		word64 rax_n = globals->t407158;
		globals->qw4070E0 = rsi_n;
		globals->dw407540 = 0xC0000409;
		globals->dw407544 = 0x01;
		globals->qw407550 = rax_n;
		SetUnhandledExceptionFilter(tLoc78);
		UnhandledExceptionFilter(tLoc78);
		GetCurrentProcess();
		TerminateProcess(tLoc78, tLoc70);
		abort();
	}
	globals->t407158 = qwArg0C;
	globals->ptr4070F8 = fp - 0x04;
	goto l0000000000401933;
}

void fn00000000004019C0(uint32 edx, word32 ebx)
{
	if (edx == 0x03 || edx == 0x00)
	{
		fn00000000004026C0(edx, ebx);
		return;
	}
	else
		return;
}

void fn00000000004019F0(uint32 edx, word32 ebx, word64 qwArg00)
{
	word32 * rax_n = globals->ptr4042D0;
	Eq_n eax_n = (word32) rax_n;
	if (*rax_n != 0x02)
		*rax_n = 0x02;
	if (edx != 0x02)
	{
		if (edx == 0x01)
			fn00000000004026C0(edx, ebx);
	}
	else
	{
		word64 * rbx_n = &globals->qw409060;
		word64 * rsi_n = &globals->qw409060;
		if (0x00409060 != 0x00409060)
		{
			do
			{
				word64 rax_n = *rbx_n;
				if (rax_n != 0x00)
				{
					word64 rsp_n;
					byte SCZO_n;
					word64 rax_n;
					byte Z_n;
					word32 edx_n;
					byte SZO_n;
					byte C_n;
					word32 ebx_n;
					eax_n();
				}
				rbx_n = rbx_n + 0x01;
			} while (rsi_n != rbx_n);
			return;
		}
	}
	return;
}

void fn0000000000401A60()
{
	return;
}

void fn0000000000401A70()
{
	if (globals->qw407600 == 0x00)
		return;
}

void fn0000000000401AC0(ptr64 rcx)
{
	globals->qw407600 = rcx;
	word64 rsp_n;
	word64 rcx_n;
	globals->u408314();
	return;
}

void fn0000000000401AD0()
{
fn0000000000401AD0_entry:
l0000000000401AD0:
fn0000000000401AD0_exit:
}

void fn0000000000401BC0()
{
fn0000000000401BC0_entry:
l0000000000401BC0:
fn0000000000401BC0_exit:
}

word64 fn0000000000401BD0()
{
	return rcx;
}

word64 fn0000000000401BE0()
{
	return rcx;
}

word64 fn0000000000401BF0(Eq_n * rbp, Eq_n * r8, Eq_n * r10, word64 qwArg18, word64 qwArg20, word64 qwArg28, Eq_n * & rcxOut, Eq_n & rbxOut, Eq_n * & rbpOut, ptr64 & rsiOut, ptr64 & rdiOut, Eq_n * & r8Out, ptr64 & r10Out, ptr64 & r11Out, ptr64 & r12Out, ptr64 & r13Out, ptr64 & r15Out)
{
	word64 rsp_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rax_n;
	word64 rcx_n;
	word64 rdx_n;
	word64 r8_n;
	word64 r9_n;
	word32 eax_n;
	word32 edx_n;
	word64 rbp_n;
	word64 r10_n;
	word64 rdi_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	_iob_func();
	word64 rsp_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rax_n;
	word64 rcx_n;
	word64 rdx_n;
	word64 r8_n;
	word64 r9_n;
	word32 eax_n;
	word32 edx_n;
	word64 rbp_n;
	word64 r10_n;
	word64 rdi_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	msvcrt.dll!fwrite();
	word64 rsp_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rax_n;
	word64 rcx_n;
	word64 rdx_n;
	word64 r8_n;
	word64 r9_n;
	word32 eax_n;
	word32 edx_n;
	word64 rbp_n;
	word64 r10_n;
	word64 rdi_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	_iob_func();
	word64 rsp_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rax_n;
	struct Eq_n * rcx_n;
	word64 rdx_n;
	struct Eq_n * r8_n;
	word64 r9_n;
	word32 eax_n;
	word32 edx_n;
	struct Eq_n * rbp_n;
	struct Eq_n * r10_n;
	word64 rdi_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	msvcrt.dll!vfprintf();
	abort();
	word64 rcx_n;
	word64 rbx_n;
	word64 rbp_n;
	word64 rsi_n;
	word64 rdi_n;
	word64 r8_n;
	word64 r10_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	return fn0000000000401C60(rcx_n, rbp_n, r8_n, r10_n, qwLoc50, qwLoc48, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n);
}

word64 fn0000000000401C60(Eq_n * rcx, Eq_n * rbp, Eq_n * r8, Eq_n * r10, word64 qwArg00, word64 qwArg08, ptr64 & rcxOut, Eq_n * & rbxOut, Eq_n * & rbpOut, ptr64 & rsiOut, ptr64 & rdiOut, Eq_n * & r8Out, ptr64 & r10Out, ptr64 & r11Out, Eq_n & r12Out, ptr64 & r13Out, ptr64 & r15Out)
{
	int32 ebx_n;
	int32 ecx_n = globals->dw407624;
	struct Eq_n * rbp_n = r8;
	if (ecx_n > 0x00)
	{
		ebx_n = 0x00;
		struct Eq_n * rax_n = globals->qw407628 + 0x08;
		r8_n = r8;
		do
		{
			struct Eq_n * r8_n;
			rdx = rax_n->qw0000;
			if (rcx >= rdx)
			{
				struct Eq_n * r8_n = r8_n->ptr0008;
				r8_n = (struct Eq_n *) DPB(r8_n, r8_n->dw0008, 0);
				rdx = rdx + r8_n;
				if (rcx < rdx)
					goto l0000000000401D5E;
			}
			ebx_n = ebx_n + 0x01;
			rax_n = rax_n + 0x01;
		} while (ebx_n != ecx_n);
	}
	else
		ebx_n = 0x00;
	struct Eq_n * r8_n;
	struct Eq_n * rax_n = fn00000000004028C0(rcx, r10, out r8_n);
	if (rax_n != null)
	{
		r8->ptr0010 = rax_n;
		r8->qw0000 = (word64) 0x00;
		struct Eq_n * r8_n;
		r8->ptr0008 = DPB(fn0000000000402A10(rax_n, out r8_n), 0x30, 0) + DPB(rdx, rax_n->dw000C, 0);
		word64 rax_n = globals->qw407628;
		int64 rbx_n = (int64) ebx_n * 0x18;
		if (DPB(rax_n, VirtualQuery(tLoc6C, tLoc64, tLoc5C), 0) != 0x00)
		{
			if ((DPB(rax_n, dwLoc2C, 0) - 0x40 & ~0x40) == 0x00 || ((dwLoc2C - 0x04 & ~0x04) == 0x00 || VirtualProtect(tLoc6C, tLoc64, tLoc5C, tLoc54) != 0x00))
			{
				globals->dw407624 = globals->dw407624 + 0x01;
l0000000000401D5E:
				word64 rsp_n;
				word64 rbp_n;
				word64 rdi_n;
				word64 rsi_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rcx_n;
				word32 ecx_n;
				word64 rdx_n;
				word64 r8_n;
				byte SZO_n;
				byte C_n;
				word64 rax_n;
				word32 ebx_n;
				word32 r8d_n;
				byte Z_n;
				word64 r12_n;
				word64 r13_n;
				word32 edx_n;
				word32 eax_n;
				word64 r9_n;
				word64 r10_n;
				word64 r11_n;
				word64 r15_n;
				globals->u408394();
				return rax_n;
			}
			GetLastError();
			word64 rcx_n;
			word64 rsi_n;
			word64 rdi_n;
			word64 r8_n;
			word64 r11_n;
			word64 r12_n;
			word64 r13_n;
			word64 r15_n;
			fn0000000000401BF0(r8, r8_n, r10, qwLoc60, qwLoc58, qwLoc50, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
		}
		word64 rcx_n;
		word64 rbx_n;
		word64 rsi_n;
		word64 rdi_n;
		word64 r11_n;
		word64 r12_n;
		word64 r13_n;
		word64 r15_n;
		fn0000000000401BF0(rbp_n, (&globals->qw407628->a0008->ptr0000)[rbx_n / 0x08], r10, qwArg10, qwArg18, qwArg20, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
	}
	word64 rcx_n;
	word64 rbx_n;
	word64 rbp_n;
	word64 rsi_n;
	word64 rdi_n;
	word64 r8_n;
	struct Eq_n * r10_n;
	struct Eq_n * r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	fn0000000000401BF0(rbp_n, r8_n, r10, qwArg10, qwArg18, qwArg20, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n);
	word64 rcx_n;
	word64 rbp_n;
	word64 rsi_n;
	word64 rdi_n;
	word64 r8_n;
	word64 r10_n;
	word64 r11_n;
	word64 r12_n;
	word64 r13_n;
	word64 r15_n;
	return fn0000000000401DC0(rbp_n, rdi_n, r10_n, r11_n, out rcx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n);
}

Eq_n * fn0000000000401DC0(word64 rbp, word64 rdi, Eq_n * r10, Eq_n * r11, ptr64 & rcxOut, ptr64 & rbpOut, ptr64 & rsiOut, ptr64 & rdiOut, ptr64 & r8Out, ptr64 & r10Out, ptr64 & r11Out, ptr64 & r12Out, ptr64 & r13Out, ptr64 & r15Out)
{
	*r10Out = r10;
	*r8Out = r8;
	*rcxOut = rcx;
	*r15Out = r15;
	*r13Out = r13;
	*r11Out = r11;
	*r12Out = r12;
	struct Eq_n * rbp_n = fp - 0x08;
	int32 esi_n = globals->dw407620;
	if (esi_n != 0x00)
	{
l0000000000401DE2:
		struct Eq_n * rsp_n = rbp_n->qw0000;
		word64 rsi_n;
		*rsiOut = rsp_n->qw0010;
		word64 rdi_n;
		*rdiOut = rsp_n->qw0018;
		word64 rbp_n;
		*rbpOut = rsp_n->qw0020;
		return rax;
	}
	globals->dw407620 = 0x01;
	uint64 r8_n;
	Eq_n rax_n = DPB(rax, (int16) fn0000000000402950(out r8_n), 0) * 0x03 * 0x08;
	struct Eq_n * r8_n;
	word64 rcx_n = fn0000000000402BC0(rax_n & ~0x0F, r8_n, qwLoc90, out r8_n);
	*rcxOut = rcx_n;
	struct Eq_n * r12_n = globals->ptr404300;
	*r12Out = r12_n;
	struct Eq_n * rbx_n = globals->ptr404310;
	globals->dw407624 = 0x00;
	globals->qw407628 = fp - 0x88 - (rax_n & ~0x0F) + 0x20;
	rax = r12_n - rbx_n;
	if (rax <= (struct Eq_n *) 0x07)
		goto l0000000000401DE2;
	if (rax <= (struct Eq_n *) 11)
	{
l0000000000401E80:
		word32 r8d_n = r11->dw0000;
		*r8Out = DPB(r8_n, r8d_n, 0);
		if (r8d_n == 0x00)
		{
			word32 ecx_n = rbx_n->dw0004;
			*rcxOut = DPB(rcx_n, ecx_n, 0);
			if (ecx_n == 0x00)
			{
l0000000000401E97:
				if (rbx_n->t0008 != 0x01)
				{
l00000000004020A9:
					uint32 * rcx_n;
					word64 rbx_n;
					word64 rbp_n;
					word64 rsi_n;
					word64 rdi_n;
					word64 r8_n;
					word64 r10_n;
					word64 r11_n;
					word64 r12_n;
					word64 r13_n;
					word64 r15_n;
					Eq_n rax_n = fn0000000000401BF0(rbp_n, r8_n, r10, qwArg10, qwArg18, qwArg20, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n);
					uint32 eax_n = *rcx_n;
					struct Eq_n * rax_n = DPB(rax_n, eax_n, 0);
					if (eax_n > 0xC0000091)
					{
						word64 rcx_n;
						return fn0000000000402130(rax_n, out rcx_n);
					}
					else
					{
						word64 rcx_n;
						return fn00000000004020CD(rax_n, out rcx_n);
					}
				}
				struct Eq_n * rbx_n = rbx_n + 0x01;
				rbx_n = rbx_n + 0x0C;
				if (rbx_n + 0x0C >=u r12_n)
					goto l0000000000401DE2;
				ptr64 r13_n = globals->ptr404330;
				r13_n = r13_n;
l0000000000401EC5:
				word64 rbx_n;
				struct Eq_n * r12_n;
				ptr64 r13_n;
				uint32 edx_n = (word32) rbx_n->t0008;
				Eq_n rax_n = DPB(rax, rbx_n->dw0000, 0) + r13_n / 0x0C;
				struct Eq_n * rcx_n = DPB(rcx_n, rbx_n->dw0004, 0) + r13_n;
				struct Eq_n * r8_n = r8_n->qw0000;
				if (edx_n != 0x10)
				{
					if (edx_n > 0x10)
					{
						if (edx_n == 0x20)
							goto l000000000040205D;
						if (edx_n == 0x40)
						{
							word64 r8_n = r8_n + (Mem179[rcx_n + 0x00:word64] - rax_n);
							*(r13_n - 0x50) = (struct Eq_n **) r8_n;
							word64 rsi_n;
							word64 rdi_n;
							word64 r11_n;
							word64 r15_n;
							rax = fn0000000000401C60(rcx_n, rbp_n, r8_n, r10, qwLoc08, qwArg00, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
							goto l0000000000401F16;
						}
l0000000000402049:
						*(rbp_n - 0x50) = 0x00;
						word64 rbx_n;
						word64 rsi_n;
						word64 rdi_n;
						word64 r10_n;
						word64 r11_n;
						word64 r12_n;
						word64 r15_n;
						rax_n = fn0000000000401BF0(rbp_n, r8_n, r10, qwArg10, qwArg18, qwArg20, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10_n, out r11_n, out r12_n, out r13_n, out r15_n);
l000000000040205D:
						Eq_n edx_n = rcx_n->t0000;
						struct Eq_n * rdx_n = DPB(rdx, edx_n, 0);
						struct Eq_n * r8_n = r8_n + (rdx_n - rax_n) / 0x0C;
						*(r13_n - 0x50) = (struct Eq_n **) r8_n;
						word64 rsi_n;
						word64 rdi_n;
						word64 r11_n;
						word64 r15_n;
						rax = fn0000000000401C60(rcx_n, rbp_n, r8_n, rdx_n, qwLoc08, qwArg00, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
						goto l0000000000401F16;
					}
					if (edx_n != 0x08)
						goto l0000000000402049;
					ui64 rdx_n;
					word32 edx_n = (word32) rcx_n->t0000;
					ui64 rdx_n = DPB(rdx, edx_n, 0);
					rdx_n = rdx_n;
					if ((byte) edx_n < 0x00)
						rdx_n = rdx_n | -0x0100;
					struct Eq_n * r8_n = r8_n + (rdx_n - rax_n) / 0x0C;
					*(r13_n - 0x50) = (struct Eq_n **) r8_n;
					word64 rsi_n;
					word64 rdi_n;
					word64 r11_n;
					word64 r15_n;
					rax = fn0000000000401C60(rcx_n, rbp_n, r8_n, rdx_n | -0x0100, qwLoc08, qwArg00, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
				}
				else
				{
					ui64 rdx_n;
					word32 edx_n = (word32) rcx_n->t0000;
					ui64 rdx_n = DPB(rdx, edx_n, 0);
					rdx_n = rdx_n;
					if ((word16) edx_n < 0x00)
						rdx_n = rdx_n | -0x00010000;
					struct Eq_n * r8_n = r8_n + (rdx_n - rax_n) / 0x0C;
					*(r13_n - 0x50) = (struct Eq_n **) r8_n;
					word64 rsi_n;
					word64 rdi_n;
					word64 r11_n;
					word64 r15_n;
					rax = fn0000000000401C60(rcx_n, rbp_n, r8_n, rdx_n | -0x00010000, qwLoc08, qwArg00, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
				}
l0000000000401F16:
				rdx = r13_n - 0x50;
				rbx_n = rbx_n + 0x0C;
				if (rbx_n < r12_n)
					goto l0000000000401EC5;
				goto l0000000000401F20;
			}
		}
		goto l0000000000401FA0;
	}
	else
	{
		word32 r11d_n = r11->dw0000;
		r11 = DPB(r11, r11d_n, 0);
		*r11Out = r11;
		if (r11d_n == 0x00)
		{
			word32 r10d_n = r11->dw0004;
			r10 = DPB(r10, r10d_n, 0);
			*r10Out = r10;
			if (r10d_n == 0x00)
			{
				if (r11->dw0008 != 0x00)
					goto l0000000000401E97;
				rbx_n = rbx_n + 0x01;
				goto l0000000000401E80;
			}
		}
l0000000000401FA0:
		if (rbx_n >= r12_n)
			goto l0000000000401DE2;
		word64 r13_n = globals->ptr404330;
		do
		{
			struct Eq_n * rcx_n = DPB(rcx_n, rbx_n->dw0004, 0) + r13_n;
			*(rbp_n - 0x50) = (word32) rcx_n->t0000;
			word64 rsi_n;
			word64 rdi_n;
			word64 r11_n;
			struct Eq_n * r12_n;
			word64 r15_n;
			rax = fn0000000000401C60(rcx_n, rbp_n, r8_n, r10, qwLoc08, qwArg00, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
		} while (rbx_n < r12_n);
l0000000000401F20:
		int32 eax_n = globals->dw407624;
		rax = DPB(rax, eax_n, 0);
		struct Eq_n * rbx_n = DPB(rbx_n, 0x00, 0);
		if (eax_n > 0x00)
		{
			word64 r12_n = globals->qw4082CC;
			*r12Out = r12_n;
			Eq_n r12d_n = (word32) r12_n;
			word64 r13_n;
			*r13Out = globals->qw4082C4;
			do
			{
				rax = (struct Eq_n *) (rbx_n + globals->qw407628 / 0x0C);
				word32 edx_n = rax->dw0000;
				if (edx_n != 0x00)
				{
					word64 rsp_n;
					word64 rbp_n;
					word64 rdi_n;
					word64 rsi_n;
					word64 rbx_n;
					byte SCZO_n;
					word32 esi_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					word16 ax_n;
					byte al_n;
					word64 rax_n;
					word64 r12_n;
					word32 r11d_n;
					word64 r11_n;
					word32 r10d_n;
					word32 r9d_n;
					word32 edx_n;
					word64 r13_n;
					word64 r14_n;
					word64 r15_n;
					word32 ecx_n;
					word32 eax_n;
					word64 rcx_n;
					word64 r8_n;
					byte CZ_n;
					word64 rdx_n;
					word32 ebx_n;
					Eq_n r12d_n;
					word64 r9_n;
					word32 r8d_n;
					word32 r13d_n;
					byte SO_n;
					word64 r10_n;
					byte S_n;
					byte dl_n;
					word16 dx_n;
					r12d_n();
					word64 rsp_n;
					struct Eq_n * rbp_n;
					word64 rdi_n;
					word64 rsi_n;
					word64 rbx_n;
					byte SCZO_n;
					word32 esi_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					word16 ax_n;
					byte al_n;
					word64 rax_n;
					word64 r12_n;
					word32 r11d_n;
					struct Eq_n * r11_n;
					word32 r10d_n;
					word32 r9d_n;
					word32 edx_n;
					word64 r13_n;
					word64 r14_n;
					word64 r15_n;
					word32 ecx_n;
					word32 eax_n;
					word64 rcx_n;
					word64 r8_n;
					byte CZ_n;
					word64 rdx_n;
					word32 ebx_n;
					word32 r12d_n;
					word64 r9_n;
					word32 r8d_n;
					Eq_n r13d_n;
					byte SO_n;
					struct Eq_n * r10_n;
					byte S_n;
					byte dl_n;
					word16 dx_n;
					r12d_n();
					if (rax_n == 0x00)
					{
						word64 rcx_n;
						word64 rbx_n;
						word64 rsi_n;
						word64 rdi_n;
						word64 r11_n;
						word64 r12_n;
						word64 r13_n;
						word64 r15_n;
						fn0000000000401BF0(rbp_n, r11_n->ptr0008, r10_n, qwArg10, qwArg18, qwArg20, out rcx_n, out rbx_n, out rbp_n, out rsi_n, out rdi_n, out r8_n, out r10, out r11_n, out r12_n, out r13_n, out r15_n);
						goto l00000000004020A9;
					}
					word64 rsp_n;
					word64 rbp_n;
					word64 rdi_n;
					word64 rsi_n;
					word64 rbx_n;
					byte SCZO_n;
					word32 esi_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					word16 ax_n;
					byte al_n;
					word64 rax_n;
					word64 r12_n;
					word32 r11d_n;
					word64 r11_n;
					word32 r10d_n;
					word32 r9d_n;
					word32 edx_n;
					word64 r13_n;
					word64 r14_n;
					word64 r15_n;
					word32 ecx_n;
					word32 eax_n;
					word64 rcx_n;
					word64 r8_n;
					byte CZ_n;
					word64 rdx_n;
					word32 ebx_n;
					word32 r12d_n;
					word64 r9_n;
					word32 r8d_n;
					Eq_n r13d_n;
					byte SO_n;
					word64 r10_n;
					byte S_n;
					byte dl_n;
					word16 dx_n;
					r13d_n();
					word64 rsp_n;
					word64 rdi_n;
					word64 rsi_n;
					byte SCZO_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					word16 ax_n;
					byte al_n;
					word64 r12_n;
					word32 r11d_n;
					word64 r11_n;
					word32 r10d_n;
					word32 r9d_n;
					word32 edx_n;
					word64 r13_n;
					word64 r14_n;
					word64 r15_n;
					word32 ecx_n;
					word32 eax_n;
					word64 rcx_n;
					word64 r8_n;
					byte CZ_n;
					word64 rdx_n;
					word32 ebx_n;
					word64 r9_n;
					word32 r8d_n;
					word32 r13d_n;
					byte SO_n;
					word64 r10_n;
					byte S_n;
					byte dl_n;
					word16 dx_n;
					r13d_n();
				}
				esi_n = esi_n + 0x01;
				rbx_n = rbx_n + 0x02;
			} while (esi_n >= globals->dw407624);
		}
		goto l0000000000401DE2;
	}
}

void fn00000000004020C0(uint32 * rcx)
{
	uint32 eax_n = *rcx;
	struct Eq_n * rax_n = DPB(rax, eax_n, 0);
	if (eax_n > 0xC0000091)
	{
		word64 rcx_n;
		fn0000000000402130(rax_n, out rcx_n);
		return;
	}
	else
	{
		word64 rcx_n;
		struct Eq_n * rax_n = fn00000000004020CD(rax_n, out rcx_n);
		return;
	}
}

Eq_n * fn00000000004020CD(Eq_n * rax, ptr64 & rcxOut)
{
	if (eax >= 0xC000008D)
	{
		word64 rcx_n;
		return fn0000000000402130(rax, out rcx_n);
	}
	else if (eax == 0xC0000008)
	{
		word64 rcx_n;
		return fn0000000000402130(rax, out rcx_n);
	}
	else if (eax > 0xC0000008)
	{
		if (eax == 0xC000001D)
		{
			word64 rcx_n;
			return fn0000000000402130(rax, out rcx_n);
		}
		else if (eax == 0xC000008C)
		{
			word64 rcx_n;
			return fn0000000000402130(rax, out rcx_n);
		}
		else
		{
			word64 rcx_n;
			return fn0000000000402130(rax, out rcx_n);
		}
	}
	else if (eax == 0x80000002)
	{
		word64 rcx_n;
		return fn0000000000402130(rax, out rcx_n);
	}
	else if (eax != 0xC0000005)
	{
		word64 rcx_n;
		return fn0000000000402130(rax, out rcx_n);
	}
	else
	{
		word64 rsp_n;
		Eq_n eax_n;
		byte SCZO_n;
		byte C_n;
		byte Z_n;
		byte CZ_n;
		word32 edx_n;
		byte SZO_n;
		word32 ecx_n;
		struct Eq_n * rax_n;
		word64 rcx_n;
		msvcrt.dll!signal();
		if (rax_n == (struct Eq_n *) 0x01)
		{
			word64 rsp_n;
			word32 eax_n;
			byte SCZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			byte SZO_n;
			word32 ecx_n;
			word64 rax_n;
			word64 rcx_n;
			msvcrt.dll!signal();
			struct Eq_n * rax_n = DPB(rax_n, 0x00, 0);
			word64 rcx_n;
			return fn0000000000402130(rax_n, out rcx_n);
		}
		else if (rax_n == null)
		{
			word64 rcx_n;
			return fn0000000000402130(rax_n, out rcx_n);
		}
		else
		{
			word64 rsp_n;
			word32 eax_n;
			byte SCZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			byte SZO_n;
			word32 ecx_n;
			word64 rax_n;
			word64 rcx_n;
			eax_n();
			struct Eq_n * rax_n = DPB(rax_n, 0x00, 0);
			word64 rcx_n;
			return fn0000000000402130(rax_n, out rcx_n);
		}
	}
}

Eq_n * fn0000000000402130(Eq_n * rax, ptr64 & rcxOut)
{
	*rcxOut = rcx;
	word64 rax_n;
	Eq_n edx_n;
	word64 rdx_n;
	struct Eq_n * rax_n;
	if (eax != 0xC0000094)
	{
		if (eax <= 0xC0000094)
		{
			if (eax == 0xC0000092)
				return DPB(rax, 0x00, 0);
			if (eax == 0xC0000093)
			{
				word64 rsp_n;
				word32 eax_n;
				byte SCZO_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				byte SZO_n;
				byte C_n;
				word32 ecx_n;
				word64 rax_n;
				word64 rdx_n;
				word64 rcx_n;
				msvcrt.dll!signal();
				word64 rsp_n;
				word32 eax_n;
				byte SCZO_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				byte SZO_n;
				byte C_n;
				word32 ecx_n;
				word64 rdx_n;
				word64 rcx_n;
				msvcrt.dll!signal();
				rdx_n = rax_n;
				edx_n = (word32) rax_n;
				if (rax_n != 0x01)
					goto l0000000000402164;
				word64 rsp_n;
				word32 eax_n;
				byte SCZO_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				byte SZO_n;
				byte C_n;
				word32 ecx_n;
				word64 rdx_n;
				word64 rcx_n;
				msvcrt.dll!signal();
				fn0000000000401BC0();
				return DPB(rax, 0x00, 0);
			}
			return rax;
		}
		if (eax == 0xC0000095)
			return DPB(rax, 0x00, 0);
		if (eax != 0xC0000096)
		{
			return rax;
			return DPB(rax, 0x01, 0);
		}
		word64 rsp_n;
		word32 eax_n;
		byte SCZO_n;
		byte Z_n;
		byte CZ_n;
		word32 edx_n;
		byte SZO_n;
		byte C_n;
		word32 ecx_n;
		word64 rax_n;
		word64 rdx_n;
		word64 rcx_n;
		msvcrt.dll!signal();
		word64 rsp_n;
		Eq_n eax_n;
		byte SCZO_n;
		byte Z_n;
		byte CZ_n;
		word32 edx_n;
		byte SZO_n;
		byte C_n;
		word32 ecx_n;
		word64 rax_n;
		word64 rdx_n;
		word64 rcx_n;
		msvcrt.dll!signal();
		if (rax_n != 0x01)
		{
			if (rax_n == 0x00)
				return DPB(rax_n, 0x04, 0);
			word64 rsp_n;
			word32 eax_n;
			byte SCZO_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			byte SZO_n;
			byte C_n;
			word32 ecx_n;
			word64 rax_n;
			word64 rdx_n;
			word64 rcx_n;
			eax_n();
			word64 rsp_n;
			word32 eax_n;
			byte SCZO_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			byte SZO_n;
			byte C_n;
			word32 ecx_n;
			word64 rax_n;
			word64 rdx_n;
			word64 rcx_n;
			0x00();
			rax_n = DPB(rax_n, 0x00, 0);
		}
		else
		{
			word64 rsp_n;
			word32 eax_n;
			byte SCZO_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			byte SZO_n;
			byte C_n;
			word32 ecx_n;
			word64 rax_n;
			word64 rdx_n;
			word64 rcx_n;
			msvcrt.dll!signal();
			rax_n = DPB(rax_n, 0x00, 0);
		}
	}
	else
	{
		word64 rsp_n;
		word32 eax_n;
		byte SCZO_n;
		byte Z_n;
		byte CZ_n;
		word32 edx_n;
		byte SZO_n;
		byte C_n;
		word32 ecx_n;
		word64 rdx_n;
		word64 rcx_n;
		msvcrt.dll!signal();
		rdx_n = rax_n;
		edx_n = (word32) rax_n;
		if (rax_n != 0x01)
		{
l0000000000402164:
			rax_n = DPB(rax_n, 0x01, 0);
			if (rdx_n != 0x00)
			{
				word64 rsp_n;
				word32 eax_n;
				byte SCZO_n;
				byte Z_n;
				byte CZ_n;
				Eq_n edx_n;
				byte SZO_n;
				byte C_n;
				word32 ecx_n;
				word64 rax_n;
				word64 rdx_n;
				word64 rcx_n;
				edx_n();
				struct Eq_n * rax_n = DPB(rax_n, 0x00, 0);
				return rax_n;
				word64 rsp_n;
				word32 eax_n;
				byte SCZO_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				byte SZO_n;
				byte C_n;
				word32 ecx_n;
				word64 rax_n;
				word64 rdx_n;
				word64 rcx_n;
				edx_n();
				return DPB(rax_n, 0x00, 0);
			}
			return rax_n;
		}
		word64 rsp_n;
		word32 eax_n;
		byte SCZO_n;
		byte Z_n;
		byte CZ_n;
		word32 edx_n;
		byte SZO_n;
		byte C_n;
		word32 ecx_n;
		word64 rax_n;
		word64 rdx_n;
		word64 rcx_n;
		msvcrt.dll!signal();
		rax_n = DPB(rax_n, 0x00, 0);
	}
	return rax_n;
}

void fn0000000000402260(Eq_n * rax, word64 * rbx, word64 rbp, word64 rsi, word64 rdi, Eq_n * r15)
{
	word64 r8_n;
	ui64 rax_n = fn0000000000402A10(rax, out r8_n);
	if (globals->dw407648 == 0x00 && rax_n != 0x00)
	{
		globals->dw407648 = 0x01;
		word64 rax_n = fn0000000000402830(qwLoc38, qwLoc10, qwLoc08, qwArg00);
		if (rax_n == 0x00)
		{
			ptr64 rbx_n = 0x00407760;
			ptr64 rcx_n = DPB(0x004042C0, 0x30, 0);
			word16 * rsi_n = DPB(rsi, 0x00, 0);
			word64 * rdi_n = &globals->qw407760;
			while (rcx_n != 0x00)
			{
				*rdi_n = rax_n;
				rdi_n = rdi_n + 0x01;
				rcx_n = rcx_n - 0x01;
			}
			ptr64 r12_n = 0x004020C0 - rax_n;
			ptr64 rcx_n = DPB(rcx_n, 0x20, 0);
			word64 * rdi_n = &globals->qw407660;
			word32 r12d_n = (word32) r12_n;
			while (rcx_n != 0x00)
			{
				*rdi_n = rax_n;
				rdi_n = rdi_n + 0x01;
				rcx_n = rcx_n - 0x01;
			}
			byte * rdi_n = &globals->qw407660;
			do
			{
				struct Eq_n * rax_n = fn0000000000402990(rsi_n);
				if (rax_n == null)
				{
					if (rsi_n != null)
						break;
					goto l000000000040229C;
				}
				*rdi_n = 0x09;
				r15->dw0004 = r12d_n;
				word32 edx_n = rax_n->dw000C;
				rbx_n = rbx_n + 0x0C;
				*(rbx_n - 0x0C) = edx_n;
				word32 edx_n = edx_n + rax_n->dw0008;
				*(rbx_n - 0x04) = (word32) (rdi_n - rax_n);
				*(rbx_n - 0x08) = edx_n;
				rsi_n = rsi_n + 0x01;
				rdi_n = rdi_n + 0x08;
				ptr64 rbx_n = rbx_n;
				word16 * rsi_n = rsi_n;
				byte * rdi_n = rdi_n;
			} while (rsi_n == (word16 *) 0x20);
			word64 rsp_n;
			word64 rbp_n;
			word64 rdi_n;
			word64 rsi_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rax_n;
			word32 eax_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			word64 rcx_n;
			word64 rdx_n;
			word32 ecx_n;
			word64 r12_n;
			word32 esi_n;
			word32 edx_n;
			word64 r8_n;
			word64 r15_n;
			word32 r12d_n;
			KERNEL32.dll!RtlAddFunctionTable();
			word64 rsp_n;
			word64 rbp_n;
			word64 rdi_n;
			word64 rsi_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rax_n;
			word32 eax_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			word64 rcx_n;
			word64 rdx_n;
			word32 ecx_n;
			word64 r12_n;
			word32 esi_n;
			word32 edx_n;
			word64 r8_n;
			word64 r15_n;
			word32 r12d_n;
			KERNEL32.dll!RtlAddFunctionTable();
		}
	}
	return;
}

void fn0000000000402350(Eq_n * * rcx, word64 qwArg24)
{
	struct Eq_n * rdx_n = *rcx;
	uint32 eax_n = rdx_n->dw0000;
	if ((eax_n & 0x20FFFFFF) == 0x20474343 && (rdx_n->b0004 & 0x01) == 0x00)
		return;
	Eq_n eax_n;
	word64 rax_n;
	if (eax_n > 0xC0000091)
	{
		if (eax_n == 0xC0000094)
		{
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			msvcrt.dll!signal();
			if (rax_n == 0x01)
			{
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 eax_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				word64 rax_n;
				msvcrt.dll!signal();
				return;
			}
l0000000000402431:
			if (rax_n != 0x00)
			{
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 eax_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				word64 rax_n;
				eax_n();
				return;
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 eax_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				word64 rax_n;
				~0x00();
				return;
			}
			goto l00000000004023E5;
		}
		if (eax_n <= 0xC0000094)
		{
			if (eax_n == 0xC0000092)
				return;
			if (eax_n == 0xC0000093)
			{
l000000000040241B:
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 eax_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				word64 rax_n;
				msvcrt.dll!signal();
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				msvcrt.dll!signal();
				if (rax_n != 0x01)
					goto l0000000000402431;
				word64 rsp_n;
				word64 rbx_n;
				byte SCZO_n;
				word64 rdx_n;
				word64 rcx_n;
				word32 eax_n;
				word32 ecx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				byte CZ_n;
				word32 edx_n;
				word64 rax_n;
				msvcrt.dll!signal();
				fn0000000000401BC0();
				return;
			}
		}
		else
		{
			if (eax_n == 0xC0000095)
				return;
			if (eax_n == 0xC0000096)
				goto l0000000000402477;
		}
l00000000004023E5:
		<anonymous> * rax_n = globals->qw407640;
		if (rax_n != null)
		{
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			word32 eax_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			<anonymous> * rax_n;
			rax_n();
			return;
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			word32 eax_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			word64 rax_n;
			rax_n();
			return;
		}
		return;
	}
	else
	{
		if (eax_n < 0xC000008D)
		{
			if (eax_n == 0xC0000008)
				return;
			if (eax_n <= 0xC0000008)
			{
				if (eax_n != 0x80000002)
				{
					if (eax_n == 0xC0000005)
					{
						word64 rsp_n;
						word64 rbx_n;
						byte SCZO_n;
						word64 rdx_n;
						word64 rcx_n;
						Eq_n eax_n;
						word32 ecx_n;
						byte SZO_n;
						byte C_n;
						byte Z_n;
						byte CZ_n;
						word32 edx_n;
						word64 rax_n;
						msvcrt.dll!signal();
						if (rax_n == 0x01)
						{
							word64 rsp_n;
							word64 rbx_n;
							byte SCZO_n;
							word64 rdx_n;
							word64 rcx_n;
							word32 eax_n;
							word32 ecx_n;
							byte SZO_n;
							byte C_n;
							byte Z_n;
							byte CZ_n;
							word32 edx_n;
							word64 rax_n;
							msvcrt.dll!signal();
							return;
						}
						if (rax_n != 0x00)
						{
							word64 rsp_n;
							word64 rbx_n;
							byte SCZO_n;
							word64 rdx_n;
							word64 rcx_n;
							word32 eax_n;
							word32 ecx_n;
							byte SZO_n;
							byte C_n;
							byte Z_n;
							byte CZ_n;
							word32 edx_n;
							word64 rax_n;
							eax_n();
							return;
						}
					}
					goto l00000000004023E5;
				}
				return;
			}
			if (eax_n != 0xC000001D)
			{
				if (eax_n != 0xC000008C)
					goto l00000000004023E5;
				return;
			}
l0000000000402477:
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			word32 eax_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			word64 rax_n;
			msvcrt.dll!signal();
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			Eq_n eax_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			word64 rax_n;
			msvcrt.dll!signal();
			if (rax_n != 0x01)
			{
				if (rax_n != 0x00)
				{
					word64 rsp_n;
					word64 rbx_n;
					byte SCZO_n;
					word64 rdx_n;
					word64 rcx_n;
					word32 eax_n;
					word32 ecx_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					byte CZ_n;
					word32 edx_n;
					word64 rax_n;
					eax_n();
					return;
					word64 rsp_n;
					word64 rbx_n;
					byte SCZO_n;
					word64 rdx_n;
					word64 rcx_n;
					word32 eax_n;
					word32 ecx_n;
					byte SZO_n;
					byte C_n;
					byte Z_n;
					byte CZ_n;
					word32 edx_n;
					word64 rax_n;
					~0x00();
					return;
				}
				goto l00000000004023E5;
			}
			word64 rsp_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rdx_n;
			word64 rcx_n;
			word32 eax_n;
			word32 ecx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			byte CZ_n;
			word32 edx_n;
			word64 rax_n;
			msvcrt.dll!signal();
			return;
		}
		goto l000000000040241B;
	}
}

void fn0000000000402530(word64 rax, word64 qwArg00, word64 qwArg08, word64 qwArg38, word64 qwArg40, word64 qwArg48, word64 qwArg50)
{
	EnterCriticalSection(tLoc34);
	if (globals->qw4078E0 != 0x00)
	{
		do
		{
			word64 rsp_n;
			word64 rbp_n;
			word64 rdi_n;
			word64 rsi_n;
			word64 rbx_n;
			byte SCZO_n;
			word64 rcx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			word32 ecx_n;
			word32 ebp_n;
			word64 rax_n;
			Eq_n edi_n;
			word32 eax_n;
			ebp();
			word64 rsp_n;
			word64 rbp_n;
			word64 rdi_n;
			word64 rsi_n;
			byte SCZO_n;
			word64 rcx_n;
			byte SZO_n;
			byte C_n;
			byte Z_n;
			word32 ecx_n;
			word32 ebp_n;
			word64 rax_n;
			word32 edi_n;
			word32 eax_n;
			struct Eq_n * rbx_n;
			edi_n();
			if (eax_n == 0x00 && rsi_n != 0x00)
			{
				word64 rax_n = rbx_n->qw0008;
				Eq_n eax_n = (word32) rax_n;
				word64 rsp_n;
				word64 rbp_n;
				word64 rdi_n;
				word64 rsi_n;
				byte SCZO_n;
				word64 rcx_n;
				byte SZO_n;
				byte C_n;
				byte Z_n;
				word32 ecx_n;
				word32 ebp_n;
				word64 rax_n;
				word32 edi_n;
				word32 eax_n;
				eax_n();
			}
		} while (rbx_n->qw0010 != 0x00);
	}
	word64 rsp_n;
	word64 rbp_n;
	word64 rdi_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rcx_n;
	byte SZO_n;
	byte C_n;
	byte Z_n;
	word32 ecx_n;
	word32 ebp_n;
	word64 rax_n;
	word32 edi_n;
	word32 eax_n;
	globals->ptr408264();
	return;
	word64 rsp_n;
	word64 rbp_n;
	word64 rdi_n;
	word64 rsi_n;
	word64 rbx_n;
	byte SCZO_n;
	word64 rcx_n;
	byte SZO_n;
	byte C_n;
	byte Z_n;
	word32 ecx_n;
	word32 ebp_n;
	word64 rax_n;
	word32 edi_n;
	word32 eax_n;
	globals->ptr408264();
	return;
}

void fn00000000004025A0(word32 ecx, word64 rdx, word64 qwArg00, word64 qwArg08)
{
	if (globals->dw4078E8 != 0x00)
	{
		struct Eq_n * rax_n = calloc(DPB(rcx, 0x01, 0), DPB(rdx, 0x18, 0));
		if (rax_n != null)
		{
			rax_n->dw0000 = ecx;
			rax_n->qw0008 = rdx;
			EnterCriticalSection(tLoc34);
			word64 rax_n = globals->qw4078E0;
			globals->qw4078E0 = rax_n;
			rax_n->qw0010 = rax_n;
			LeaveCriticalSection(tLoc34);
			return;
		}
	}
	return;
}

void fn0000000000402620(word32 ecx, word64 qwArg24)
{
	if (globals->dw4078E8 == 0x00)
		return;
	EnterCriticalSection(tLoc20);
	struct Eq_n * rax_n = globals->qw4078E0;
	if (rax_n != null)
	{
		struct Eq_n * rcx_n;
		if (ecx == rax_n->dw0000)
		{
			globals->qw4078E0 = rax_n->ptr0010;
			rcx_n = rax_n;
l0000000000402698:
			free(rcx_n);
			LeaveCriticalSection(tLoc20);
			return;
			return;
		}
		while (true)
		{
			rcx_n = rax_n->ptr0010;
			if (rcx_n == null)
				break;
			if (rcx_n->dw0000 == ecx)
			{
				rax_n->ptr0010 = rcx_n->ptr0010;
				goto l0000000000402698;
			}
			rax_n = rcx_n;
		}
	}
	LeaveCriticalSection(tLoc20);
	LeaveCriticalSection(tLoc20);
	return;
}

void fn00000000004026C0(uint32 edx, word32 ebx)
{
	if (edx == 0x01)
	{
		if (globals->dw4078E8 == 0x00)
			InitializeCriticalSection(tLoc20);
		globals->dw4078E8 = 0x01;
		return;
	}
	else
	{
		if (edx >= 0x01)
		{
			if (edx != 0x02)
			{
				if (edx == 0x03)
				{
					word32 eax_n = globals->dw4078E8;
					word64 rax_n = DPB(rax, eax_n, 0);
					if (eax_n != 0x00)
						fn0000000000402530(rax_n, qwLoc2C, qwLoc24, qwArg0C, qwArg14, qwArg1C, qwArg24);
				}
			}
			else
				fn0000000000401BC0();
		}
		else
		{
			word32 eax_n = globals->dw4078E8;
			word64 rax_n = DPB(rax, eax_n, 0);
			if (eax_n != 0x00)
				fn0000000000402530(rax_n, qwLoc2C, qwLoc24, qwArg0C, qwArg14, qwArg1C, qwArg24);
			if (globals->dw4078E8 == 0x01)
			{
				struct Eq_n * rcx_n = globals->qw4078E0;
				if (rcx_n != null)
				{
					do
					{
						struct Eq_n * rbx_n = rcx_n->ptr0010;
						free(rcx_n);
						rcx_n = rbx_n;
					} while (rbx_n != null);
				}
				globals->qw4078E0 = 0x00;
				globals->dw4078E8 = 0x00;
				DeleteCriticalSection(*(fp - 0x20));
			}
		}
		return;
	}
}

int64 fn00000000004027A0(Eq_n * rcx, ptr64 & rcxOut)
{
	int64 rax_n = (int64) rcx->dw003C;
	struct Eq_n * rcx_n = rcx + rax_n / 0x0040;
	*rcxOut = rcx_n;
	int64 rax_n = DPB(rax_n, 0x00, 0);
	bool al_n = 0x00;
	if (rcx_n->dw0000 == 0x4550)
	{
		al_n = rcx_n->w0018 == 0x020B;
		rax_n = DPB(rax_n, al_n, 0);
	}
	return DPB(rax_n, (word32) al_n, 0);
}

void fn00000000004027C0(Eq_n * rcx)
{
	if (rcx->w0000 == 23117)
	{
		word64 rcx_n;
		fn00000000004027A0(rcx, out rcx_n);
		return;
	}
	else
		return;
}

void fn00000000004027E0(Eq_n * rcx, Eq_n * rdx, Eq_n * r8)
{
	int64 rax_n = (int64) rcx->dw003C;
	struct Eq_n * rcx_n = rcx + rax_n / 0x0040;
	struct Eq_n * rax_n = (rcx_n->w0014 + 0x02 + DPB(rax_n, (word32) rcx_n->w0014, 0) / 22)->w0006 + 0x01;
	word32 ecx_n = (word32) rcx_n->w0006;
	if (ecx_n != 0x00)
	{
		struct Eq_n * r9_n = rax_n + 0x01 + ((DPB(rcx_n, ecx_n - 0x01, 0) * 0x05) * 0x08) / 0x0028;
		do
		{
			word32 r8d_n = r8->dw000C;
			r8 = DPB(r8, r8d_n, 0);
			if (r8 <= rdx && rdx < DPB(r8, r8d_n + rax_n->dw0000, 0))
				return;
			rax_n = rax_n + 0x01;
		} while (rax_n != r9_n);
	}
	return;
}

Eq_n * fn0000000000402830(word64 qwArg04, word64 qwArg2C, word64 qwArg34, word64 qwArg3C)
{
	struct Eq_n * rax_n = DPB(rax, strlen(ptrLoc2C), 0);
	if (rax_n <= (struct Eq_n *) 0x08)
	{
		struct Eq_n * rdx_n = globals->ptr404330;
		struct Eq_n * rbx_n = DPB(rbx, 0x00, 0);
		if (rdx_n->w0000 != 23117)
			return rbx_n;
		word64 rcx_n;
		if ((word32) fn00000000004027A0(rdx_n, out rcx_n) == 0x00)
			return rbx_n;
		word64 rax_n = (int64) rdx_n->dw003C + rdx_n;
		word32 eax_n = (word32) rax_n->w0006;
		rbx_n = rax_n + 0x18 + DPB(rdx_n, (word32) Mem0[rax_n + 0x14:word16], 0);
		rax_n = DPB(rax_n, eax_n, 0);
		if (eax_n != 0x00)
		{
			struct Eq_n * rax_n = DPB(rax_n, eax_n - 0x01, 0);
			rax_n = rax_n * 0x05;
			struct Eq_n * rdi_n = rbx_n->w0014 + 0x0A + ((rax_n * 0x05) * 0x08) / 22;
			do
			{
				if (strncmp(ptrLoc2C, ptrLoc24, tLoc1C) == 0x00)
					return rbx_n;
				rbx_n = rbx_n->w0014 + 0x0A;
			} while (rbx_n != rdi_n);
		}
	}
	return rax_n;
	return DPB(qwLoc0C, 0x00, 0);
}

Eq_n * fn00000000004028C0(Eq_n * rcx, Eq_n * r10, ptr64 & r8Out)
{
	struct Eq_n * r9_n = globals->ptr404330;
	struct Eq_n * rdx_n = DPB(rdx, 0x00, 0);
	struct Eq_n * r8_n = rcx;
	*r8Out = r8_n;
	if (rcx->t0000 == 23117)
	{
		struct Eq_n * rcx_n;
		if ((word32) fn00000000004027A0(r9_n, out rcx_n) != 0x00)
		{
			struct Eq_n * rax_n = r9_n + (int64) rcx_n->dw003C / 0x0040;
			struct Eq_n * rcx_n = rcx - r9_n;
			rdx_n = (struct Eq_n *) ((rax_n->w0014 + 0x02 + DPB(rdx, (word32) rax_n->w0014, 0) / 22)->w0006 + 0x01);
			word32 eax_n = (word32) rax_n->w0006;
			if (eax_n != 0x00)
			{
				struct Eq_n * r9_n = rdx_n + 0x01 + ((DPB(rax_n, eax_n - 0x01, 0) * 0x05) * 0x08) / 0x0028;
				do
				{
					word32 r8d_n = r10->dw000C;
					r8_n = DPB(r8_n, r8d_n, 0);
					*r8Out = r8_n;
					if (rcx_n >= r8_n && rcx_n < DPB(r8_n, r8d_n + rdx_n->dw0000, 0))
						return rdx_n;
					rdx_n = rdx_n + 0x01;
				} while (rdx_n != r9_n);
			}
			return DPB(rdx_n, 0x00, 0);
		}
	}
	return rdx_n;
}

byte fn0000000000402950(ptr64 & r8Out)
{
	struct Eq_n * rdx_n = globals->ptr404330;
	word64 r8_n;
	*r8Out = DPB(r8, 0x00, 0);
	if (rdx_n->w0000 == 23117)
	{
		word64 rcx_n;
		if ((word32) fn00000000004027A0(rdx_n, out rcx_n) != 0x00)
		{
			word32 r8d_n = (word32) rdx_n[((int64) rdx_n->dw003C + 0x06) / 0x0040];
			word64 r8_n;
			*r8Out = DPB(r8, r8d_n, 0);
			return (byte) r8d_n;
		}
	}
	return 0x00;
}

Eq_n * fn0000000000402990(word16 * rcx)
{
	struct Eq_n * r9_n = globals->ptr404330;
	struct Eq_n * rdx_n = DPB(rdx, 0x00, 0);
	word16 * r8_n = rcx;
	if (*rcx == 23117)
	{
		struct Eq_n * rcx_n;
		if ((word32) fn00000000004027A0(r9_n, out rcx_n) != 0x00)
		{
			struct Eq_n * rax_n = r9_n + (int64) rcx_n->dw003C / 0x0040;
			rdx_n = rax_n + 0x18 + DPB(rdx, (word32) rax_n->w0014, 0) + 0x27;
			word32 eax_n = (word32) rax_n->w0006;
			if (eax_n != 0x00)
			{
				struct Eq_n * rax_n = rdx_n + 0x01 + ((DPB(rax_n, eax_n - 0x01, 0) * 0x05) * 0x08) / 0x0028;
				do
				{
					if ((rdx_n->b0000 & 0x20) != 0x00)
					{
						if (r8_n == null)
							return rdx_n;
						r8_n = r8_n - 0x01;
					}
					rdx_n = rdx_n + 0x01;
				} while (rdx_n != rax_n);
			}
			return DPB(rdx_n, 0x00, 0);
		}
	}
	return rdx_n;
}

Eq_n * fn0000000000402A10(Eq_n * rax, ptr64 & r8Out)
{
	struct Eq_n * r8_n = globals->ptr404330;
	*r8Out = r8_n;
	struct Eq_n * rdx_n = DPB(rdx, 0x00, 0);
	if (rax->w0000 == 23117)
	{
		word64 rcx_n;
		if ((word32) fn00000000004027A0(r8_n, out rcx_n) != 0x00)
			rdx_n = r8_n;
		return rdx_n;
	}
	else
		return rdx_n;
}

void fn0000000000402A50(word64 rcx)
{
	struct Eq_n * r8_n = globals->ptr404330;
	if (DPB(rax, 0x00, 0) + 0x00 == 23117)
	{
		word64 rcx_n;
		struct Eq_n * rax_n = fn00000000004027A0(r8_n, out rcx_n);
		if ((word32) rax_n != 0x00)
		{
			struct Eq_n * rax_n = (int64) rax_n->dw003C;
			word64 r8_n = r8_n + rax_n;
			struct Eq_n * rcx_n = rcx - r8_n;
			word32 edx_n = (word32) rax_n->w0006;
			word64 rax_n = r8_n + 0x18 + DPB(rax_n, (word32) rax_n->w0014, 0) + 0x08;
			if (edx_n != 0x00)
			{
				struct Eq_n * r9_n = rax_n + 0x01 + ((DPB(rcx, edx_n - 0x01, 0) * 0x05) * 0x08) / 0x0028;
l0000000000402AB0:
				word32 r8d_n = r8_n->dw000C;
				r8_n = DPB(r8_n, r8d_n, 0);
				if (rcx_n >= r8_n && rcx_n < DPB(r8_n, r8d_n + rax_n->dw0000, 0))
					return;
				rax_n = rax_n + 0x01;
				if (rax_n != r9_n)
					goto l0000000000402AB0;
			}
			return;
		}
	}
	return;
}

void fn0000000000402AF0(int32 ecx, Eq_n * rbx)
{
	struct Eq_n * r11_n = globals->ptr404330;
	int32 r8d_n = ecx;
	if (rbx->w0000 == 23117)
	{
		word64 rcx_n;
		struct Eq_n * rax_n = fn00000000004027A0(r11_n, out rcx_n);
		if ((word32) rax_n != 0x00)
		{
			struct Eq_n * rcx_n = r11_n + (int64) rbx->dw003C / 0x0040;
			word32 eax_n = rcx_n->dw0090;
			uint64 rax_n = DPB(rax_n, eax_n, 0);
			if (eax_n != 0x00)
			{
				struct Eq_n * rdx_n = (rcx_n->w0014 + 0x02 + DPB(rdx, (word32) rcx_n->w0014, 0) / 0x0094)->w0006 + 0x01;
				word32 ecx_n = (word32) rcx_n->w0006;
				if (ecx_n != 0x00)
				{
					struct Eq_n * r10_n = rdx_n + 0x01 + ((DPB(rcx_n, ecx_n - 0x01, 0) * 0x05) * 0x08) / 0x0028;
l0000000000402B50:
					word32 r9d_n = r10_n->dw000C;
					r9 = DPB(r9, r9d_n, 0);
					if (rax_n < r9 || rax_n >= DPB(r9, r9d_n + rdx_n->dw0000, 0))
					{
						rdx_n = rdx_n + 0x01;
						if (rdx_n != r10_n)
							goto l0000000000402B50;
						return;
					}
					else
					{
						struct Eq_n * rax_n = r11_n + rax_n / 0x0040;
						if (rax_n == null)
							return;
						while (true)
						{
							if (rax_n->dw0004 == 0x00 && rax_n->dw000C == 0x00)
								return;
							if (r8d_n <= 0x00)
								break;
							r8d_n = r8d_n - 0x01;
							rax_n = rax_n + 0x01;
						}
						return;
					}
				}
			}
		}
	}
	return;
}

word64 fn0000000000402BC0(ui64 rax, uint64 r8, word64 qwArg00, ptr64 & r8Out)
{
	*r8Out = r8;
	struct Eq_n * rcx_n = fp + 0x10;
	if (r8 >= 0x1000)
	{
		do
		{
			rcx_n = rcx_n - 0x00001000;
			rcx_n->qw0000 = rcx_n->qw0000;
			r8 = r8 - 0x00001000;
			*r8Out = r8;
		} while (r8 > 0x1000);
	}
	word64 * rcx_n = rcx_n - rax;
	*rcx_n = *rcx_n;
	return qwArg00;
}

void fn0000000000402CD0()
{
	return;
}

void fn0000000000402CE0(ptr64 rcx)
{
	globals->ptr407950 = rcx;
	return;
}

void fn0000000000402DC0()
{
	fn0000000000401540();
	return;
}

