Function at 0x51bbcc
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
xor edx, edx
mov dword [ebp - 0xc], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x51c364
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x534a40]
call fcn.004071f4
mov dword [0x534a40], eax
mov eax, dword [0x53494c]
mov dword [0x534a50], eax
mov eax, dword [0x534a50]
cmp eax, dword [0x534a40]
jge 0x51bc2c
lea eax, [ebp - 0xc]
mov edx, 0x51c380
call fcn.0040a01c
mov eax, dword [0x534894]
call fcn.004071f4
mov dword [0x534894], eax
jmp 0x51bc44
mov eax, dword [0x5348bc]
call fcn.004071f4
mov dword [0x5348bc], eax
mov eax, dword [ebp - 0x2c]
add eax, 0x32
mov dword [ebp - 0x18], eax
mov eax, dword [0x5348dc]
mov dword [0x5348fc], eax
mov eax, dword [0x53491c]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
je 0x51bc67
mov eax, dword [ebp - 0x3c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jle 0x51bc88
fild dword [ebp - 0x28]
call fcn.0040762c
mov dword [ebp - 0x1c], eax
mov eax, 0x2d
sub eax, dword [0x53490c]
mov dword [0x5349d0], eax
mov eax, dword [0x534a30]
mov dword [0x534a00], eax
mov eax, dword [0x5348bc]
sub eax, dword [0x53486c]
mov dword [0x534a40], eax
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
mov eax, dword [ebp - 4]
call fcn.0040a608
push eax
call dword [0x534a3c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
sub eax, 0x28
mov dword [ebp - 0x1c], eax
mov ecx, dword [0x53493c]
mov edx, dword [ebp - 0x18]
mov eax, dword [0x534a08]
call fcn.0051042c
mov eax, dword [0x53494c]
call fcn.004071f4
mov dword [0x53494c], eax
mov eax, 0x8c
sub eax, dword [ebp - 0x10]
mov dword [ebp - 0x20], eax
call fcn.00516e48
mov dword [0x534864], eax
imul eax, dword [0x534984], 0xbc
mov dword [0x5349e8], eax
cmp dword [ebp - 0x30], 0xffffffff
je 0x51c231
test byte [ebp - 0x2f], 4
je 0x51c224
mov eax, dword [ebp - 0x28]
add eax, 0x9e
mov dword [ebp - 0x1c], eax
mov eax, dword [0x534a28]
mov dword [0x534944], eax
imul eax, dword [ebp - 0x24], 0xe8
mov dword [ebp - 0x20], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
mov eax, dword [0x534a00]
sub eax, dword [0x534a18]
mov dword [0x534a18], eax
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x2c], 0xf
jne 0x51bd4e
mov eax, dword [0x534a50]
mov dword [0x534864], eax
test byte [ebp - 0x30], 0x10
je 0x51be87
fild dword [ebp - 0x20]
call fcn.00407638
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xf
jge 0x51bdb5
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x28]
add eax, 4
mov dword [ebp - 0x24], eax
fild dword [0x5348b4]
call fcn.00407638
mov dword [0x534a30], eax
jmp 0x51bdb5
mov eax, dword [0x53494c]
sub eax, dword [0x534964]
mov dword [0x5348b4], eax
mov eax, dword [0x5349ac]
add eax, 4
mov dword [ebp - 0x40], eax
fild dword [ebp - 0x40]
call fcn.00407638
mov dword [0x5348fc], eax
mov eax, dword [0x53498c]
add eax, 0xd2
mov dword [0x53496c], eax
mov eax, dword [0x5349a4]
mov edx, dword [0x534954]
call fcn.0040aba0
jne 0x51be0e
fild dword [0x5348d4]
call fcn.00407638
mov dword [0x5349f8], eax
mov byte [ebp - 5], 0
jmp 0x51c34e
push 0
push 0
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 4]
call fcn.0040a608
push eax
call dword [0x534a34]
mov dword [ebp - 0x34], eax
mov eax, dword [0x534964]
mov dword [0x5349e8], eax
mov eax, dword [0x5348fc]
mov dword [0x5349f8], eax
mov eax, dword [0x5349e8]
cmp eax, dword [0x5349f8]
jge 0x51beea
xor eax, eax
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
inc dword [ebp - 0x2c]
cmp dword [ebp - 0x2c], 0xc
jne 0x51bece
mov eax, dword [0x5348ac]
call fcn.004071f4
mov dword [0x5348ac], eax
mov eax, dword [0x5348a4]
mov dword [0x5348bc], eax
mov eax, dword [ebp - 0x10]
sub eax, 0x1d
mov dword [ebp - 0x18], eax
mov eax, dword [0x53498c]
mov dword [0x5348e4], eax
mov eax, dword [ebp - 0x20]
imul dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x51c017
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 9
jge 0x51bf7c
inc dword [ebp - 0x2c]
mov eax, dword [0x53486c]
call fcn.004071f4
mov dword [0x53486c], eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [0x53488c]
push eax
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
call fcn.0051a420
mov dword [0x5348ac], eax
mov eax, 0xd9
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x2c], 9
jl 0x51bf34
push 0x53486c
mov ecx, 0x5349bc
mov edx, 0x53494c
lea eax, [ebp - 0x14]
call fcn.004f8500
mov eax, dword [0x53494c]
mov dword [0x534934], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x20], eax
mov eax, dword [0x534944]
mov dword [0x53498c], eax
mov eax, dword [ebp - 0x34]
push eax
call dword [0x534998]
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
mov eax, dword [0x53488c]
mov dword [0x53487c], eax
mov eax, dword [0x534a40]
mov dword [0x53488c], eax
fild dword [ebp - 0x28]
call fcn.00407638
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0xc]
mov edx, 0x51c3b4
call fcn.0040a01c
mov eax, dword [0x534a38]
mov dword [0x5348dc], eax
mov byte [ebp - 5], 1
jmp 0x51c34e
mov eax, 0x71
sub eax, dword [0x5349ac]
cmp eax, 0x11
jge 0x51c048
xor eax, eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jge 0x51c063
inc dword [ebp - 0x28]
fild dword [ebp - 0x20]
call fcn.00407638
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x28], 0
jl 0x51c032
jmp 0x51c063
mov eax, 0xc6
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x1c], eax
mov eax, dword [0x534a30]
sub eax, dword [0x534a40]
mov dword [0x5349e0], eax
mov eax, dword [0x53486c]
add eax, 4
mov dword [0x53488c], eax
mov eax, dword [0x5349bc]
mov dword [0x5348a4], eax
mov eax, dword [0x534a08]
sub eax, dword [0x53487c]
mov dword [0x5348ec], eax
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0xc]
mov edx, 0x51c3ec
call fcn.0040a01c
mov eax, dword [ebp - 0x2c]
add eax, 0x26
mov dword [ebp - 0x40], eax
fild dword [ebp - 0x40]
call fcn.0040762c
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x14]
sub eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x24]
sub edx, dword [ebp - 0x20]
cmp eax, edx
jle 0x51c0cf
mov eax, dword [0x53487c]
mov dword [0x5348b4], eax
jmp 0x51c0d8
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
mov eax, dword [0x53495c]
sub eax, dword [0x5349e0]
mov dword [0x5349b4], eax
mov eax, dword [0x53494c]
add eax, 0x7d
mov dword [ebp - 0x40], eax
fild dword [ebp - 0x40]
call fcn.0040762c
mov dword [0x534a18], eax
cmp dword [ebp - 0x38], 0x20
sete byte [ebp - 5]
jmp 0x51c34e
test byte [ebp - 0x30], 0x10
sete byte [ebp - 5]
jmp 0x51c34e
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 2
je 0x51c24b
cmp dword [ebp - 0x38], 3
je 0x51c24b
cmp dword [ebp - 0x38], 0x7b
jne 0x51c24f
xor eax, eax
jmp 0x51c251
mov al, 1
mov byte [ebp - 5], al
xor eax, eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 3
jge 0x51c2da
inc dword [ebp - 0x28]
xor eax, eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 8
jge 0x51c28b
inc dword [ebp - 0x2c]
mov eax, dword [0x534a08]
mov dword [0x534874], eax
mov eax, dword [ebp - 0x24]
sub eax, 0xeb
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x2c], 8
jl 0x51c26d
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, dword [0x53498c]
sub eax, dword [0x5349b4]
mov dword [0x534934], eax
inc dword [ebp - 0x14]
cmp dword [ebp - 0x14], 0xe
jne 0x51c290
mov eax, dword [0x534974]
add eax, dword [0x534874]
cmp eax, dword [0x534874]
jle 0x51c2d4
mov eax, dword [0x534a38]
add eax, 4
mov dword [ebp - 0x40], eax
fild dword [ebp - 0x40]
call fcn.00407638
mov dword [0x5349e0], eax
cmp dword [ebp - 0x28], 3
jl 0x51c25f
mov eax, dword [0x5348bc]
mov dword [0x53487c], eax
mov eax, dword [0x53488c]
add eax, 0xe8
cmp eax, dword [0x534874]
jge 0x51c314
imul eax, dword [0x53486c], 0x78
mov dword [0x5348dc], eax
mov eax, dword [0x534864]
sub eax, dword [0x534a40]
mov dword [0x534944], eax
jmp 0x51c324
mov eax, dword [0x53493c]
add eax, dword [0x534864]
mov dword [0x5349e0], eax
mov eax, dword [0x5348d4]
add eax, 0x3d
mov dword [0x53485c], eax
mov eax, dword [0x53492c]
add eax, 4
mov dword [0x53489c], eax
mov eax, dword [0x53490c]
shl eax, 5
lea eax, [eax + eax*4]
mov dword [0x5348ec], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c36b
lea eax, [ebp - 0xc]
call fcn.00409bf4
ret