Function at 0x51bc10
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x56f0b9
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.00406ba0
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.0051b780
add esp, 0x14
mov eax, ebx
cmp dword [ebx + 0x14], 8
jb 0x51bcb1
mov eax, dword [ebx]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
jne 0x51be3c
sub esp, 0x18
mov ecx, esp
mov dword [ebp - 0x88], esp
push ebx
call fcn.00406ba0
mov dword [ebp - 4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.0048bb00
mov dword [ebp - 4], 2
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x70]
call fcn.004840f0
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.0048ced0
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.0048ced0
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 0x51bd9a
push eax
call fcn.00406da0
add esp, 4
mov byte [ebp - 0x71], 1
test eax, eax
je 0x51bd9e
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.00407b40
and esi, 0xfffffffb
mov dword [ebp - 0x78], esi
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407b40
cmp byte [ebp - 0x71], 0
je 0x51be21
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.0048d0b0
mov byte [ebp - 4], 6
cmp dword [eax + 0x14], 8
jb 0x51bde8
mov eax, dword [eax]
push eax
call edi
mov esi, eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407b40
test esi, esi
je 0x51be21
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x58]
call fcn.0048d0b0
mov byte [ebp - 4], 7
mov ecx, ebx
push eax
call fcn.00406480
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
call fcn.00407b40
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x58]
call fcn.00407b40
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00407b40
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.005214e1
mov esp, ebp
pop ebp
ret