Function at 0x51ba28
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff90
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 0x51c4d3
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.0040a608
push eax
call dword [0x533a3c]
mov dword [ebp - 0x58], eax
cmp dword [ebp - 0x58], 0xffffffff
je 0x51c403
mov eax, dword [0x5339d0]
sub eax, dword [0x5339b4]
mov edx, dword [0x5339e8]
sub edx, dword [0x5339b4]
cmp eax, edx
jle 0x51bb1c
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 2
jge 0x51baf2
inc dword [ebp - 0x4c]
mov eax, dword [0x53399c]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0
je 0x51baac
mov eax, dword [ebp - 0x64]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x64], eax
cmp dword [ebp - 0x64], 0xb6
jle 0x51bac4
mov eax, dword [0x53386c]
call fcn.004071f4
mov dword [0x53386c], eax
mov eax, dword [0x533954]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0
je 0x51badd
mov eax, dword [ebp - 0x68]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0x34
jne 0x51baf2
imul eax, dword [ebp - 0x48], 0x76
mov dword [ebp - 0x28], eax
jmp 0x51baf2
xor eax, eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 6
jge 0x51bb0f
inc dword [ebp - 0x38]
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x38], 6
jl 0x51bafd
lea eax, [ebp - 0x14]
mov edx, dword [ebp - 0x14]
call fcn.0040a01c
jmp 0x51bb62
xor eax, eax
mov dword [ebp - 0x50], eax
mov eax, dword [0x5339bc]
mov dword [0x533864], eax
fild dword [ebp - 0x34]
call fcn.0040762c
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x20]
imul dword [ebp - 0x30]
mov dword [ebp - 0x24], eax
inc dword [ebp - 0x50]
cmp dword [ebp - 0x50], 4
jne 0x51bb21
mov eax, dword [0x533a50]
mov dword [0x53394c], eax
fild dword [0x53397c]
call fcn.0040762c
mov dword [0x5339e0], eax
mov eax, dword [0x533a30]
sub eax, dword [0x53390c]
mov dword [0x53387c], eax
mov eax, dword [0x533a28]
add eax, 0xfb
mov dword [ebp - 0x70], eax
fild dword [ebp - 0x70]
call fcn.0040762c
mov dword [0x5338cc], eax
mov eax, dword [0x5338f4]
imul dword [0x53395c]
mov dword [0x533964], eax
mov eax, dword [0x5338ec]
add eax, 4
mov dword [0x5339d0], eax
test byte [ebp - 0x57], 4
je 0x51c335
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x30]
mov dword [ebp - 0x28], eax
mov eax, dword [0x53390c]
sub eax, dword [0x533a38]
cmp eax, dword [0x5338fc]
jne 0x51bbf0
mov eax, dword [ebp - 0x1c]
imul dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x10]
mov edx, 0x51c4f0
call fcn.0040a01c
jmp 0x51bca9
mov eax, dword [0x5339c4]
mov dword [0x5339e0], eax
mov eax, dword [0x5339f8]
call fcn.004071f4
mov dword [0x5339f8], eax
mov eax, dword [0x5339e0]
cmp eax, dword [0x5339f8]
jge 0x51bc40
xor eax, eax
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0xc]
push eax
xor ecx, ecx
mov edx, 1
mov eax, dword [ebp - 0xc]
call fcn.0040abd8
inc dword [ebp - 0x54]
cmp dword [ebp - 0x54], 0xe
jne 0x51bc1b
mov eax, dword [ebp - 0x40]
imul dword [ebp - 0x2c]
mov dword [ebp - 0x24], eax
imul eax, dword [0x5338d4], 0x7d
mov dword [0x533974], eax
mov eax, dword [ebp - 0x40]
sub eax, dword [ebp - 0x54]
mov edx, dword [ebp - 0x30]
sub edx, dword [ebp - 0x54]
cmp eax, edx
jle 0x51bc9c
mov eax, dword [0x5339e0]
add eax, dword [0x5339e0]
cmp eax, dword [0x5339e0]
jle 0x51bc8f
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0xc
jge 0x51bc9c
inc dword [ebp - 0x4c]
call fcn.005034e8
mov dword [0x533a28], eax
cmp dword [ebp - 0x4c], 0xc
jl 0x51bc7a
jmp 0x51bc9c
mov eax, dword [0x533a00]
sub eax, 0x3f
mov dword [0x53397c], eax
mov eax, dword [0x533984]
add eax, 0x6e
mov dword [0x53385c], eax
mov eax, dword [0x533904]
sub eax, dword [0x533964]
mov dword [0x53390c], eax
mov eax, dword [0x5338bc]
mov dword [0x533934], eax
mov eax, 0x68
sub eax, dword [0x5338b4]
mov dword [0x53398c], eax
test byte [ebp - 0x58], 0x10
je 0x51bce2
mov byte [ebp - 5], 0
jmp 0x51c4b8
imul eax, dword [ebp - 0x28], 0xf8
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x48]
add eax, 4
mov dword [ebp - 0x40], eax
mov eax, dword [0x5338c4]
mov dword [0x5339d0], eax
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword [ebp - 0x3c]
push eax
mov eax, dword [0x53398c]
push eax
mov eax, dword [0x533984]
push eax
mov ecx, dword [ebp - 0x50]
mov edx, dword [ebp - 0x24]
mov eax, dword [0x533a28]
call fcn.004fac14
mov eax, dword [0x53396c]
mov dword [0x533a08], eax
mov eax, dword [0x533904]
mov dword [0x533a28], eax
mov eax, dword [0x533a08]
cmp eax, dword [0x533a28]
jge 0x51bd7a
mov eax, dword [0x533a28]
mov dword [0x533a50], eax
mov eax, dword [0x533a08]
cmp eax, dword [0x533a50]
jle 0x51bd6f
mov ecx, 0x53390c
mov edx, 0x5339e0
lea eax, [ebp - 0x48]
call fcn.004fb7d8
jmp 0x51bd7a
mov eax, dword [ebp - 0x18]
sub eax, 0x91
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
add eax, 0x81
mov dword [ebp - 0x30], eax
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 - 0x5c], eax
mov eax, dword [0x533a38]
mov dword [0x53387c], eax
mov eax, dword [ebp - 0x48]
imul dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x20], eax
imul eax, dword [ebp - 0x40], 0x15
mov dword [ebp - 0x28], eax
mov eax, dword [0x533904]
mov dword [0x5338f4], eax
inc dword [ebp - 0x20]
cmp dword [ebp - 0x20], 7
jne 0x51bdbe
xor eax, eax
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x30]
imul dword [ebp - 0x2c]
mov dword [ebp - 0x38], eax
mov eax, dword [0x533a08]
mov dword [0x53398c], eax
mov eax, dword [0x5339b4]
call fcn.004071f4
mov dword [0x5339b4], eax
mov eax, dword [0x53398c]
cmp eax, dword [0x5339b4]
jge 0x51be2c
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 6
jge 0x51be44
inc dword [ebp - 0x18]
mov eax, dword [0x5339f8]
mov dword [0x533864], eax
cmp dword [ebp - 0x18], 6
jl 0x51be17
jmp 0x51be44
mov eax, dword [0x5338cc]
sub eax, 0x73
mov dword [0x533944], eax
jmp 0x51be44
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x2c]
cmp eax, 0x12
jge 0x51be5f
mov eax, dword [0x53395c]
add eax, dword [0x533904]
mov dword [0x53385c], eax
xor eax, eax
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x54], 6
jge 0x51be80
inc dword [ebp - 0x54]
mov eax, dword [0x5338e4]
lea eax, [eax + eax*2]
mov dword [0x533904], eax
cmp dword [ebp - 0x54], 6
jl 0x51be6a
cmp dword [ebp - 0x5c], 0xffffffff
je 0x51bfde
mov eax, dword [ebp - 0x5c]
push eax
call dword [0x533998]
mov eax, dword [ebp - 0x50]
sub eax, dword [ebp - 0x44]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x38]
sub eax, 0x2d
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x3c]
mov dword [ebp - 0x18], eax
mov eax, dword [0x53395c]
mov dword [0x53393c], eax
mov eax, dword [0x5338f4]
mov dword [0x53394c], eax
mov eax, dword [0x53393c]
cmp eax, dword [0x53394c]
jge 0x51bed9
mov eax, dword [ebp - 0x20]
add eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov eax, dword [0x53399c]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0
je 0x51bef2
mov eax, dword [ebp - 0x6c]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x6c], 0x9f
jne 0x51bf14
xor eax, eax
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x10]
call fcn.0040a01c
inc dword [ebp - 0x48]
cmp dword [ebp - 0x48], 0x10
jne 0x51bf00
mov eax, dword [0x53387c]
add eax, 0x54
mov dword [0x53393c], eax
mov byte [ebp - 5], 1
jmp 0x51c4b8
mov eax, dword [0x533a50]
mov dword [0x5339bc], eax
mov eax, dword [0x5339f8]
mov dword [0x5339d0], eax
mov eax, dword [0x5339bc]
cmp eax, dword [0x5339d0]
jge 0x51c0d6
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 4
jge 0x51c058
inc dword [ebp - 0x4c]
mov ecx, 1
mov edx, dword [0x533a20]
mov eax, 0x51c57c
call fcn.0040ade8
cmp eax, 0x32
jge 0x51c049
push 0x5338dc
lea ecx, [ebp - 0x30]
mov edx, 0x5338c4
mov eax, 0x53394c
call fcn.0051708c
mov dword [0x533a48], eax
jmp 0x51c052
mov eax, dword [ebp - 0x3c]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x4c], 4
jl 0x51c00e
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x40]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x20]
add eax, 0x87
mov dword [ebp - 0x44], eax
xor eax, eax
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jge 0x51c0ba
inc dword [ebp - 0x48]
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, 0x51c5a0
call fcn.0040ade8
cmp eax, 0x8e
je 0x51c0ab
lea eax, [ebp - 0xc]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x10]
call fcn.0040abd8
jmp 0x51c0b4
mov eax, dword [ebp - 0x38]
sub eax, 0x4f
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x48], 0
jl 0x51c077
mov eax, dword [0x533874]
add eax, 0x8d
mov dword [ebp - 0x70], eax
fild dword [ebp - 0x70]
call fcn.0040762c
mov dword [0x533a30], eax
jmp 0x51c0e1
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
mov eax, dword [0x53394c]
add eax, 0x88
mov dword [0x5338fc], eax
mov eax, dword [0x53392c]
add eax, dword [0x5338a4]
mov edx, dword [0x5338ec]
add edx, dword [0x53392c]
cmp eax, edx
jge 0x51c118
mov eax, dword [0x533a50]
add eax, 0x1f
mov dword [0x5339ac], eax
mov eax, dword [0x5338cc]
sub eax, 0x1b
mov dword [0x533a48], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, 2
mov edx, 1
mov eax, dword [ebp - 0x14]
call fcn.0040abd8
mov eax, dword [0x533a30]
add eax, 4
mov dword [ebp - 0x70], eax
fild dword [ebp - 0x70]
call fcn.00407638
mov dword [0x5338b4], eax
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x60], eax
mov eax, dword [0x5339e0]
call fcn.004071f4
mov dword [0x5339e0], eax
mov eax, dword [0x53394c]
mov dword [0x533a08], eax
mov eax, dword [0x5339e0]
cmp eax, dword [0x533a08]
jge 0x51c232
xor eax, eax
mov dword [ebp - 0x54], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, 1
mov edx, 1
mov eax, dword [ebp - 0x10]
call fcn.0040abd8
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x1c]
cmp eax, 0xe4
jge 0x51c1c4
lea eax, [ebp - 0x4c]
push eax
mov ecx, 0x53396c
lea edx, [ebp - 0x18]
lea eax, [ebp - 0x54]
call fcn.00512514
mov dword [ebp - 0x20], eax
inc dword [ebp - 0x54]
cmp dword [ebp - 0x54], 0x10
jne 0x51c18a
mov ecx, dword [ebp - 0x2c]
mov edx, dword [0x53393c]
mov eax, dword [0x5338fc]
call fcn.00516e6c
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x10]
mov edx, 0x51c5e8
call fcn.0040aba0
jne 0x51c1fe
mov eax, dword [0x53387c]
mov dword [0x5339ac], eax
jmp 0x51c22a
mov eax, dword [0x533a48]
sub eax, dword [0x533904]
cmp eax, dword [0x5339e8]
jne 0x51c22a
xor eax, eax
mov dword [ebp - 0x50], eax
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
inc dword [ebp - 0x50]
cmp dword [ebp - 0x50], 0xc
jne 0x51c216
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x2c], eax
jmp 0x51c23d
fild dword [ebp - 0x1c]
call fcn.0040762c
mov dword [ebp - 0x4c], eax
xor eax, eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x48]
sub eax, dword [ebp - 0x38]
cmp eax, dword [ebp - 0x48]
jge 0x51c26b
xor eax, eax
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 9
jge 0x51c26b
inc dword [ebp - 0x3c]
mov eax, dword [0x533974]
mov dword [0x53386c], eax
cmp dword [ebp - 0x3c], 9
jl 0x51c258
mov eax, dword [0x533964]
mov dword [0x5338bc], eax
inc dword [ebp - 0x40]
cmp dword [ebp - 0x40], 0xb
jne 0x51c242
mov eax, dword [0x5339b4]
add eax, dword [0x53392c]
mov dword [0x53396c], eax
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x10]
call fcn.0040aba0
jne 0x51c2b7
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x20]
cmp eax, 0xc9
jge 0x51c311
mov eax, dword [0x53393c]
sub eax, 0x25
mov dword [0x533a50], eax
jmp 0x51c311
push 0x53390c
lea eax, [ebp - 0x2c]
push eax
push 0x533864
mov ecx, 0x5338dc
mov edx, 0x53397c
mov eax, 0x5338d4
call fcn.00511914
mov dword [0x5339d8], eax
mov eax, dword [0x533a40]
mov dword [0x5338cc], eax
mov eax, dword [0x5338cc]
cmp eax, dword [0x5339ac]
jle 0x51c301
mov eax, dword [0x53387c]
mov dword [0x53390c], eax
jmp 0x51c311
mov eax, dword [0x53386c]
add eax, dword [0x5339d8]
mov dword [0x5339e8], eax
mov eax, dword [0x53385c]
add eax, 0x4c
mov dword [0x5338a4], eax
mov eax, dword [0x53398c]
mov dword [0x53392c], eax
cmp dword [ebp - 0x60], 0x20
sete byte [ebp - 5]
jmp 0x51c4b8
mov eax, dword [0x53386c]
mov dword [0x5338cc], eax
mov eax, dword [0x5338dc]
call fcn.004071f4
mov dword [0x5338dc], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x10]
mov edx, 0x51c608
call fcn.0040a01c
mov eax, dword [0x5338ac]
mov dword [0x53392c], eax
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xd
jge 0x51c389
inc dword [ebp - 0x18]
imul eax, dword [ebp - 0x38], 0xd7
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x18], 0xd
jl 0x51c376
test byte [ebp - 0x58], 0x10
sete byte [ebp - 5]
jmp 0x51c4b8
call sub.kernel32.dll_GetLastError_2
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 2
je 0x51c41d
cmp dword [ebp - 0x60], 3
je 0x51c41d
cmp dword [ebp - 0x60], 0x7b
jne 0x51c421
xor eax, eax
jmp 0x51c423
mov al, 1
mov byte [ebp - 5], al
mov eax, dword [ebp - 0x54]
sub eax, 0x2b
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x28]
push eax
push 0x5338cc
lea ecx, [ebp - 0x44]
lea edx, [ebp - 0x18]
mov eax, 0x5339bc
call fcn.00511914
mov eax, dword [0x5338d4]
mov dword [0x53392c], eax
imul eax, dword [ebp - 0x1c], 0x2a
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x48]
imul dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
mov eax, dword [0x5339a4]
mov edx, dword [0x533994]
call fcn.0040aba0
jne 0x51c484
mov eax, dword [0x533884]
mov dword [0x5339ac], eax
jmp 0x51c4b8
mov eax, dword [0x5339d8]
cmp eax, dword [0x533974]
jle 0x51c4b2
xor eax, eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 3
jge 0x51c4b8
inc dword [ebp - 0x4c]
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.0040a01c
cmp dword [ebp - 0x4c], 3
jl 0x51c49c
jmp 0x51c4b8
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x24], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x51c4da
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.00409c54
ret