Function at 0x40f480
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 0x40f520
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 0x40f520
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 0x40f556
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 0x40f556
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 0x40f7c1
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 0x40f78c
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 0x40f662
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 0x40f662
cmp dword [ebx + ebp + 0x18], 8
mov edi, dword [ebx + ebp + 0x14]
jb 0x40f5e1
mov eax, dword [ebx + ebp + 4]
jmp 0x40f5e5
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 0x40f5f7
mov esi, ecx
cmp esi, edi
mov edx, esi
jb 0x40f5ff
mov edx, edi
mov ecx, dword [esp + 0x38]
cmp dword [ecx + 0x18], 8
jb 0x40f60e
mov ecx, dword [ecx + 4]
jmp 0x40f611
add ecx, 4
test edx, edx
jbe 0x40f62c
mov bx, word [ecx]
cmp bx, word [eax]
jne 0x40f64c
add ecx, 2
add eax, 2
sub edx, 1
jne 0x40f615
mov ebx, dword [esp + 0x40]
cmp esi, edi
jb 0x40f63b
xor eax, eax
cmp esi, edi
setne al
test eax, eax
je 0x40f677
add dword [esp + 0x44], 1
mov esi, dword [esp + 0x44]
add ebx, 0x1c
jmp 0x40f5a3
mov dx, bx
cmp dx, word [eax]
sbb eax, eax
and eax, 0xfffffffe
add eax, 1
je 0x40f628
mov ebx, dword [esp + 0x40]
jmp 0x40f637
add dword [esp + 0x4c], 1
add dword [esp + 0x14], 0x1c
mov edi, dword [esp + 0x3c]
xor ebx, ebx
jmp 0x40f560
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 0x40f6f5
mov edi, dword [esp + 0x30]
cmp eax, edi
je 0x40f6ec
lea esi, [eax + 0x18]
nop
cmp dword [esi], 8
jb 0x40f6d1
mov edx, dword [esi - 0x14]
push edx
call fcn.004192c0
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 0x40f6c0
mov eax, dword [esp + 0x2c]
push eax
call fcn.004192c0
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 0x40f749
mov edi, dword [esp + 0x20]
cmp eax, edi
je 0x40f740
lea esi, [eax + 0x18]
cmp dword [esi], 8
jb 0x40f725
mov ecx, dword [esi - 0x14]
push ecx
call fcn.004192c0
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 0x40f714
mov eax, dword [esp + 0x1c]
push eax
call fcn.004192c0
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 0x40f775
mov eax, dword [esp + 0x70]
push eax
call fcn.004192c0
add esp, 4
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
mov ecx, dword [esp + 0x78]
xor ecx, esp
call fcn.00419b1f
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 0x40f7bd
ja 0x40f7b0
call fcn.00419676
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 0x40f807
cmp byte [esp + 0x12], 0
jne 0x40f807
cmp dword [esp + 0x80], ebx
jne 0x40f807
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x4c]
call fcn.00409d10
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0x78]
call fcn.0040176b
cmp dword [esp + 0x68], 8
jb 0x40f807
mov edx, dword [esp + 0x54]
push edx
call fcn.004192c0
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 0x40f84e
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x34]
lea edx, [esp + 0x2c]
push edx
push ecx
push eax
call fcn.00403c1c
mov edx, dword [esp + 0x3c]
push edx
call fcn.004192c0
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 0x40f884
mov ecx, dword [esp + 0x48]
push ecx
mov ecx, dword [esp + 0x24]
lea edx, [esp + 0x1c]
push edx
push ecx
push eax
call fcn.00403c1c
mov edx, dword [esp + 0x2c]
push edx
call fcn.004192c0
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 0x40f8b0
mov eax, dword [esp + 0x70]
push eax
call fcn.004192c0
add esp, 4
mov ecx, dword [esp + 0x88]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00419b1f
add esp, 0x7c
ret 8