Function at 0x585950
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7bb57c
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x89b044]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
cmp dword [eax], 0
je 0x585995
mov ecx, dword [ebp + 8]
add ecx, 4
call fcn.00403b90
movzx ecx, al
test ecx, ecx
je 0x58599c
xor eax, eax
jmp 0x585d73
mov dword [ebp - 0x230], 0
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00403b90
movzx edx, al
test edx, edx
jne 0x5859c9
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00405e80
mov dword [ebp - 0x230], eax
lea ecx, [ebp - 0x228]
call fcn.00418150
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x10]
neg ecx
sbb ecx, ecx
and ecx, 0xffffff00
add ecx, 0x200
or ecx, 0x20019
push ecx
mov ecx, dword [ebp + 8]
add ecx, 4
call fcn.00405e80
push eax
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
lea ecx, [ebp - 0x228]
call fcn.004180a0
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
je 0x585a4b
mov dword [ebp - 0x238], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x238]
jmp 0x585d73
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00403b90
movzx ecx, al
test ecx, ecx
je 0x585a84
mov dword [ebp - 0x23c], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x23c]
jmp 0x585d73
push 0x208
push 0
lea edx, [ebp - 0x21c]
push edx
call fcn.007202b0
add esp, 0xc
mov dword [ebp - 0x234], 0x104
lea eax, [ebp - 0x234]
push eax
lea ecx, [ebp - 0x21c]
push ecx
mov ecx, dword [ebp + 8]
add ecx, 8
call fcn.00405e80
push eax
lea ecx, [ebp - 0x228]
call fcn.00418020
mov dword [ebp - 0x22c], eax
cmp dword [ebp - 0x22c], 0
je 0x585aff
mov dword [ebp - 0x240], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x240]
jmp 0x585d73
lea edx, [ebp - 0x21c]
push edx
lea ecx, [ebp - 0x220]
call fcn.004068d0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x220]
call fcn.005321d0
lea ecx, [ebp - 0x220]
call fcn.00532120
lea ecx, [ebp - 0x220]
call fcn.00403b90
movzx eax, al
test eax, eax
je 0x585b73
mov dword [ebp - 0x244], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x220]
call fcn.00405ef0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x244]
jmp 0x585d73
push 0x7fa53c
push 1
lea ecx, [ebp - 0x24c]
push ecx
lea ecx, [ebp - 0x220]
call fcn.0055e4e0
mov dword [ebp - 0x268], eax
mov edx, dword [ebp - 0x268]
push edx
call fcn.0040cb00
add esp, 8
mov byte [ebp - 0x245], al
lea ecx, [ebp - 0x24c]
call fcn.00405ef0
movzx eax, byte [ebp - 0x245]
test eax, eax
je 0x585c15
lea ecx, [ebp - 0x220]
call fcn.00406460
sub eax, 1
push eax
lea ecx, [ebp - 0x250]
push ecx
lea ecx, [ebp - 0x220]
call fcn.00422bd0
mov dword [ebp - 0x26c], eax
mov edx, dword [ebp - 0x26c]
mov dword [ebp - 0x270], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x270]
push eax
lea ecx, [ebp - 0x220]
call fcn.00403670
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x250]
call fcn.00405ef0
push 0x7fa540
push 1
lea ecx, [ebp - 0x258]
push ecx
lea ecx, [ebp - 0x220]
call fcn.00422bd0
mov dword [ebp - 0x274], eax
mov edx, dword [ebp - 0x274]
push edx
call fcn.0040cb00
add esp, 8
mov byte [ebp - 0x251], al
lea ecx, [ebp - 0x258]
call fcn.00405ef0
movzx eax, byte [ebp - 0x251]
test eax, eax
je 0x585cb7
lea ecx, [ebp - 0x220]
call fcn.00406460
sub eax, 1
push eax
lea ecx, [ebp - 0x25c]
push ecx
lea ecx, [ebp - 0x220]
call fcn.0055e4e0
mov dword [ebp - 0x278], eax
mov edx, dword [ebp - 0x278]
mov dword [ebp - 0x27c], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x27c]
push eax
lea ecx, [ebp - 0x220]
call fcn.00403670
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x25c]
call fcn.00405ef0
mov ecx, dword [ebp + 8]
add ecx, 0xc
call fcn.00403b90
movzx ecx, al
test ecx, ecx
jne 0x585cf9
mov ecx, dword [ebp + 8]
add ecx, 0xc
call fcn.00405e80
push eax
push 0x104
lea ecx, [ebp - 0x220]
call fcn.00403b40
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x220]
call fcn.00403ba0
lea ecx, [ebp - 0x220]
call fcn.00405e80
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x585d42
mov dword [ebp - 0x260], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x220]
call fcn.00405ef0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x260]
jmp 0x585d73
mov dword [ebp - 0x264], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x220]
call fcn.00405ef0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.00418130
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0071fe0b
mov esp, ebp
pop ebp
ret