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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x513720]
xor eax, ebp
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x518530], eax
je 0x430af1
mov eax, 0x10dd
jmp 0x430d7f
cmp dword [0x518534], 0
je 0x430b04
call fcn.00430a09
jmp 0x430d7a
and dword [ebp - 0x2d8], 0
push ebx
push esi
mov esi, dword [0x518528]
push edi
jmp 0x430b78
cmp dword [esi + 4], 0
je 0x430b38
mov ecx, dword [esi + 0x10]
movzx eax, byte [ecx + 0x36]
push eax
lea eax, [ecx + 0x20]
push eax
push dword [esi + 0xc]
call fcn.004bdce0
mov eax, dword [esi + 0xc]
add esp, 0xc
jmp 0x430b71
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 0x430b6e
mov byte [edx], 0xcc
inc edx
inc ecx
cmp ecx, edi
jb 0x430b65
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 8]
mov dword [ecx], eax
mov esi, dword [esi]
test esi, esi
jne 0x430b16
mov edi, dword [0x51851c]
jmp 0x430c5c
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 0x430c5a
mov esi, dword [0x518528]
test esi, esi
je 0x430c5a
mov ecx, dword [ebp - 0x21c]
cmp dword [esi + 4], 0
je 0x430bfe
mov ebx, dword [esi + 0x10]
cmp ecx, ebx
jb 0x430c50
lea eax, [ebx + 4]
cmp ecx, eax
jae 0x430c50
mov al, bl
xor edx, edx
sub cl, al
mov al, byte [ebx + edx + 0x38]
shr al, 3
cmp al, cl
je 0x430bf0
inc edx
cmp edx, 8
jb 0x430bdb
xor al, al
jmp 0x430bf6
mov al, byte [edx + ebx + 0x38]
and al, 7
movzx eax, al
add eax, dword [esi + 0xc]
jmp 0x430c34
cmp ecx, dword [esi + 0xc]
jb 0x430c50
mov ebx, dword [esi + 0x10]
movzx eax, byte [ebx + 0x36]
add eax, dword [esi + 0xc]
cmp ecx, eax
jae 0x430c50
xor edx, edx
sub cl, byte [esi + 0xc]
mov al, byte [ebx + edx + 0x38]
and al, 7
cmp al, cl
je 0x430c2a
inc edx
cmp edx, 8
jb 0x430c16
xor eax, eax
jmp 0x430c32
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 0x430bbd
mov edi, dword [edi]
test edi, edi
jne 0x430b87
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov edi, dword [0x518528]
mov ebx, eax
test edi, edi
je 0x430ccf
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 0x430cc0
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x430cc0
call fcn.00430934
and dword [edi + 0x10], 0
mov dword [ebp - 0x2d8], 1
mov esi, dword [edi]
push edi
call fcn.004b9238
mov edi, esi
pop ecx
test esi, esi
jne 0x430c76
xor ebx, ebx
mov dword [0x518528], ebx
cmp dword [ebp - 0x2d8], ebx
je 0x430d44
cmp dword [0x518524], ebx
jne 0x430d44
mov ecx, dword [0x51852c]
mov esi, 0x51852c
jmp 0x430d40
cmp dword [ecx], 0x52727464
jne 0x430d3b
lea edi, [ecx + 0x10000]
mov eax, ebx
lea edx, [ecx + 0x88]
cmp dword [edx], ebx
je 0x430d16
cmp dword [edx], ecx
jb 0x430d3b
cmp dword [edx], edi
jae 0x430d3b
inc eax
add edx, 0x48
cmp eax, 0x38d
jb 0x430d0a
mov eax, dword [ecx + 4]
push 0x8000
push ebx
push ecx
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov dword [0x518520], ebx
jmp 0x430d3e
lea esi, [ecx + 4]
mov ecx, dword [esi]
test ecx, ecx
jne 0x430cf4
call fcn.00430659
mov edi, dword [0x51851c]
test edi, edi
je 0x430d6b
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [edi]
push edi
call fcn.004b9238
mov edi, esi
pop ecx
test esi, esi
jne 0x430d53
pop edi
pop esi
mov dword [0x51851c], ebx
mov dword [0x518530], ebx
pop ebx
mov eax, dword [0x518534]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b923d
mov esp, ebp
pop ebp
ret