Function at 0x402240
Capabilities:
Create thread
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x4a9268
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x50
push esi
mov esi, ecx
mov dword [esp + 0x14], esi
call fcn.00402c80
test eax, eax
jne 0x402464
mov ecx, dword [esi + 0x14]
call fcn.00436940
test eax, eax
jne 0x402464
push ebx
lea eax, [esp + 0xc]
push ebp
push eax
push 4
xor ebx, ebx
push esi
push 0x402220
push ebx
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.MSVCRT.dll__beginthreadex]
mov ebp, eax
add esp, 0x18
cmp ebp, ebx
mov dword [esp + 0x18], ebp
je 0x40244f
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
mov dword [esp + 0x10], ebx
push 0x14
call esi
lea ecx, [esp + 0x10]
push ecx
push ebp
call edi
cmp dword [esp + 0x10], 0x103
jne 0x402443
inc ebx
cmp ebx, 0x32
jl 0x4022c2
push ebp
lea ecx, [esp + 0x28]
call fcn.004218b0
mov ecx, 0x4cf6f0
mov dword [esp + 0x68], 0
call fcn.004012f0
mov ecx, eax
call fcn.00435b00
mov edi, eax
lea ecx, [esp + 0x24]
add edi, 4
call fcn.00421e20
mov ebx, dword [edi]
mov esi, eax
mov eax, dword [esi]
cmp eax, ebx
je 0x4023c8
mov ecx, dword [eax - 0xc]
lea edx, [eax - 0xc]
test ecx, ecx
mov dword [esp + 0x18], edx
jge 0x40233e
lea edx, [eax - 0xc]
cmp edx, dword [0x4c0084]
jne 0x402344
mov edx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jge 0x40238c
mov edi, dword [ebx - 8]
cmp ecx, 1
jg 0x402351
cmp edi, dword [eax - 4]
jle 0x402364
mov ecx, esi
call fcn.00404ac0
push edi
mov ecx, esi
call fcn.00404720
test eax, eax
je 0x4023c8
mov ecx, dword [esi]
lea ebp, [edi + edi]
push ebp
lea eax, [edi + edi + 2]
push ebx
push eax
push ecx
call fcn.004039f0
mov edx, dword [esi]
add esp, 0x10
mov dword [edx - 8], edi
mov eax, dword [esi]
mov word [eax + ebp], 0
mov ebp, dword [esp + 0x1c]
jmp 0x4023c8
mov ecx, dword [0x4c0084]
add eax, 0xfffffff4
cmp eax, ecx
je 0x4023ba
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x4023b2
mov eax, dword [esi]
sub eax, 0xc
push eax
call fcn.0049c000
add esp, 4
mov ecx, dword [0x4c0080]
mov dword [esi], ecx
mov edi, dword [edi]
mov dword [esi], edi
add edi, 0xfffffff4
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
push 0xec54
lea ecx, [esp + 0x28]
call fcn.00421e40
call dword [sym.imp.USER32.dll_GetActiveWindow]
lea edx, [esp + 0x24]
mov esi, eax
mov dword [esp + 0x2c], edx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x4cf794
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4cf7c8]
lea ecx, [esp + 0x2c]
push 0x4cf794
mov dword [esp + 0x38], eax
mov dword [0x4cf7c8], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x4cf768]
push 0
push 0x404ee0
push esi
push 0xcd
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
lea ecx, [esp + 0x24]
mov dword [esp + 0x68], 0xffffffff
call fcn.00421970
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x20]
pop edi
mov eax, dword [esi + 0x20]
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x50]
mov dword fs:[0], ecx
add esp, 0x5c
ret
mov ecx, esi
call fcn.00401d40
mov ecx, dword [esp + 0x54]
pop esi
mov dword fs:[0], ecx
add esp, 0x5c
ret