Function at 0x4020d0
Capabilities:
Create thread
Resume thread

Disassembly:
push 0xffffffffffffffff
push 0x4afc48
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.00402b10
test eax, eax
jne 0x4022f4
mov ecx, dword [esi + 0x14]
call fcn.00437bf0
test eax, eax
jne 0x4022f4
push ebx
lea eax, [esp + 0xc]
push ebp
push eax
push 4
xor ebx, ebx
push esi
push 0x4020b0
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 0x4022df
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 0x4022d3
inc ebx
cmp ebx, 0x32
jl 0x402152
push ebp
lea ecx, [esp + 0x28]
call fcn.00422870
mov ecx, 0x4d7450
mov dword [esp + 0x68], 0
call fcn.00401320
mov ecx, eax
call fcn.00436dc0
mov edi, eax
lea ecx, [esp + 0x24]
add edi, 4
call fcn.00422de0
mov ebx, dword [edi]
mov esi, eax
mov eax, dword [esi]
cmp eax, ebx
je 0x402258
mov ecx, dword [eax - 0xc]
lea edx, [eax - 0xc]
test ecx, ecx
mov dword [esp + 0x18], edx
jge 0x4021ce
lea edx, [eax - 0xc]
cmp edx, dword [0x4c8084]
jne 0x4021d4
mov edx, dword [esp + 0x18]
cmp dword [ebx - 0xc], 0
jge 0x40221c
mov edi, dword [ebx - 8]
cmp ecx, 1
jg 0x4021e1
cmp edi, dword [eax - 4]
jle 0x4021f4
mov ecx, esi
call fcn.00405e10
push edi
mov ecx, esi
call fcn.00405a70
test eax, eax
je 0x402258
mov ecx, dword [esi]
lea ebp, [edi + edi]
push ebp
lea eax, [edi + edi + 2]
push ebx
push eax
push ecx
call fcn.00404530
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 0x402258
mov ecx, dword [0x4c8084]
add eax, 0xfffffff4
cmp eax, ecx
je 0x40224a
push edx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x402242
mov eax, dword [esi]
sub eax, 0xc
push eax
call fcn.0043b3d0
add esp, 4
mov ecx, dword [0x4c8080]
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.00422e00
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 0x4d7504
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4d7538]
lea ecx, [esp + 0x2c]
push 0x4d7504
mov dword [esp + 0x38], eax
mov dword [0x4d7538], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [0x4d74d8]
push 0
push 0x4060a0
push esi
push 0xcd
push eax
call dword [sym.imp.USER32.dll_DialogBoxParamW]
lea ecx, [esp + 0x24]
mov dword [esp + 0x68], 0xffffffff
call fcn.00422930
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.00401b60
mov ecx, dword [esp + 0x54]
pop esi
mov dword fs:[0], ecx
add esp, 0x5c
ret