Function at 0x10004cf0
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
mov eax, dword [0x10054010]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x2dc], ecx
test ecx, ecx
je 0x10004d17
mov eax, dword [0x10056b30]
mov dword [ecx], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x10056b28], eax
je 0x10004d3a
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.100093a1
mov esp, ebp
pop ebp
ret 4
cmp dword [0x10056b2c], 0
je 0x10004d4d
call fcn.10004bc0
jmp 0x10005030
push ebx
push esi
mov esi, dword [0x10056b38]
mov dword [ebp - 0x2d8], 0
push edi
test esi, esi
je 0x10004dcd
cmp dword [esi + 4], 0
je 0x10004d86
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.1000b6c0
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x10004dc2
mov eax, dword [esi + 0x10]
xor ebx, ebx
mov edx, dword [esi + 0xc]
mov ecx, dword [eax + 0x44]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
add edx, 5
mov eax, dword [esi + 0x10]
xor ecx, ecx
mov eax, dword [eax + 0x40]
mov edi, eax
sub edi, edx
cmp edx, eax
cmova edi, ebx
test edi, edi
je 0x10004dbf
inc ecx
mov byte [edx], 0xcc
lea edx, [edx + 1]
cmp ecx, edi
jb 0x10004db4
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x10004d64
mov ebx, dword [0x10056b34]
test ebx, ebx
je 0x10004ece
nop dword [eax + eax]
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x2d0], 0x10001
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10004ec4
mov esi, dword [0x10056b38]
test esi, esi
je 0x10004ec4
mov edx, dword [ebp - 0x218]
cmp dword [esi + 4], 0
je 0x10004e60
mov edi, dword [esi + 0x10]
cmp edx, edi
jb 0x10004eba
lea eax, [edi + 4]
cmp edx, eax
jae 0x10004eba
xor eax, eax
sub dl, byte [esi + 0x10]
mov cl, byte [edi + eax + 0x38]
shr cl, 3
cmp cl, dl
je 0x10004e52
inc eax
cmp eax, 8
jb 0x10004e37
xor al, al
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x10004e9e
mov al, byte [eax + edi + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x10004e9e
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jb 0x10004eba
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, ecx
cmp edx, eax
jae 0x10004eba
xor ecx, ecx
sub dl, byte [esi + 0xc]
nop dword [eax]
mov al, byte [edi + ecx + 0x38]
and al, 7
cmp al, dl
je 0x10004e94
inc ecx
cmp ecx, 8
jb 0x10004e80
xor eax, eax
jmp 0x10004e9c
movzx eax, byte [ecx + edi + 0x38]
shr eax, 3
add eax, edi
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x2d0]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov edx, dword [ebp - 0x218]
mov esi, dword [esi]
test esi, esi
jne 0x10004e16
mov ebx, dword [ebx]
test ebx, ebx
jne 0x10004de0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x10056b38]
mov esi, eax
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 0x2d4], esi
test edi, edi
je 0x10004f78
lea eax, [ebp - 0x2e0]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call ebx
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10004f5b
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x10004f55
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.1000bc40
mov eax, dword [esi + 8]
add esp, 0xc
mov dword [ebx + 0x40], eax
mov dword [esi + 8], ebx
mov dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [edi]
push 0x18
push edi
call fcn.100093b2
add esp, 8
mov edi, esi
test esi, esi
mov esi, dword [ebp - 0x2d4]
jne 0x10004ef0
cmp dword [ebp - 0x2d8], 0
mov dword [0x10056b38], 0
je 0x10004f99
cmp dword [0x10056b24], 0
jne 0x10004f99
call fcn.10003fc0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x10056b3c]
mov dword [ebp - 0x2d4], eax
test esi, esi
je 0x10004fdb
mov edi, dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
lea eax, [ebp - 0x2e0]
push eax
push 0x20
push 0x10000
push esi
call ebx
push 0x10000
push esi
push dword [ebp - 0x2d4]
call edi
mov esi, dword [esi + 4]
test esi, esi
jne 0x10004fb5
mov edi, dword [0x10056b34]
test edi, edi
je 0x10005008
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
nop dword [eax + eax]
push dword [edi + 4]
call ebx
mov esi, dword [edi]
push 8
push edi
call fcn.100093b2
add esp, 8
mov edi, esi
test esi, esi
jne 0x10004ff0
mov ecx, dword [ebp - 0x2dc]
mov dword [0x10056b34], 0
mov dword [0x10056b28], 0
pop edi
pop esi
pop ebx
test ecx, ecx
je 0x10005030
mov eax, dword [0x10056b30]
mov dword [ecx], eax
mov ecx, dword [ebp - 4]
mov eax, dword [0x10056b2c]
xor ecx, ebp
call fcn.100093a1
mov esp, ebp
pop ebp
ret 4