Function at 0x47d750
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2dc
mov eax, dword [0x50d4cc]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x518e1c], eax
je 0x47d784
mov eax, 0x10dd
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048b090
mov esp, ebp
pop ebp
ret
cmp dword [0x518e18], 0
je 0x47d7a5
call fcn.0047d650
mov eax, dword [0x518e18]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0048b090
mov esp, ebp
pop ebp
ret
push ebx
push esi
mov esi, dword [0x518e10]
mov dword [ebp - 0x2d8], 0
push edi
test esi, esi
je 0x47d829
lea esp, [esp]
cmp dword [esi + 4], 0
je 0x47d7e2
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.0048f670
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x47d81e
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 0x47d81b
inc ecx
mov byte [edx], 0xcc
lea edx, [edx + 1]
cmp ecx, edi
jb 0x47d810
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x47d7c0
mov ebx, dword [0x518e00]
test ebx, ebx
je 0x47d92e
jmp 0x47d840
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x2d4], 0x10001
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x47d924
mov esi, dword [0x518e10]
test esi, esi
je 0x47d924
mov edx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x47d8c0
mov edi, dword [esi + 0x10]
cmp edx, edi
jb 0x47d91a
lea eax, [edi + 4]
cmp edx, eax
jae 0x47d91a
xor eax, eax
sub dl, byte [esi + 0x10]
mov cl, byte [edi + eax + 0x38]
shr cl, 3
cmp cl, dl
je 0x47d8b2
inc eax
cmp eax, 8
jb 0x47d897
xor al, al
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x47d8fe
mov al, byte [eax + edi + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x47d8fe
mov ecx, dword [esi + 0xc]
cmp edx, ecx
jb 0x47d91a
mov edi, dword [esi + 0x10]
movzx eax, byte [edi + 0x36]
add eax, ecx
cmp edx, eax
jae 0x47d91a
xor ecx, ecx
sub dl, byte [esi + 0xc]
lea esp, [esp]
mov al, byte [edi + ecx + 0x38]
and al, 7
cmp al, dl
je 0x47d8f4
inc ecx
cmp ecx, 8
jb 0x47d8e0
xor eax, eax
jmp 0x47d8fc
movzx eax, byte [ecx + edi + 0x38]
shr eax, 3
add eax, edi
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x2d4]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov edx, dword [ebp - 0x21c]
mov esi, dword [esi]
test esi, esi
jne 0x47d876
mov ebx, dword [ebx]
test ebx, ebx
jne 0x47d840
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x518e10]
mov ebx, eax
mov dword [ebp - 0x2dc], ebx
test edi, edi
je 0x47d9cd
lea ebx, [ebx]
lea eax, [ebp - 8]
push eax
mov eax, dword [edi + 0x10]
push dword [edi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, dword [edi + 0x10]
movzx eax, byte [eax + 0x36]
push eax
push dword [edi + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [edi + 4], 0
je 0x47d9bc
mov ebx, dword [edi + 0x10]
test ebx, ebx
je 0x47d9b6
push 0x48
push 0
mov esi, ebx
push ebx
and esi, 0xffff0000
call fcn.0048f5e0
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 [ebp - 0x2dc]
mov esi, dword [edi]
push edi
call fcn.0048b08b
add esp, 4
mov edi, esi
test esi, esi
jne 0x47d950
cmp dword [ebp - 0x2d8], 0
mov dword [0x518e10], 0
je 0x47d9ee
cmp dword [0x518e08], 0
jne 0x47d9ee
call fcn.0047d5e0
call fcn.0047d280
mov edi, dword [0x518e00]
test edi, edi
je 0x47da19
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [edi + 4]
call ebx
mov esi, dword [edi]
push edi
call fcn.0048b08b
add esp, 4
mov edi, esi
test esi, esi
jne 0x47da03
mov ecx, dword [ebp - 4]
mov eax, dword [0x518e18]
xor ecx, ebp
pop edi
pop esi
mov dword [0x518e00], 0
mov dword [0x518e1c], 0
pop ebx
call fcn.0048b090
mov esp, ebp
pop ebp
ret