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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6bc
push ebx
push esi
push edi
lea eax, [esp + 0x118]
mov byte [esp + 0xe], 0
mov byte [esp + 0xf], 1
call fcn.00419601
mov ebx, dword [esp + 0x15c]
lea eax, [esp + 0x378]
mov dword [esp + 0x34], eax
shr ebx, 1
lea eax, [esp + 0x27b]
and ebx, 1
mov dword [esp + 0x38], eax
lea eax, [esp + 0x53b]
xor edi, edi
mov dword [esp + 0x24], ebx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x18], edi
jmp 0x40bfd6
xor edi, edi
cmp byte [esp + 0xe], 0
jne 0x40c331
mov eax, dword [esp + 0x18]
mov eax, dword [esp + eax*4 + 0x34]
cmp byte [eax], 0
jne 0x40bff7
cmp dword [ebp + 8], edi
je 0x40c118
mov esi, dword [ebp + 8]
cmp esi, edi
cmove esi, eax
push esi
call fcn.004327cb
mov dword [esp + 0x1c], eax
call fcn.0043294a
mov dword [esp + 0x14], eax
cmp ebx, edi
je 0x40c031
call fcn.00419547
test eax, eax
je 0x40c031
push dword [esp + 0x14]
call fcn.0042c085
call fcn.0043213d
mov dword [esp + 0x14], eax
cmp dword [esp + 0x1c], edi
jne 0x40c048
push 0x401c9c
or eax, 0xffffffff
call fcn.0042c4e3
mov dword [esp + 0x1c], eax
lea esi, [esp + 0x40]
call fcn.00419146
mov eax, dword [0x43716c]
push dword [esp + 0x1c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], edi
lea esi, [esp + 0x14]
lea edi, [esp + 0x24]
mov dword [esp + 0x54], eax
mov dword [esp + 0x74], 0x12d000
mov dword [esp + 0x68], 3
call fcn.0041443e
cmp al, 1
jne 0x40c100
mov esi, dword [esp + 0x20]
test esi, esi
je 0x40c100
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40c100
and dword [esp + 0x10], 0
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
push eax
lea edi, [esp + 0x48]
mov dword [esp + 0x64], esi
call fcn.0042f4b8
test al, al
je 0x40c0eb
xor eax, eax
cmp dword [ebp + 8], eax
lea ebx, [esp + 0x28]
setne al
push eax
call fcn.0040be9d
test al, al
je 0x40c0de
mov byte [esp + 0xe], 1
push dword [esp + 0x28]
call fcn.0042c085
mov ebx, dword [esp + 0x24]
cmp dword [esp + 0x10], 0x194
je 0x40c0fa
mov byte [esp + 0xf], 0
push esi
call fcn.0042c085
push dword [esp + 0x14]
call fcn.0042c085
push dword [esp + 0x1c]
call fcn.0042c085
cmp dword [ebp + 8], 0
jne 0x40c127
inc dword [esp + 0x18]
cmp dword [esp + 0x18], 3
jb 0x40bfd4
cmp byte [esp + 0xe], 0
jne 0x40c331
cmp dword [ebp + 8], 0
jne 0x40c331
call fcn.0040bcb4
mov esi, eax
test esi, esi
je 0x40c331
push 0x10000000
push 0x4e24
push esi
lea ebx, [esp + 0x1c]
call fcn.00433cd5
mov edi, eax
push esi
mov dword [esp + 0x34], edi
call fcn.0042c085
mov ecx, dword [esp + 0x10]
mov eax, edi
call fcn.0042d05d
test al, al
je 0x40c328
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x14]
push 1
call fcn.0042d09b
test eax, eax
jne 0x40c1db
call fcn.0042c187
mov esi, eax
lea eax, [esp + 0x78]
push eax
xor bl, bl
call fcn.004223a9
cmp al, 1
jne 0x40c1db
mov eax, esi
sub eax, dword [esp + 0xf8]
cmp eax, 0x15180
jbe 0x40c1c1
mov dword [esp + 0xf8], esi
jmp 0x40c1c9
cmp eax, 0x1c20
setb bl
lea eax, [esp + 0x78]
push eax
call fcn.00422401
test bl, bl
jne 0x40c328
push 0x2710
push dword [0x43716c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40c328
push dword [esp + 0x14]
call fcn.004327cb
mov esi, dword [esp + 0x14]
mov dword [esp + 0x1c], eax
call fcn.0043294a
xor ebx, ebx
mov dword [esp + 0x18], eax
cmp dword [esp + 0x24], ebx
je 0x40c234
call fcn.00419547
test eax, eax
je 0x40c234
push dword [esp + 0x18]
call fcn.0042c085
call fcn.0043213d
mov dword [esp + 0x18], eax
cmp dword [esp + 0x1c], ebx
jne 0x40c24b
push 0x401c9c
or eax, 0xffffffff
call fcn.0042c4e3
mov dword [esp + 0x1c], eax
lea esi, [esp + 0x40]
call fcn.00419146
mov eax, dword [0x43716c]
push dword [esp + 0x1c]
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x1c]
lea esi, [esp + 0x24]
lea edi, [esp + 0x14]
mov dword [esp + 0x54], eax
mov dword [esp + 0x74], 0x12d000
mov dword [esp + 0x68], 3
mov dword [esp + 0x14], ebx
mov dword [esp + 0x24], ebx
call fcn.0041443e
cmp al, 1
jne 0x40c2f8
mov esi, dword [esp + 0x10]
cmp esi, ebx
je 0x40c2f8
mov eax, dword [esp + 0x20]
cmp eax, ebx
jbe 0x40c2f8
mov dword [esp + 0x60], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x2c]
push eax
lea edi, [esp + 0x48]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x64], esi
call fcn.0042f4b8
test al, al
je 0x40c2e3
push ebx
lea ebx, [esp + 0x2c]
call fcn.0040be9d
test al, al
je 0x40c2d8
mov byte [esp + 0xe], 1
push dword [esp + 0x28]
call fcn.0042c085
xor ebx, ebx
cmp dword [esp + 0x10], 0x194
je 0x40c2f2
mov byte [esp + 0xf], 0
push esi
call fcn.0042c085
push dword [esp + 0x18]
call fcn.0042c085
push dword [esp + 0x1c]
call fcn.0042c085
cmp byte [esp + 0xe], 0
jne 0x40c328
mov eax, dword [esp + 0x14]
push 1
call fcn.0042d09b
mov dword [esp + 0x14], eax
cmp eax, ebx
jne 0x40c182
push dword [esp + 0x30]
call fcn.0042c085
cmp byte [esp + 0xf], 0
je 0x40c345
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40c345
mov dword [eax], 0x194
mov al, byte [esp + 0xe]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8