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

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, ecx
mov ecx, 0x20
mov eax, dword [edi + 4]
cmp eax, ecx
mov dword [edi + 0x78], 0
cmova eax, ecx
mov dword [edi + 0x7c], 0
mov dword [edi + 0x54], eax
mov eax, dword [edi]
mov dword [edi + 0x30], 1
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
mov dword [edi + 0x40], 0
mov dword [edi + 0x44], 1
mov dword [edi + 0x70], 0
mov dword [edi + 0x88], 0
mov dword [edi + 0x90], 0xffffffff
mov dword [edi + 0x94], 0xffffffff
mov dword [edi + 0x68], 0
mov dword [edi + 0x6c], 0
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
mov dword [edi + 0x60], 0
mov dword [edi + 0x64], 0
mov dword [edi + 0x80], 0
mov dword [edi + 0x84], 0
mov dword [edi + 0x58], 0
cmp eax, dword [edi + 0x20]
je 0x407c52
mov eax, ecx
lea ebx, [edi + 0xd0]
mov dword [ebp - 4], eax
mov ecx, dword [ebx]
test ecx, ecx
je 0x407c2a
mov dword [ebx], 0
mov eax, dword [ebx - 8]
mov esi, dword [ecx]
push ecx
mov eax, dword [eax + 0x14]
push eax
mov eax, dword [eax + 4]
call eax
mov ecx, esi
test esi, esi
jne 0x407c12
mov eax, dword [ebp - 4]
add ebx, 0x28
sub eax, 1
mov dword [ebp - 4], eax
jne 0x407c06
mov ecx, dword [edi + 0x5c]
test ecx, ecx
je 0x407c4d
mov eax, dword [edi + 0x14]
push ecx
push eax
mov eax, dword [eax + 4]
call eax
mov dword [edi + 0x5c], 0
mov eax, dword [edi]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 0x10]
mov dword [edi + 0x98], eax
mov dword [edi + 0x9c], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0xa4], 0
mov dword [edi + 0xa8], 0
mov dword [edi + 0xac], 0
mov ecx, dword [edi + 0x58]
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
lea eax, [ecx + 5]
lea eax, [eax + eax*4]
lea esi, [edi + eax*8]
lea eax, [ecx + 1]
mov ecx, esi
mov dword [edi + 0x58], eax
call fcn.00406bd0
mov ecx, eax
test ecx, ecx
jne 0x407dcd
push dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x407ce5
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x407dcd
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x407d06
call ebx
test eax, eax
mov ecx, 1
cmovne ecx, eax
test ecx, ecx
jne 0x407dcd
push esi
call fcn.00407a70
mov ecx, eax
mov dword [ebp - 8], ecx
test ecx, ecx
je 0x407ddf
mov dword [edi + 0x44], 0
lea esi, [edi + 0xe0]
mov dword [ebp - 4], 0x20
nop dword [eax]
cmp dword [esi], 0
je 0x407d80
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x407d44
call ebx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
test eax, eax
jne 0x407d53
call ebx
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x407d64
call ebx
mov eax, dword [esi]
test eax, eax
je 0x407d80
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
test eax, eax
jne 0x407d7a
call ebx
jmp 0x407d80
mov dword [esi], 0
mov eax, dword [esi + 4]
test eax, eax
je 0x407d9d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x407d96
call ebx
jmp 0x407d9d
mov dword [esi + 4], 0
mov eax, dword [esi + 8]
test eax, eax
je 0x407dbb
push eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
test eax, eax
jne 0x407db4
call ebx
jmp 0x407dbb
mov dword [esi + 8], 0
add esi, 0x28
sub dword [ebp - 4], 1
jne 0x407d30
mov ecx, dword [ebp - 8]
test ecx, ecx
jle 0x407dd8
movzx ecx, cx
or ecx, 0x80070000
test ecx, ecx
je 0x407ddf
mov dword [edi + 0x40], ecx
cmp dword [edi + 0x38], 0
jne 0x407df8
cmp dword [edi + 0x40], 0
jne 0x407df8
cmp dword [edi + 0x3c], 0
jne 0x407df8
mov dword [edi + 0x44], 0
xor eax, eax
cmp dword [edi + 0x44], eax
pop edi
cmovne ecx, eax
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret