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

Disassembly:
sub esp, 0x7c
mov eax, dword [0x43d504]
xor eax, esp
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x84]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x90]
xor ebx, ebx
lea ecx, [esp + 0x11]
mov dword [esp + 0x3c], edi
mov dword [esp + 0x48], eax
mov dword [esp + 0x84], 7
mov dword [esp + 0x80], ebx
mov word [esp + 0x70], bx
call fcn.00411be0
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x15]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov byte [esp + 0x17], bl
mov byte [esp + 0x16], bl
call fcn.004120c0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40f4b0
mov ecx, dword [esp + 0x20]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40f4b0
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x15]
call fcn.004121c0
mov ebp, dword [esp + 0x2c]
cmp ebp, ebx
je 0x40f4e6
mov ecx, dword [esp + 0x30]
sub ecx, ebp
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40f4e6
mov byte [esp + 0x12], 1
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x14], ebx
mov edi, edi
mov esi, dword [esp + 0x1c]
cmp esi, ebx
je 0x40f751
mov edi, dword [esp + 0x20]
mov ecx, edi
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
mov ecx, dword [esp + 0x4c]
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ecx, eax
jae 0x40f71c
mov ecx, dword [esp + 0x14]
add esi, ecx
mov dword [esp + 0x38], esi
xor esi, esi
mov dword [esp + 0x44], esi
test ebp, ebp
mov dword [esp + 0x40], ebx
je 0x40f5f2
mov ecx, dword [esp + 0x30]
sub ecx, ebp
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jae 0x40f5f2
cmp dword [ebx + ebp + 0x18], 8
mov edi, dword [ebx + ebp + 0x14]
jb 0x40f571
mov eax, dword [ebx + ebp + 4]
jmp 0x40f575
lea eax, [ebx + ebp + 4]
mov edx, dword [esp + 0x38]
mov esi, dword [edx + 0x14]
mov ecx, edx
mov ecx, dword [ecx + 0x14]
cmp ecx, esi
jae 0x40f587
mov esi, ecx
cmp esi, edi
mov edx, esi
jb 0x40f58f
mov edx, edi
mov ecx, dword [esp + 0x38]
cmp dword [ecx + 0x18], 8
jb 0x40f59e
mov ecx, dword [ecx + 4]
jmp 0x40f5a1
add ecx, 4
test edx, edx
jbe 0x40f5bc
mov bx, word [ecx]
cmp bx, word [eax]
jne 0x40f5dc
add ecx, 2
add eax, 2
sub edx, 1
jne 0x40f5a5
mov ebx, dword [esp + 0x40]
cmp esi, edi
jb 0x40f5cb
xor eax, eax
cmp esi, edi
setne al
test eax, eax
je 0x40f607
add dword [esp + 0x44], 1
mov esi, dword [esp + 0x44]
add ebx, 0x1c
jmp 0x40f533
mov dx, bx
cmp dx, word [eax]
sbb eax, eax
and eax, 0xfffffffe
add eax, 1
je 0x40f5b8
mov ebx, dword [esp + 0x40]
jmp 0x40f5c7
add dword [esp + 0x4c], 1
add dword [esp + 0x14], 0x1c
mov edi, dword [esp + 0x3c]
xor ebx, ebx
jmp 0x40f4f0
mov eax, dword [esp + 0x38]
push 0xffffffffffffffff
push 0
push eax
lea ecx, [esp + 0x78]
call fcn.0040176b
mov ebp, dword [esp + 0x3c]
xor ebx, ebx
push 0xffffffffffffffff
push ebx
lea ecx, [esp + 0x74]
push ecx
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov ecx, ebp
mov word [ebp + 4], bx
call fcn.0040176b
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40f685
mov edi, dword [esp + 0x30]
cmp eax, edi
je 0x40f67c
lea esi, [eax + 0x18]
nop
cmp dword [esi], 8
jb 0x40f661
mov edx, dword [esi - 0x14]
push edx
call fcn.004192f0
add esp, 4
mov dword [esi], 7
mov dword [esi - 4], ebx
mov word [esi - 0x14], bx
add esi, 0x1c
lea eax, [esi - 0x18]
cmp eax, edi
jne 0x40f650
mov eax, dword [esp + 0x2c]
push eax
call fcn.004192f0
add esp, 4
mov eax, dword [esp + 0x1c]
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
je 0x40f6d9
mov edi, dword [esp + 0x20]
cmp eax, edi
je 0x40f6d0
lea esi, [eax + 0x18]
cmp dword [esi], 8
jb 0x40f6b5
mov ecx, dword [esi - 0x14]
push ecx
call fcn.004192f0
add esp, 4
mov dword [esi], 7
mov dword [esi - 4], ebx
mov word [esi - 0x14], bx
add esi, 0x1c
lea edx, [esi - 0x18]
cmp edx, edi
jne 0x40f6a4
mov eax, dword [esp + 0x1c]
push eax
call fcn.004192f0
add esp, 4
lea ecx, [esp + 0x11]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call sub.ole32.dll_CoUninitialize
cmp dword [esp + 0x84], 8
jb 0x40f705
mov eax, dword [esp + 0x70]
push eax
call fcn.004192f0
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00419b4f
add esp, 0x7c
ret 8
sub edi, esi
mov eax, 0x92492493
imul edi
add edx, edi
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, ebx
je 0x40f74d
ja 0x40f740
call fcn.004196a6
mov esi, dword [esp + 0x1c]
push 0xffffffffffffffff
push ebx
push esi
lea ecx, [esp + 0x78]
call fcn.0040176b
mov edi, dword [esp + 0x3c]
cmp byte [esp + 0x13], 0
jne 0x40f797
cmp byte [esp + 0x12], 0
jne 0x40f797
cmp dword [esp + 0x80], ebx
jne 0x40f797
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.00409ca0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x78]
call fcn.0040176b
cmp dword [esp + 0x68], 8
jb 0x40f797
mov edx, dword [esp + 0x54]
push edx
call fcn.004192f0
add esp, 4
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x74]
mov dword [edi + 0x18], 7
mov dword [edi + 0x14], ebx
push eax
mov ecx, edi
mov word [edi + 4], bx
call fcn.0040176b
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40f7de
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push edx
push ecx
push eax
call fcn.00403c1b
mov edx, dword [esp + 0x3c]
push edx
call fcn.004192f0
add esp, 0x14
mov eax, dword [esp + 0x1c]
cmp eax, ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
je 0x40f814
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
call fcn.00403c1b
mov edx, dword [esp + 0x2c]
push edx
call fcn.004192f0
add esp, 0x14
lea ecx, [esp + 0x11]
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
call sub.ole32.dll_CoUninitialize
cmp dword [esp + 0x84], 8
jb 0x40f840
mov eax, dword [esp + 0x70]
push eax
call fcn.004192f0
add esp, 4
mov ecx, dword [esp + 0x88]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00419b4f
add esp, 0x7c
ret 8