Function at 0x10004bca
Capabilities:
Resume thread

Disassembly:
sub esp, 0x2d4
mov eax, dword [0x1002e670]
xor eax, esp
mov dword [esp + 0x2d0], eax
push ebx
mov ebx, dword [esp + 0x2dc]
test ebx, ebx
je 0x10004bf1
mov eax, dword [0x100300bc]
mov dword [ebx], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x100300b4], eax
je 0x10004c09
mov eax, 0x10dd
jmp 0x10004e1b
cmp dword [0x100300b8], 0
je 0x10004c1c
call fcn.10004ab6
jmp 0x10004e16
push ebp
push esi
mov esi, dword [0x100300c4]
push edi
jmp 0x10004cb7
cmp dword [esi + 4], 0
mov eax, dword [esi + 0x10]
je 0x10004c8b
xor edi, edi
cmp byte [eax + 0x17], 0
jbe 0x10004c69
and dword [esp + 0x10], 0
lea ecx, [esp + 0x10]
push ecx
push 0
push eax
mov eax, dword [esi + 0xc]
add eax, edi
push eax
call fcn.10005d9c
cmp dword [esp + 0x10], 0
jne 0x10004c69
mov ecx, dword [esi + 0x10]
mov edi, eax
sub edi, ecx
movzx ecx, byte [ecx + 0x17]
cmp edi, ecx
jl 0x10004c3b
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
cmp edi, eax
je 0x10004c86
mov eax, dword [esi + 8]
mov dword [0x100300b8], 0xd
mov dword [0x100300bc], eax
mov eax, dword [esi + 0xc]
jmp 0x10004cb0
mov edx, dword [esi + 0xc]
mov ecx, dword [eax + 0x1c]
lea eax, [edx + 5]
mov byte [edx], 0xe9
sub ecx, eax
mov dword [edx + 1], ecx
mov eax, dword [esi + 0x10]
push dword [eax + 0x18]
lea eax, [edx + 5]
push eax
call fcn.100045cf
mov eax, dword [esi + 0x10]
pop ecx
pop ecx
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x10004c2a
mov edi, dword [0x100300c0]
test edi, edi
je 0x10004d68
mov ebp, dword [sym.imp.KERNEL32.dll_SetThreadContext]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x10004d5e
mov esi, dword [0x100300c4]
test esi, esi
je 0x10004d5e
mov ecx, dword [esp + 0xcc]
cmp dword [esi + 4], 0
je 0x10004d20
mov edx, dword [esi + 0x10]
cmp ecx, edx
jb 0x10004d58
lea eax, [edx + 4]
cmp ecx, eax
jae 0x10004d58
sub ecx, edx
mov dword [esp + 0xcc], ecx
add ecx, dword [esi + 0xc]
jmp 0x10004d40
cmp ecx, dword [esi + 0xc]
jb 0x10004d58
mov eax, dword [esi + 0x10]
movzx eax, byte [eax + 0x17]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x10004d58
sub ecx, dword [esi + 0xc]
mov dword [esp + 0xcc], ecx
add ecx, dword [esi + 0x10]
lea eax, [esp + 0x14]
mov dword [esp + 0xcc], ecx
push eax
push dword [edi + 4]
call ebp
mov ecx, dword [esp + 0xcc]
mov esi, dword [esi]
test esi, esi
jne 0x10004cfe
mov edi, dword [edi]
test edi, edi
jne 0x10004cd3
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x100300c4]
mov ebp, eax
test edi, edi
je 0x10004dcd
lea eax, [esp + 0x10]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x17]
push eax
push dword [edi + 0xc]
push ebp
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x10004dbe
cmp dword [edi + 0x10], 0
je 0x10004dbe
push dword [edi + 0x10]
call fcn.100045a8
and dword [edi + 0x10], 0
pop ecx
mov esi, dword [edi]
push edi
call fcn.100061f2
mov edi, esi
pop ecx
test esi, esi
jne 0x10004d7a
xor ebp, ebp
mov dword [0x100300c4], ebp
call fcn.10004683
mov edi, dword [0x100300c0]
test edi, edi
je 0x10004dfc
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push edi
call fcn.100061f2
mov edi, esi
pop ecx
test esi, esi
jne 0x10004de4
mov dword [0x100300c0], ebp
mov dword [0x100300b4], ebp
pop edi
pop esi
pop ebp
test ebx, ebx
je 0x10004e16
mov eax, dword [0x100300bc]
mov dword [ebx], eax
mov eax, dword [0x100300b8]
mov ecx, dword [esp + 0x2d4]
pop ebx
xor ecx, esp
call fcn.10006f71
add esp, 0x2d4
ret 4