Function at 0x43ffac
Capabilities:
Hook routines via microsoft detours
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x543720]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x548f5c], eax
je 0x43ffd7
mov eax, 0x10dd
jmp 0x440265
cmp dword [0x548f60], 0
je 0x43ffea
call fcn.0043feef
jmp 0x440260
and dword [ebp - 0x2d8], 0
push ebx
push esi
mov esi, dword [0x548f50]
push edi
jmp 0x44005e
cmp dword [esi + 4], 0
je 0x44001e
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.004e4510
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x440057
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 edi, dword [eax + 0x40]
sub edi, edx
cmp edx, dword [eax + 0x40]
cmova edi, ebx
test edi, edi
je 0x440054
mov byte [edx], 0xcc
inc edx
inc ecx
cmp ecx, edi
jb 0x44004b
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x43fffc
mov edi, dword [0x548f44]
jmp 0x440142
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x2d4], 0x10001
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x440140
mov esi, dword [0x548f50]
test esi, esi
je 0x440140
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x4400e4
mov ebx, dword [esi + 0x10]
cmp ecx, ebx
jb 0x440136
lea eax, [ebx + 4]
cmp ecx, eax
jae 0x440136
mov al, bl
xor edx, edx
sub cl, al
mov al, byte [ebx + edx + 0x38]
shr al, 3
cmp al, cl
je 0x4400d6
inc edx
cmp edx, 8
jb 0x4400c1
xor al, al
jmp 0x4400dc
mov al, byte [edx + ebx + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x44011a
cmp ecx, dword [esi + 0xc]
jb 0x440136
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x440136
xor edx, edx
sub cl, byte [esi + 0xc]
mov al, byte [ebx + edx + 0x38]
and al, 7
cmp al, cl
je 0x440110
inc edx
cmp edx, 8
jb 0x4400fc
xor eax, eax
jmp 0x440118
movzx eax, byte [edx + ebx + 0x38]
shr eax, 3
add eax, ebx
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x2d4]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov ecx, dword [ebp - 0x21c]
mov esi, dword [esi]
test esi, esi
jne 0x4400a3
mov edi, dword [edi]
test edi, edi
jne 0x44006d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x548f50]
mov ebx, eax
test edi, edi
je 0x4401b5
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 0x4401a6
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x4401a6
call fcn.0043fe68
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push edi
call fcn.004e03e4
mov edi, esi
pop ecx
test esi, esi
jne 0x44015c
xor ebx, ebx
mov dword [0x548f50], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x44022a
cmp dword [0x548f48], ebx
jne 0x44022a
mov ecx, dword [0x548f54]
mov esi, 0x548f54
jmp 0x440226
cmp dword [ecx], 0x52727464
jne 0x440221
lea edi, [ecx + 0x10000]
mov eax, ebx
lea edx, [ecx + 0x88]
cmp dword [edx], ebx
je 0x4401fc
cmp dword [edx], ecx
jb 0x440221
cmp dword [edx], edi
jae 0x440221
inc eax
add edx, 0x48
cmp eax, 0x38d
jb 0x4401f0
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x548f4c], ebx
jmp 0x440224
lea esi, [ecx + 4]
mov ecx, dword [esi]
test ecx, ecx
jne 0x4401da
call fcn.0043fb8d
mov edi, dword [0x548f44]
test edi, edi
je 0x440251
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push edi
call fcn.004e03e4
mov edi, esi
pop ecx
test esi, esi
jne 0x440239
pop edi
pop esi
mov dword [0x548f44], ebx
mov dword [0x548f5c], ebx
pop ebx
mov eax, dword [0x548f60]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e03e9
mov esp, ebp
pop ebp
ret