Function at 0x4126c9
Capabilities:
Create thread

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebp, dword [esp + 0x40]
push esi
mov esi, ecx
push edi
xor edi, edi
lea edx, [esp + 0x10]
mov ecx, dword [esi + 0x8e0]
mov dword [esp + 0x10], edi
push edx
push ebp
mov eax, dword [ecx]
mov dword [esp + 0x1c], 1
call dword [eax + 0x10]
test eax, eax
jl 0x412914
mov eax, dword [esp + 0x10]
cmp eax, edi
je 0x412914
cmp dword [eax + 0x18], edi
jne 0x412728
mov eax, dword [esp + 0x4c]
mov ecx, esi
neg eax
sbb eax, eax
and eax, 2
push eax
push edi
push edi
push ebp
call fcn.00466dfd
mov ecx, eax
call fcn.0040cad0
mov dword [esp + 0x14], edi
jmp 0x41272b
mov dword [eax + 0x18], edi
push ebp
mov ecx, esi
call fcn.00466dfd
mov ecx, eax
call fcn.0040d4f0
mov ecx, dword [esi + 0x1f44]
cmp ecx, edi
je 0x412863
mov ebx, ebp
xor edx, edx
shr ebx, 4
mov eax, ebx
div dword [esi + 0x1f48]
mov edx, dword [ecx + edx*4]
cmp edx, edi
je 0x412863
cmp dword [edx + 8], ebp
je 0x412772
mov edx, dword [edx]
cmp edx, edi
jne 0x412762
jmp 0x412863
cmp edx, edi
je 0x412863
mov edi, dword [edx + 0xc]
test edi, edi
je 0x4127b5
mov ecx, dword [edi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [edi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [edi + 4]
test eax, eax
je 0x4127ac
push eax
call fcn.00458a71
add esp, 4
mov dword [edi + 4], 0
push edi
call fcn.00458a71
add esp, 4
mov ecx, dword [esi + 0x1f44]
test ecx, ecx
je 0x412863
mov eax, ebx
xor edx, edx
div dword [esi + 0x1f48]
mov eax, dword [ecx + edx*4]
test eax, eax
lea ecx, [ecx + edx*4]
je 0x412863
cmp dword [eax + 8], ebp
je 0x4127ea
mov ecx, eax
mov eax, dword [eax]
test eax, eax
jne 0x4127db
jmp 0x412863
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, dword [esi + 0x1f50]
mov dword [eax], ecx
mov dword [esi + 0x1f50], eax
mov eax, dword [esi + 0x1f4c]
dec eax
mov dword [esi + 0x1f4c], eax
jne 0x412863
mov ebx, dword [esi + 0x1f44]
xor edi, edi
cmp ebx, edi
je 0x412837
mov eax, dword [esi + 0x1f48]
cmp eax, edi
jbe 0x412837
mov ecx, ebx
mov edx, eax
mov eax, dword [ecx]
cmp eax, edi
je 0x412831
mov eax, dword [eax]
cmp eax, edi
jne 0x41282b
add ecx, 4
dec edx
jne 0x412825
push ebx
call fcn.00458a71
mov ecx, dword [esi + 0x1f54]
add esp, 4
mov dword [esi + 0x1f44], edi
mov dword [esi + 0x1f4c], edi
mov dword [esi + 0x1f50], edi
call fcn.00453470
mov dword [esi + 0x1f54], edi
xor edx, edx
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x18]
mov dword [esp + 0x20], edx
push ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], edx
push edx
lea edx, [esp + 0x24]
mov dword [esp + 0x24], esi
push edx
push 0x417730
push 0
push 0
mov dword [esp + 0x38], ebp
mov dword [esp + 0x3c], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
push 1
mov ebx, eax
push 0
push 0
lea eax, [esp + 0x34]
push 0
push eax
mov dword [esp + 0x28], ebx
call edi
test eax, eax
je 0x4128ef
mov ebx, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebp, dword [sym.imp.USER32.dll_DispatchMessageW]
lea ecx, [esp + 0x28]
push ecx
call ebx
lea edx, [esp + 0x28]
push edx
call ebp
push 1
push 0
push 0
lea eax, [esp + 0x34]
push 0
push eax
call edi
test eax, eax
jne 0x4128c6
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x48]
test ebx, ebx
jne 0x412901
mov ecx, dword [esi + 0x8e0]
push ebp
mov edx, dword [ecx]
call dword [edx + 0xc]
jmp 0x412914
push 0x7530
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x4c]
test eax, eax
jne 0x41293e
mov eax, dword [0x4b1d28]
test eax, eax
je 0x41293e
push 1
push ebp
mov ecx, esi
call fcn.00466dfd
mov ecx, eax
call fcn.0040bcd0
push ebp
mov ecx, esi
call fcn.00417570
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x34
ret 8