Function at 0x4183c0
Capabilities:
Resume thread

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x2d4
push ebp
xor ebp, ebp
cmp eax, ebp
je 0x4183d9
mov ecx, dword [0x432228]
mov dword [eax], ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x432220], eax
je 0x4183f6
mov eax, 0x10dd
pop ebp
add esp, 0x2d4
ret 4
cmp dword [0x432224], ebp
je 0x418412
call fcn.004182e0
mov eax, dword [0x432224]
pop ebp
add esp, 0x2d4
ret 4
push ebx
push esi
mov esi, dword [0x432230]
cmp esi, ebp
push edi
je 0x4184d7
mov ebx, 0xd
cmp dword [esi + 4], ebp
je 0x41848f
mov eax, dword [esi + 0x10]
mov cl, byte [eax + 0x17]
xor edi, edi
test cl, cl
jbe 0x41846b
lea esp, [esp]
lea edx, [esp + 0x10]
push edx
push ebp
push eax
mov eax, dword [esi + 0xc]
add eax, edi
push eax
mov dword [esp + 0x20], ebp
call fcn.00418ba0
cmp dword [esp + 0x10], ebp
jne 0x41846b
mov ecx, dword [esi + 0x10]
mov edi, eax
sub edi, ecx
movzx ecx, byte [ecx + 0x17]
cmp edi, ecx
jl 0x418440
mov edx, dword [esi + 0x10]
movzx eax, byte [edx + 0x17]
cmp edi, eax
je 0x418485
mov ecx, dword [esi + 8]
mov dword [0x432224], ebx
mov dword [0x432228], ecx
mov edx, dword [esi + 8]
mov eax, dword [esi + 0xc]
mov dword [edx], eax
jmp 0x4184cd
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x10]
mov ecx, dword [ecx + 0x1c]
lea edx, [eax + 5]
mov byte [eax], 0xe9
sub ecx, edx
inc eax
mov dword [eax], ecx
mov edx, dword [esi + 0x10]
mov ecx, dword [edx + 0x18]
lea edi, [eax + 4]
cmp edi, ecx
jae 0x4184c5
sub ecx, edi
mov edx, ecx
shr ecx, 2
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
mov esi, dword [esi]
cmp esi, ebp
jne 0x418428
mov edi, dword [0x43222c]
cmp edi, ebp
je 0x418590
mov ebp, dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov ebx, dword [sym.imp.KERNEL32.dll_SetThreadContext]
mov eax, dword [edi + 4]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esp + 0x20], 0x10001
call ebp
test eax, eax
je 0x418584
mov esi, dword [0x432230]
test esi, esi
je 0x418584
mov eax, dword [esp + 0xd0]
lea esp, [esp]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x418543
mov ecx, dword [esi + 0x10]
cmp eax, ecx
jb 0x41857e
lea edx, [ecx + 4]
cmp eax, edx
jae 0x41857e
sub eax, ecx
mov dword [esp + 0xd0], eax
mov edx, dword [esi + 0xc]
jmp 0x418563
mov ecx, dword [esi + 0xc]
cmp eax, ecx
jb 0x41857e
mov edx, dword [esi + 0x10]
movzx edx, byte [edx + 0x17]
add edx, ecx
cmp eax, edx
jae 0x41857e
sub eax, ecx
mov dword [esp + 0xd0], eax
mov edx, dword [esi + 0x10]
mov ecx, dword [edi + 4]
add eax, edx
mov dword [esp + 0xd0], eax
lea eax, [esp + 0x18]
push eax
push ecx
call ebx
mov eax, dword [esp + 0xd0]
mov esi, dword [esi]
test esi, esi
jne 0x418520
mov edi, dword [edi]
test edi, edi
jne 0x4184f1
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [0x432230]
cmp esi, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov ebx, eax
je 0x41862c
lea esp, [esp]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x10]
push edx
movzx edx, byte [ecx + 0x17]
push eax
mov eax, dword [esi + 0xc]
push edx
push eax
call ebp
mov ecx, dword [esi + 0x10]
movzx edx, byte [ecx + 0x17]
mov eax, dword [esi + 0xc]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
mov eax, dword [esi + 4]
test eax, eax
je 0x41861b
mov eax, dword [esi + 0x10]
test eax, eax
je 0x41861b
mov ecx, eax
and ecx, 0xffff0000
xor edx, edx
mov edi, eax
mov dword [edi], edx
mov dword [edi + 4], edx
mov dword [edi + 8], edx
mov dword [edi + 0xc], edx
mov dword [edi + 0x10], edx
mov dword [edi + 0x14], edx
mov dword [edi + 0x18], edx
mov dword [edi + 0x1c], edx
mov edx, dword [ecx + 8]
mov dword [eax + 0x18], edx
mov dword [ecx + 8], eax
mov dword [esi + 0x10], 0
mov edi, dword [esi]
push esi
call fcn.00419648
add esp, 4
test edi, edi
mov esi, edi
jne 0x4185b0
mov esi, dword [0x432214]
xor ebx, ebx
cmp esi, ebx
mov dword [0x432230], ebx
je 0x418656
mov edi, edi
lea eax, [esp + 0x14]
push eax
push 0x20
push 0x10000
push esi
call ebp
mov esi, dword [esi + 4]
cmp esi, ebx
jne 0x418640
mov esi, dword [0x43222c]
cmp esi, ebx
je 0x41867d
mov ebp, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov ecx, dword [esi + 4]
push ecx
call ebp
mov edi, dword [esi]
push esi
call fcn.00419648
add esp, 4
cmp edi, ebx
mov esi, edi
jne 0x418666
mov eax, dword [esp + 0x2e8]
pop edi
pop esi
mov dword [0x43222c], ebx
mov dword [0x432220], ebx
cmp eax, ebx
pop ebx
je 0x41869f
mov edx, dword [0x432228]
mov dword [eax], edx
mov eax, dword [0x432224]
pop ebp
add esp, 0x2d4
ret 4