Function at 0x51b350
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56ede9
mov eax, dword fs:[0]
push eax
sub esp, 0x80
mov eax, dword [0x5d0074]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x84], edx
mov edx, ecx
mov dword [ebp - 0x80], edx
mov dword [ebp - 0x88], edx
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0x7c], ecx
mov ecx, edx
mov dword [ebp - 0x8c], edx
push eax
mov dword [ebp - 0x78], 0
call fcn.00406d00
mov dword [ebp - 4], 0
push dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x84]
push esi
push edi
push ebx
push dword [ebp - 0x7c]
mov ebx, dword [ebp - 0x80]
mov edx, ebx
mov dword [ebp - 0x78], 1
call fcn.0051aec0
add esp, 0x14
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x51b3f1
mov eax, dword [ebx]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
jne 0x51b57c
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x88], esp
push ebx
call fcn.00406d00
mov dword [ebp - 4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00484e80
mov dword [ebp - 4], 2
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x70]
call fcn.00484990
mov byte [ebp - 4], 4
xor eax, eax
mov word [ebp - 0x28], ax
lea ecx, [ebp - 0x70]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
push eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x78], 5
call fcn.004858d0
mov byte [ebp - 4], 5
xor eax, eax
mov word [ebp - 0x40], ax
lea ecx, [ebp - 0x58]
lea eax, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
push eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x78], 0xd
call fcn.004858d0
cmp dword [ebp - 0x14], 8
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 0x30]
lea ecx, [ebp - 0x40]
cmovae edx, dword [ebp - 0x28]
cmp dword [ebp - 0x2c], 8
cmovae ecx, dword [ebp - 0x40]
cmp eax, dword [ebp - 0x18]
jne 0x51b4da
push eax
call fcn.00406f00
add esp, 4
mov byte [ebp - 0x71], 1
test eax, eax
je 0x51b4de
mov byte [ebp - 0x71], 0
mov esi, 0xd
mov dword [ebp - 0x78], esi
and esi, 0xfffffff7
mov dword [ebp - 0x78], esi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x40]
call fcn.00407c80
and esi, 0xfffffffb
mov dword [ebp - 0x78], esi
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407c80
cmp byte [ebp - 0x71], 0
je 0x51b561
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.00485a90
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 8
jb 0x51b528
mov eax, dword [eax]
push eax
call edi
mov esi, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407c80
test esi, esi
je 0x51b561
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.00485a90
mov byte [ebp - 4], 7
mov ecx, ebx
push eax
call fcn.004065e0
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407c80
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
call fcn.00407c80
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00407c80
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00520c02
mov esp, ebp
pop ebp
ret