Function at 0x51be54
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51c5bf
push dword fs:[eax]
mov dword fs:[eax], esp
imul eax, dword [0x533984], 0x23
mov dword [0x5339c4], eax
mov eax, dword [0x5339d8]
add eax, 4
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [0x53387c], eax
imul eax, dword [0x5339bc], 0x4e
mov dword [0x533934], eax
mov eax, dword [0x533864]
mov dword [0x53396c], eax
mov eax, dword [0x53398c]
call fcn.004071f4
mov dword [0x53398c], eax
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
call fcn.0050844c
mov eax, dword [ebp - 4]
call fcn.0040a608
push eax
call dword [0x533a3c]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x51c481
mov eax, dword [0x533894]
sub eax, dword [0x5338bc]
mov dword [0x533974], eax
mov eax, dword [0x5338c4]
add eax, 0xce
mov dword [0x533a38], eax
imul eax, dword [0x5338b4], 0x97
mov dword [0x5338dc], eax
fild dword [0x53394c]
call fcn.00407638
mov dword [0x533984], eax
mov eax, dword [0x533984]
mov dword [0x533a48], eax
mov eax, dword [0x533a40]
mov dword [0x533884], eax
mov eax, dword [0x53397c]
mov dword [0x53389c], eax
mov eax, dword [0x53389c]
cmp eax, dword [0x533884]
jle 0x51bf5f
mov eax, dword [0x533874]
sub eax, 0x56
mov dword [0x533984], eax
test byte [ebp - 0x1b], 4
je 0x51c392
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
mov eax, dword [0x5338ec]
mov edx, eax
shl eax, 4
add eax, edx
mov dword [0x53390c], eax
mov eax, dword [0x5338dc]
add eax, 0xda
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.0040762c
mov dword [0x5339e8], eax
fild dword [0x533884]
call fcn.00407638
mov dword [0x5338ac], eax
lea eax, [ebp - 0x10]
mov edx, 0x51c5dc
call fcn.0040a01c
test byte [ebp - 0x1c], 0x10
je 0x51c074
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xe
jge 0x51c022
inc dword [ebp - 0x18]
mov eax, dword [0x5339ac]
add eax, 4
mov dword [0x533944], eax
call fcn.0051582c
mov dword [0x53386c], eax
mov eax, dword [0x533974]
imul dword [0x53394c]
mov dword [0x533874], eax
mov eax, dword [0x5338fc]
add eax, dword [0x533a40]
mov dword [0x533934], eax
mov eax, dword [0x53389c]
sub eax, 0xaf
mov dword [0x533a18], eax
jmp 0x51c022
lea eax, [ebp - 0x10]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x10]
call fcn.0040abd8
mov eax, dword [0x53396c]
add eax, 4
mov dword [0x5339c4], eax
imul eax, dword [0x5339b4], 0xd6
mov dword [0x533874], eax
mov eax, dword [0x5339f8]
imul dword [0x533894]
mov dword [0x533904], eax
sub dword [0x5339e0], 2
mov byte [ebp - 5], 0
jmp 0x51c5a4
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.0040a608
push eax
call dword [0x533a34]
mov dword [ebp - 0x20], eax
mov eax, dword [0x533a50]
add eax, dword [0x533874]
cmp eax, dword [0x533874]
jle 0x51c0ba
mov eax, 0xf
sub eax, dword [0x5339ac]
mov dword [0x53393c], eax
jmp 0x51c0c4
mov eax, dword [0x5339e0]
mov dword [0x533864], eax
mov eax, dword [0x5339b4]
imul dword [0x53395c]
mov dword [0x5339e0], eax
mov eax, dword [0x5339f8]
sub eax, 0xcb
mov dword [0x53388c], eax
imul eax, dword [0x5338cc], 0xc6
mov dword [0x533974], eax
mov eax, dword [0x5338fc]
add eax, dword [0x5338a4]
mov dword [0x533a38], eax
cmp dword [ebp - 0x20], 0xffffffff
je 0x51c2c8
mov eax, dword [0x533a18]
mov dword [0x533944], eax
mov eax, dword [0x5338f4]
mov dword [0x533974], eax
mov eax, dword [0x533974]
cmp eax, dword [0x533944]
jge 0x51c16f
xor eax, eax
mov dword [ebp - 0x18], eax
imul eax, dword [0x533a38], 0xa9
mov dword [0x53390c], eax
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 8
jne 0x51c132
mov eax, dword [0x5339bc]
sub eax, 0x3c
mov dword [0x53385c], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.0040abd8
jmp 0x51c19f
mov eax, dword [0x5338cc]
add eax, 4
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [0x5339f8], eax
mov eax, dword [0x533a18]
add eax, 4
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [0x5338cc], eax
mov eax, dword [0x53398c]
sub eax, dword [0x5339e8]
mov dword [0x533a08], eax
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x18]
jle 0x51c1c6
mov eax, dword [0x5338bc]
mov dword [0x533944], eax
jmp 0x51c1d9
lea ecx, [ebp - 0x18]
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x18]
call fcn.004fde48
mov dword [0x53392c], eax
mov eax, dword [0x5339d8]
add eax, 0xe3
mov dword [0x5339b4], eax
mov eax, dword [ebp - 0x20]
push eax
call dword [0x533998]
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
mov eax, dword [0x533974]
mov dword [0x5338ac], eax
mov eax, dword [0x5339c4]
add eax, dword [0x5339d8]
mov dword [0x53395c], eax
mov eax, dword [0x5339ac]
imul dword [0x533a08]
mov dword [0x533a30], eax
imul eax, dword [0x533984], 0xfb
mov dword [0x5338d4], eax
mov eax, dword [0x5339d8]
add eax, 4
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [0x533984], eax
mov byte [ebp - 5], 1
jmp 0x51c5a4
mov eax, dword [0x53385c]
mov dword [0x5338cc], eax
lea eax, [ebp - 0x10]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
imul eax, dword [0x53392c], 0x9a
mov dword [0x5339d0], eax
mov eax, dword [0x53396c]
add eax, 4
mov dword [ebp - 0x28], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [0x53387c], eax
lea eax, [ebp - 0xc]
mov edx, 0x51c674
call fcn.0040a01c
mov eax, dword [0x5339ac]
sub eax, 0xc4
mov dword [0x533984], eax
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x20
sete byte [ebp - 5]
jmp 0x51c5a4
mov eax, dword [0x53395c]
sub eax, dword [0x533904]
mov dword [0x5339bc], eax
mov eax, dword [0x53398c]
add eax, 0xfd
mov dword [0x53386c], eax
fild dword [0x53397c]
call fcn.00407638
mov dword [0x53390c], eax
mov eax, dword [0x533974]
mov dword [0x53397c], eax
mov eax, dword [0x5338c4]
mov dword [0x5339ac], eax
mov eax, dword [0x5339ac]
cmp eax, dword [0x53397c]
jge 0x51c3f4
mov eax, dword [0x53394c]
imul dword [0x533934]
mov dword [0x5338a4], eax
jmp 0x51c3fe
mov eax, dword [0x533a48]
mov dword [0x53398c], eax
fild dword [0x53387c]
call fcn.0040762c
mov dword [0x5338a4], eax
test byte [ebp - 0x1c], 0x10
sete byte [ebp - 5]
jmp 0x51c5a4
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 2
je 0x51c49b
cmp dword [ebp - 0x24], 3
je 0x51c49b
cmp dword [ebp - 0x24], 0x7b
jne 0x51c49f
xor eax, eax
jmp 0x51c4a1
mov al, 1
mov byte [ebp - 5], al
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
add edx, dword [ebp - 0x18]
cmp eax, edx
jge 0x51c529
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, 0x51c69c
call fcn.0040ade8
cmp eax, 0x14
jge 0x51c4dd
mov eax, 0x7d
sub eax, dword [0x5338d4]
mov dword [0x53393c], eax
jmp 0x51c4ed
mov eax, dword [0x5339bc]
add eax, dword [0x5338d4]
mov dword [0x533894], eax
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x18]
cmp eax, 0xae
jge 0x51c50a
fild dword [0x5339e8]
call fcn.0040762c
mov dword [0x533a08], eax
lea eax, [ebp - 0xc]
mov edx, 0x51c6c8
call fcn.0040a01c
mov eax, dword [0x5338fc]
add eax, dword [0x533a48]
mov dword [0x533944], eax
jmp 0x51c539
mov eax, dword [0x53389c]
sub eax, dword [0x533934]
mov dword [0x53387c], eax
mov eax, dword [0x53390c]
add eax, 0xf6
mov dword [0x533974], eax
lea eax, [ebp - 0x14]
mov edx, 0x51c6f0
call fcn.0040a01c
mov eax, dword [0x533874]
mov dword [0x533a00], eax
fild dword [0x53395c]
call fcn.00407638
mov dword [0x53388c], eax
mov eax, dword [0x533864]
mov dword [0x5338b4], eax
mov eax, dword [0x5338b4]
cmp eax, dword [0x533a00]
jle 0x51c595
mov eax, dword [0x5339e8]
add eax, 4
mov dword [0x533984], eax
jmp 0x51c5a4
mov eax, dword [0x53387c]
sub eax, 0x80
mov dword [0x53388c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c5c6
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00409c54
ret