Function at 0x4776b0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
mov eax, dword [0x5603e8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x2d8], eax
test eax, eax
je 0x4776d8
mov ecx, dword [0x5614f8]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x5614f0], eax
je 0x4776fb
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret 4
cmp dword [0x5614f4], 0
je 0x47770e
call fcn.004775d0
jmp 0x4779ea
push ebx
push esi
mov esi, dword [0x561500]
push edi
mov dword [ebp - 0x2d4], 0
test esi, esi
je 0x47778a
cmp dword [esi + 4], 0
mov eax, dword [esi + 0x10]
je 0x47774d
movzx edx, byte [eax + 0x36]
push edx
add eax, 0x20
push eax
mov eax, dword [esi + 0xc]
push eax
call sub.MSVCR100.dll_memcpy
mov ecx, dword [esi + 8]
mov edx, dword [esi + 0xc]
add esp, 0xc
mov dword [ecx], edx
jmp 0x477784
mov ecx, dword [eax + 0x44]
mov eax, dword [esi + 0xc]
lea edx, [eax + 5]
sub ecx, edx
mov byte [eax], 0xe9
mov dword [eax + 1], ecx
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 0x40]
add eax, 5
cmp eax, ecx
jae 0x47777c
sub ecx, eax
push ecx
push 0xcc
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
mov edx, dword [esi + 8]
mov eax, dword [esi + 0x10]
mov dword [edx], eax
mov esi, dword [esi]
test esi, esi
jne 0x477725
mov eax, dword [0x5614fc]
mov ebx, eax
test eax, eax
je 0x47789a
lea esp, [esp]
mov edx, dword [ebx + 4]
lea ecx, [ebp - 0x2d0]
push ecx
push edx
mov dword [ebp - 0x2d0], 0x10001
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x477890
mov edi, dword [0x561500]
test edi, edi
je 0x477890
mov ecx, dword [ebp - 0x218]
cmp dword [edi + 4], 0
je 0x477834
mov esi, dword [edi + 0x10]
cmp ecx, esi
jb 0x477886
lea eax, [esi + 4]
cmp ecx, eax
jae 0x477886
xor eax, eax
sub cl, byte [edi + 0x10]
jmp 0x477800
mov dl, byte [esi + eax + 0x38]
shr dl, 3
cmp dl, cl
je 0x47782c
inc eax
cmp eax, 8
jb 0x477800
xor al, al
mov edx, dword [ebx + 4]
movzx eax, al
add eax, dword [edi + 0xc]
lea ecx, [ebp - 0x2d0]
push ecx
mov dword [ebp - 0x218], eax
push edx
jmp 0x47787a
mov al, byte [eax + esi + 0x38]
and al, 7
jmp 0x477813
mov eax, dword [edi + 0xc]
cmp ecx, eax
jb 0x477886
mov esi, dword [edi + 0x10]
movzx edx, byte [esi + 0x36]
add edx, eax
cmp ecx, edx
jae 0x477886
xor eax, eax
sub cl, byte [edi + 0xc]
lea ecx, [ecx]
mov dl, byte [esi + eax + 0x38]
and dl, 7
cmp dl, cl
je 0x4779ff
inc eax
cmp eax, 8
jb 0x477850
xor eax, eax
mov ecx, dword [ebx + 4]
add esi, eax
lea eax, [ebp - 0x2d0]
push eax
mov dword [ebp - 0x218], esi
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 0x218]
mov edi, dword [edi]
test edi, edi
jne 0x4777d7
mov ebx, dword [ebx]
test ebx, ebx
jne 0x4777a0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x561500]
mov dword [ebp - 0x2e0], eax
test esi, esi
je 0x47793b
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [ebp - 0x2dc]
push edx
movzx edx, byte [ecx + 0x36]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ecx, dword [esi + 0x10]
movzx edx, byte [ecx + 0x36]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x2e0]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [esi + 4], 0
je 0x477926
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x477926
push 0x48
push 0
mov edi, ebx
push ebx
and edi, 0xffff0000
call sub.MSVCR100.dll_memset
mov edx, dword [edi + 8]
mov dword [ebx + 0x40], edx
mov dword [edi + 8], ebx
add esp, 0xc
mov dword [esi + 0x10], 0
mov dword [ebp - 0x2d4], 1
mov edi, dword [esi]
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov esi, edi
test edi, edi
jne 0x4778b4
cmp dword [ebp - 0x2d4], 0
mov dword [0x561500], 0
je 0x47795c
cmp dword [0x5614ec], 0
jne 0x47795c
call fcn.004774e0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x5614e0]
mov edi, eax
test esi, esi
je 0x477999
mov edi, edi
lea eax, [ebp - 0x2dc]
push eax
push 0x20
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 0x10000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov esi, dword [esi + 4]
test esi, esi
jne 0x477970
mov esi, dword [0x5614fc]
test esi, esi
je 0x4779c7
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
lea esp, [esp]
mov ecx, dword [esi + 4]
push ecx
call ebx
mov edi, dword [esi]
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov esi, edi
test edi, edi
jne 0x4779b0
mov eax, dword [ebp - 0x2d8]
xor ecx, ecx
pop edi
pop esi
mov dword [0x5614fc], ecx
mov dword [0x5614f0], ecx
pop ebx
cmp eax, ecx
je 0x4779ea
mov edx, dword [0x5614f8]
mov dword [eax], edx
mov ecx, dword [ebp - 4]
mov eax, dword [0x5614f4]
xor ecx, ebp
call fcn.004b12f6
mov esp, ebp
pop ebp
ret 4
movzx eax, byte [eax + esi + 0x38]
shr eax, 3
jmp 0x477867