Function at 0x52b670
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x300
mov eax, dword [0x589c40]
xor eax, ebp
mov dword [ebp - 0x18], eax
cmp dword [ebp + 8], 0
je 0x52b694
mov eax, dword [ebp + 8]
mov ecx, dword [0x591988]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x591980], eax
je 0x52b6ac
mov eax, 0x10dd
jmp 0x52ba29
cmp dword [0x591984], 0
je 0x52b6c4
call fcn.0052b4b0
mov eax, dword [0x591984]
jmp 0x52ba29
mov dword [ebp - 4], 0
mov edx, dword [0x591990]
mov dword [ebp - 0x10], edx
jmp 0x52b6de
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 0
je 0x52b76d
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x52b725
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
movzx edx, byte [ecx + 0x36]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
add ecx, 0x20
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xc]
push eax
call fcn.005177b0
add esp, 0xc
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 8]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
mov dword [edx], ecx
jmp 0x52b768
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
mov ecx, dword [eax + 0x44]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xc]
push eax
call fcn.0052ba40
add esp, 8
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x40]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0052ba80
add esp, 8
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x10]
mov dword [eax], edx
jmp 0x52b6d6
mov eax, dword [0x59198c]
mov dword [ebp - 0xc], eax
jmp 0x52b77f
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0
je 0x52b8d3
mov dword [ebp - 0x2e8], 0x10001
lea eax, [ebp - 0x2e8]
push eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x52b8ce
mov eax, dword [0x591990]
mov dword [ebp - 0x2ec], eax
jmp 0x52b7ca
mov ecx, dword [ebp - 0x2ec]
mov edx, dword [ecx]
mov dword [ebp - 0x2ec], edx
cmp dword [ebp - 0x2ec], 0
je 0x52b8ce
mov eax, dword [ebp - 0x2ec]
cmp dword [eax + 4], 0
je 0x52b852
mov ecx, dword [ebp - 0x2ec]
mov edx, dword [ebp - 0x230]
cmp edx, dword [ecx + 0x10]
jb 0x52b850
mov eax, dword [ebp - 0x2ec]
mov ecx, dword [eax + 0x10]
add ecx, 4
cmp dword [ebp - 0x230], ecx
jae 0x52b850
mov edx, dword [ebp - 0x2ec]
mov eax, dword [ebp - 0x230]
sub eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x2ec]
mov edx, dword [ecx + 0x10]
push edx
call fcn.0052bbb0
add esp, 8
movzx eax, al
mov ecx, dword [ebp - 0x2ec]
add eax, dword [ecx + 0xc]
mov dword [ebp - 0x230], eax
lea edx, [ebp - 0x2e8]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x52b8c9
mov edx, dword [ebp - 0x2ec]
mov eax, dword [ebp - 0x230]
cmp eax, dword [edx + 0xc]
jb 0x52b8c9
mov ecx, dword [ebp - 0x2ec]
mov edx, dword [ecx + 0x10]
movzx eax, byte [edx + 0x36]
mov ecx, dword [ebp - 0x2ec]
add eax, dword [ecx + 0xc]
cmp dword [ebp - 0x230], eax
jae 0x52b8c9
mov edx, dword [ebp - 0x2ec]
mov eax, dword [ebp - 0x230]
sub eax, dword [edx + 0xc]
movzx ecx, al
push ecx
mov edx, dword [ebp - 0x2ec]
mov eax, dword [edx + 0x10]
push eax
call fcn.0052bc00
add esp, 8
mov ecx, dword [ebp - 0x2ec]
add eax, dword [ecx + 0x10]
mov dword [ebp - 0x230], eax
lea edx, [ebp - 0x2e8]
push edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
jmp 0x52b7bc
jmp 0x52b777
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 8], eax
mov edx, dword [0x591990]
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
je 0x52b994
lea eax, [ebp - 0x2f4]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x14]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x10]
movzx edx, byte [ecx + 0x36]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x10]
movzx ecx, byte [eax + 0x36]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov edx, dword [ebp - 0x10]
cmp dword [edx + 4], 0
je 0x52b963
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x10], 0
je 0x52b963
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x10]
push edx
call fcn.0052b620
add esp, 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x10], 0
mov dword [ebp - 4], 1
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
mov dword [ebp - 0x2f0], edx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2fc], eax
mov ecx, dword [ebp - 0x2fc]
push ecx
call fcn.00413b6b
add esp, 4
mov edx, dword [ebp - 0x2f0]
mov dword [ebp - 0x10], edx
jmp 0x52b8e5
mov dword [0x591990], 0
cmp dword [ebp - 4], 0
je 0x52b9b2
cmp dword [0x59197c], 0
jne 0x52b9b2
call fcn.0052bab0
call fcn.0052b5c0
mov eax, dword [0x59198c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x52ba00
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax]
mov dword [ebp - 0x2f8], ecx
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x300], edx
mov eax, dword [ebp - 0x300]
push eax
call fcn.00413b6b
add esp, 4
mov ecx, dword [ebp - 0x2f8]
mov dword [ebp - 0xc], ecx
jmp 0x52b9bf
mov dword [0x59198c], 0
mov dword [0x591980], 0
cmp dword [ebp + 8], 0
je 0x52ba24
mov edx, dword [ebp + 8]
mov eax, dword [0x591988]
mov dword [edx], eax
mov eax, dword [0x591984]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.005121e3
mov esp, ebp
pop ebp
ret 4