Function at 0x409380
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 8], ebx
mov eax, dword [ebx + 4]
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x30], 1
mov dword [ebx + 0x34], 0
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], 1
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x90], 0xffffffff
mov dword [ebx + 0x94], 0xffffffff
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x50], 0
mov dword [ebx + 0x60], 0
mov dword [ebx + 0x64], 0
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
cmp eax, 0x20
jbe 0x40943d
mov eax, 0x20
mov dword [ebx + 0x54], eax
xor ecx, ecx
mov eax, dword [ebx]
mov dword [ebx + 0x58], 0
cmp eax, dword [ebx + 0x20]
je 0x4094cf
lea eax, [ebx + 0xd0]
mov dword [ebp - 0xc], eax
mov eax, 0x20
mov ebx, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x409493
mov dword [ebx], 0
mov eax, dword [ebx - 8]
mov edi, dword [ecx]
push ecx
mov eax, dword [eax + 0x14]
push eax
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4642a0]
call esi
add esp, 8
mov ecx, edi
test edi, edi
jne 0x409470
mov eax, dword [ebp - 4]
add ebx, 0x28
sub eax, 1
mov dword [ebp - 4], eax
jne 0x409464
mov ebx, dword [ebp - 8]
mov edx, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x58]
test edx, edx
je 0x4094ca
mov eax, dword [ebx + 0x14]
push edx
push eax
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x4642a0]
call esi
mov ecx, dword [ebx + 0x58]
add esp, 8
mov dword [ebx + 0x5c], 0
mov eax, dword [ebx]
mov dword [ebx + 0x20], eax
mov eax, dword [ebx + 0x10]
mov dword [ebx + 0x98], eax
lea eax, [ecx + 5]
lea eax, [eax + eax*4]
mov dword [ebx + 0x9c], 0
lea esi, [ebx + eax*8]
mov dword [ebx + 0xa0], 0
lea eax, [ecx + 1]
mov dword [ebx + 0xa4], 0
mov dword [ebx + 0xa8], 0
mov dword [ebx + 0xac], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x58], eax
mov eax, dword [esi + 0x20]
test eax, eax
je 0x409589
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x4095a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jne 0x409639
mov esi, 1
movzx esi, si
or esi, 0x80070000
test esi, esi
je 0x40955e
mov dword [ebx + 0x40], esi
cmp dword [ebx + 0x38], 0
jne 0x409577
cmp dword [ebx + 0x40], 0
jne 0x409577
cmp dword [ebx + 0x3c], 0
jne 0x409577
mov dword [ebx + 0x44], 0
mov eax, dword [ebx + 0x44]
neg eax
pop edi
sbb eax, eax
not eax
and eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x20], eax
test eax, eax
je 0x409627
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4095b6
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
jne 0x4095cf
jmp 0x409539
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 0x1c], eax
test eax, eax
je 0x409539
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x409539
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
je 0x409539
push esi
call fcn.00409140
mov esi, eax
test esi, esi
je 0x40955e
mov dword [ebx + 0x44], 0
lea edi, [ebx + 0xc8]
mov ebx, 0x20
mov ecx, edi
call fcn.00407d50
add edi, 0x28
sub ebx, 1
jne 0x409613
mov ebx, dword [ebp - 8]
jmp 0x409637
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x409549
test esi, esi
jg 0x40954e
jmp 0x409557