Function at 0x477420
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
mov eax, 0x1e88
call fcn.004c4e80
mov eax, dword [0x53c160]
xor eax, esp
mov dword [esp + 0x1e84], eax
mov edx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x10], edi
mov dword [esp + 0x1c], edx
cmp dword [edi + 0x10], 0
jne 0x477463
call fcn.004770b0
mov edx, dword [esp + 0x1c]
mov eax, dword [edi + 4]
cmp dword [eax + 4], 0
jne 0x47748f
push 0x45a
call dword [sym.imp.KERNEL32.DLL_SetLastError]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x1e84]
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 0x10
mov dword [0x548760], 0
mov dword [0x548764], 0
test edx, edx
jne 0x477542
call dword [sym.imp.KERNEL32.DLL_GetCurrentThread]
cmp esi, eax
jne 0x4774e7
push 0x2c8
lea eax, [esp + 0x1978]
push 0
push eax
call fcn.004c6130
add esp, 0xc
mov dword [esp + 0x1970], 0x10007
lea eax, [esp + 0x1970]
push eax
call dword [sym.imp.KERNEL32.DLL_RtlCaptureContext]
jmp 0x47755a
push esi
call dword [sym.imp.KERNEL32.DLL_SuspendThread]
push 0x2c8
lea eax, [esp + 0x1978]
push 0
push eax
call fcn.004c6130
add esp, 0xc
mov dword [esp + 0x1970], 0x10007
lea eax, [esp + 0x1970]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_GetThreadContext]
test eax, eax
jne 0x47755a
push esi
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x1e84]
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 0x10
mov ecx, 0xb3
lea edi, [esp + 0x1970]
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push 0x108
lea eax, [esp + 0x186c]
push 0
push eax
call fcn.004c6130
mov eax, dword [esp + 0x1a34]
add esp, 0xc
mov dword [esp + 0x1868], eax
mov eax, dword [esp + 0x1a24]
mov dword [esp + 0x1888], eax
mov eax, dword [esp + 0x1a34]
push 0x420
mov dword [esp + 0x1870], 0
mov dword [esp + 0x1878], 3
mov dword [esp + 0x1890], 0
mov dword [esp + 0x1898], 3
mov dword [esp + 0x189c], eax
mov dword [esp + 0x18a0], 0
mov dword [esp + 0x18a8], 3
call fcn.004d22f2
add esp, 4
mov dword [esp + 0x14], eax
test eax, eax
je 0x4779c7
push 0x420
push 0
push eax
call fcn.004c6130
mov eax, dword [esp + 0x20]
add esp, 0xc
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
movq qword [esp + 0x30], xmm0
push 0x244
mov dword [eax], 0x20
mov dword [eax + 0x18], 0x400
lea eax, [esp + 0x1c48]
push 0
push eax
mov dword [esp + 0x2c], 0x18
call fcn.004c6130
mov eax, dword [edi + 4]
add esp, 0xc
mov dword [esp + 0x1c40], 0x248
mov dword [esp + 0x10], 0
mov ecx, dword [eax + 0x3c]
push 0
push dword [eax + 0x1c]
push dword [eax + 0x14]
lea eax, [esp + 0x197c]
push 0x477a30
push eax
lea eax, [esp + 0x187c]
push eax
push esi
push dword [edi + 8]
push 0x14c
call ecx
test eax, eax
je 0x477998
nop dword [eax]
mov ecx, dword [esp + 0x1868]
xorps xmm0, xmm0
mov edx, dword [esp + 0x186c]
mov eax, ecx
or eax, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov byte [esp + 0x48], 0
mov byte [esp + 0x448], 0
mov byte [esp + 0x848], 0
movlpd qword [esp + 0xc48], xmm0
mov dword [esp + 0xc50], 0
mov byte [esp + 0xc58], 0
mov dword [esp + 0xc54], 0
mov byte [esp + 0x1468], 0
mov byte [esp + 0x1060], 0
je 0x477934
mov esi, dword [esp + 0x14]
mov eax, dword [edi + 4]
push esi
lea esi, [esp + 0xc4c]
push esi
mov eax, dword [eax + 0x2c]
push edx
push ecx
push dword [edi + 8]
call eax
mov esi, dword [esp + 0x14]
test eax, eax
je 0x47776c
add esi, 0x1c
lea eax, [esp + 0x48]
push esi
push 0x400
push eax
call fcn.004d7787
mov eax, dword [edi + 4]
lea ecx, [esp + 0x454]
add esp, 0xc
mov eax, dword [eax + 0x40]
push 0x1000
push 0x400
push ecx
push esi
call eax
mov eax, dword [edi + 4]
lea ecx, [esp + 0x848]
push 0
push 0x400
push ecx
mov eax, dword [eax + 0x40]
push esi
call eax
jmp 0x47778f
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [esp + 0x186c]
mov ecx, edi
push dword [esp + 0x186c]
push eax
push 0x515ecc
call esi
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x477806
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0xc54]
push ecx
push dword [esp + 0x1874]
push dword [esp + 0x1874]
push dword [edi + 8]
call eax
test eax, eax
je 0x4777e3
push dword [esp + 0x2c]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc58], eax
lea eax, [esp + 0xc5c]
push 0x400
push eax
call fcn.004d7787
add esp, 0xc
jmp 0x477806
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [esp + 0x186c]
mov ecx, edi
push dword [esp + 0x186c]
push eax
push 0x515ee0
call esi
mov ecx, dword [edi + 4]
lea eax, [esp + 0x1c40]
push eax
push dword [esp + 0x1870]
push dword [esp + 0x1870]
push dword [edi + 8]
call fcn.00476f40
test eax, eax
je 0x47790d
mov eax, dword [esp + 0x1c60]
cmp eax, 7
ja case.default.0x47783b
jmp dword [eax*4 + 0x477a0c]
mov dword [esp + 0x105c], 0x515ef8
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f04
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f0c
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f10
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f14
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f20
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f2c
jmp 0x4778b5
mov dword [esp + 0x105c], 0x515f30
jmp 0x4778b5
mov dword [esp + 0x105c], 0
lea eax, [esp + 0x1c64]
push eax
lea eax, [esp + 0x1064]
push 0x400
push eax
call fcn.004d7787
mov eax, dword [esp + 0x1c54]
add esp, 0xc
mov ecx, dword [esp + 0x1c4c]
mov dword [esp + 0x1460], eax
lea eax, [esp + 0x1d84]
mov dword [esp + 0x1464], ecx
push eax
lea eax, [esp + 0x146c]
push 0x400
push eax
call fcn.004d7787
add esp, 0xc
jmp 0x477930
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [esp + 0x186c]
mov ecx, edi
push dword [esp + 0x186c]
push eax
push 0x515f34
call esi
mov esi, dword [esp + 0x18]
mov edx, dword [edi]
lea eax, [esp + 0x40]
push eax
xor eax, eax
mov ecx, edi
cmp dword [esp + 0x14], eax
setne al
push eax
call dword [edx + 0xc]
mov eax, dword [esp + 0x1878]
or eax, dword [esp + 0x187c]
je 0x4779f3
mov eax, dword [edi + 4]
inc dword [esp + 0x10]
push 0
push dword [eax + 0x1c]
mov ecx, dword [eax + 0x3c]
push dword [eax + 0x14]
lea eax, [esp + 0x197c]
push 0x477a30
push eax
lea eax, [esp + 0x187c]
push eax
push esi
push dword [edi + 8]
push 0x14c
call ecx
test eax, eax
jne 0x477690
mov eax, dword [edi]
mov esi, dword [eax + 0x10]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [esp + 0x186c]
mov ecx, edi
push dword [esp + 0x186c]
push eax
push 0x515ec0
call esi
push dword [esp + 0x14]
call fcn.004d217e
add esp, 4
cmp dword [esp + 0x1c], 0
jne 0x4779d8
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
mov ecx, dword [esp + 0x1e8c]
mov eax, 1
pop edi
pop esi
xor ecx, esp
call fcn.004c3ba1
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edi]
lea ecx, [esp + 0x40]
push ecx
push 2
mov ecx, edi
call dword [eax + 0xc]
push 0
call dword [sym.imp.KERNEL32.DLL_SetLastError]
jmp 0x4779bb