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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x218
mov eax, dword [0x49f008]
xor eax, esp
mov dword [esp + 0x214], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x2c], ecx
mov ecx, dword [ebp + 0x18]
mov dword [esp + 0x24], ecx
mov ecx, edx
and ecx, 0x10
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], ecx
mov ecx, edx
and ecx, 8
mov dword [eax + 8], 0xffffffff
mov dword [esp + 0xc], ecx
mov ecx, edx
and ecx, 4
push esi
mov esi, dword [ebp + 0xc]
mov dword [esp + 0x14], ecx
mov ecx, edx
push edi
and ecx, 2
mov dword [esp + 0x38], esi
xor edi, edi
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ecx
test esi, esi
jne 0x40f5b1
lea edx, [esp + 0x110]
call fcn.0040f2a0
test eax, eax
jne 0x40f91f
lea eax, [esp + 0x110]
mov dword [esp + 0x1c], eax
jmp 0x40f5b3
mov eax, esi
mov ecx, eax
call fcn.0040f190
mov ecx, eax
mov dword [esp + 0xc], ecx
test ecx, ecx
jne 0x40f5dd
mov eax, 0xc0a
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0047540c
mov esp, ebp
pop ebp
ret
mov eax, dword [0x4a1b48]
test eax, eax
jne 0x40f610
lea eax, [esp + 0x78]
mov dword [esp + 0x78], 0x94
push eax
call dword [0x49fbc0]
mov ecx, dword [esp + 0xc]
xor eax, eax
cmp dword [esp + 0x88], 2
sete al
inc eax
mov dword [0x4a1b48], eax
cmp eax, 2
jne 0x40f674
xorps xmm0, xmm0
xor esi, esi
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x50], xmm0
mov dword [esp + 0x60], esi
lea eax, [esp + 0x40]
push eax
push 0
push ecx
call dword [0x49fb30]
test eax, eax
jne 0x40f66e
call dword [0x49fb60]
cmp esi, dword [0x49fa2c]
jge 0x40f6a9
cmp eax, 5
je 0x40f657
cmp eax, 0x21
je 0x40f657
cmp eax, 0x20
jne 0x40f6a9
inc esi
mov eax, esi
imul eax, dword [0x49fdc4]
push eax
call dword [0x49fca4]
mov ecx, dword [esp + 0xc]
jmp 0x40f628
mov eax, dword [esp + 0x40]
jmp 0x40f67b
push ecx
call dword [0x49fb18]
cmp eax, 0xffffffff
je 0x40f6a9
test al, 0x10
je 0x40f6a9
push dword [esp + 0xc]
call fcn.00409d50
add esp, 4
mov eax, 0x20e
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0047540c
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0x20], edi
mov eax, 0xc0000000
mov ecx, 0x80000000
cmove eax, ecx
mov dword [esp + 0x24], eax
cmp dword [esp + 0x28], edi
je 0x40f6cf
mov esi, 1
mov dword [esp + 0x10], esi
jmp 0x40f6e1
xor eax, eax
cmp dword [esp + 0x18], eax
setne al
add eax, 3
mov dword [esp + 0x10], eax
mov esi, eax
cmp dword [esp + 0x14], edi
mov ecx, 0x80
mov eax, 0x4000102
cmove eax, ecx
mov dword [esp + 0x14], eax
call fcn.0040d820
test eax, eax
je 0x40f760
nop
push 0
push dword [esp + 0x18]
push esi
push 0
push 3
push dword [esp + 0x38]
push dword [esp + 0x24]
call dword [0x49fa70]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x40f7b8
call dword [0x49fb60]
mov esi, eax
cmp edi, dword [0x49fa2c]
jge 0x40f7bc
cmp esi, 5
je 0x40f749
cmp esi, 0x21
je 0x40f749
cmp esi, 0x20
jne 0x40f7bc
inc edi
mov eax, edi
imul eax, dword [0x49fdc4]
push eax
call dword [0x49fca4]
mov esi, dword [esp + 0x10]
jmp 0x40f700
push 0
push dword [esp + 0x18]
push esi
push 0
push 3
push dword [esp + 0x38]
push dword [esp + 0x24]
call dword [0x49fa64]
mov dword [esp + 0x18], eax
cmp eax, 0xffffffff
jne 0x40f7b8
call dword [0x49fb60]
mov esi, eax
cmp edi, dword [0x49fa2c]
jge 0x40f7bc
cmp esi, 5
je 0x40f7a1
cmp esi, 0x21
je 0x40f7a1
cmp esi, 0x20
jne 0x40f7bc
inc edi
mov eax, edi
imul eax, dword [0x49fdc4]
push eax
call dword [0x49fca4]
mov esi, dword [esp + 0x10]
jmp 0x40f760
mov esi, dword [esp + 0x3c]
test edi, edi
je 0x40f7e2
lea eax, [edi + 1]
imul eax, dword [0x49fdc4]
imul eax, edi
cdq
sub eax, edx
sar eax, 1
push eax
push str.delayed__dms_for_lock_sharing_conflict
push 0xa
call fcn.0040b7f0
add esp, 0xc
mov ecx, dword [esp + 0x18]
cmp ecx, 0xffffffff
jne 0x40f896
mov edi, dword [esp + 0x30]
mov edx, esi
mov ecx, dword [esp + 0x1c]
push 0x8336
push ecx
push str.winOpen
mov ecx, 0xe
mov dword [edi + 0x14], esi
call fcn.0040db50
add esp, 0xc
push dword [esp + 0xc]
call fcn.00409d50
add esp, 4
cmp dword [esp + 0x20], 0
je 0x40f864
cmp dword [esp + 0x28], 0
jne 0x40f864
mov eax, dword [ebp + 0x14]
mov edx, dword [esp + 0x2c]
and eax, 0xfffffff9
mov ecx, dword [esp + 0x38]
or eax, 1
push edx
push eax
mov eax, dword [esp + 0x3c]
push edi
push ecx
push eax
call fcn.0040f520
add esp, 0x14
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0047540c
mov esp, ebp
pop ebp
ret
push 0x4963c4
push 0x833c
push str.cannot_open_file_at_line__d_of___.10s_
push 0xe
call fcn.0040b7f0
add esp, 0x10
mov eax, 0xe
pop edi
pop esi
mov ecx, dword [esp + 0x214]
xor ecx, esp
call fcn.0047540c
mov esp, ebp
pop ebp
ret
mov edx, dword [esp + 0x2c]
test edx, edx
je 0x40f8aa
xor eax, eax
cmp dword [esp + 0x20], eax
setne al
inc eax
mov dword [edx], eax
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x20], 0
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0x38]
mov dword [esi], 0x4976d8
mov dword [esi + 0x14], 0
mov dword [esi + 4], eax
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], ecx
call fcn.00469100
test eax, eax
je 0x40f90d
push 1
mov edx, 1
mov ecx, eax
call fcn.0044ba30
xor ecx, ecx
add esp, 4
test al, al
setne cl
test ecx, ecx
je 0x40f911
or byte [esi + 0x10], 0x10
push dword [esp + 0xc]
call fcn.00409d50
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
xor ecx, esp
call fcn.0047540c
mov esp, ebp
pop ebp
ret