Function at 0x405520
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59b203
mov eax, dword fs:[0]
push eax
sub esp, 0x98
mov eax, dword [0x6240b8]
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 edi, ecx
mov dword [ebp - 0x6c], edi
mov eax, dword [edi]
or eax, dword [edi + 4]
push 0
jne 0x40558c
call fcn.00442f67
mov ecx, dword [edi + 8]
add esp, 4
shl ecx, 4
sub ecx, dword [edi + 8]
shl ecx, 2
mov dword [edi], eax
mov dword [edi + 4], edx
test ecx, ecx
jle 0x405599
push ecx
push 0
call fcn.0042722c
cdq
add esp, 8
add dword [edi], eax
adc dword [edi + 4], edx
jmp 0x405599
call fcn.00442f67
add esp, 4
mov dword [edi], eax
mov dword [edi + 4], edx
call fcn.004274e5
test al, al
je 0x4055b3
push ecx
pop esi
push ebx
pop ebx
push eax
pop ebx
pop esp
push edi
push ebp
pop ebp
pop eax
push edi
push eax
pop ebp
pop ebx
push esi
pop ebp
xor eax, eax
mov dword [ebp - 0x2c], 0xf
push 0xffffffffffffffff
mov dword [ebp - 0x60], eax
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x5c], eax
lea eax, [edi + 0x110]
push 0
push eax
mov dword [ebp - 0x30], 0
mov byte [ebp - 0x40], 0
call fcn.00406590
mov dword [ebp - 4], 0
cmp dword [edi + 0x128], 0
je 0x4056e5
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
push 1
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 1
push eax
sub esp, 0x18
lea ecx, [ebp - 0x40]
mov eax, esp
push ecx
push eax
call fcn.0042c372
mov ecx, dword [edi + 0x128]
add esp, 8
push 0
call fcn.00403c80
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4056b8
lea eax, [ebp - 0x5c]
push eax
sub esp, 0x18
mov ecx, esp
mov dword [ecx + 0x14], 7
mov dword [ecx + 0x10], 0
cmp dword [ecx + 0x14], 8
jb 0x405668
mov eax, dword [ecx]
jmp 0x40566a
mov eax, ecx
xor edx, edx
push 0xffffffffffffffff
mov word [eax], dx
lea eax, [ebp - 0x28]
push edx
push eax
call fcn.00401920
call fcn.00424cda
mov dword [ebp - 0x60], eax
add esp, 0x1c
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40569f
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00401b30
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
jmp 0x4057e7
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x4056d1
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00401b30
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
cmp dword [ebp - 0x30], 0
je 0x4057e7
push 0x1869f
push 0x2710
call fcn.0042722c
add esp, 8
lea ecx, [ebp - 0x40]
mov esi, eax
push 1
push 0x6197d4
call fcn.004066c0
push 6
push str.1cdfc7
lea ecx, [ebp - 0x40]
call fcn.004066c0
push 1
push 0x6197e0
lea ecx, [ebp - 0x40]
call fcn.004066c0
mov eax, esi
cdq
push edx
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00423d0c
add esp, 0xc
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 2
call fcn.004067f0
lea ecx, [ebp - 0x58]
mov byte [ebp - 4], 0
call fcn.00404680
lea ecx, [ebp - 0xa4]
call fcn.00426050
mov byte [ebp - 4], 3
lea eax, [ebp - 0x40]
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0xa4]
cmovae eax, dword [ebp - 0x40]
push eax
call fcn.004264c5
lea ecx, [ebp - 0xa4]
call fcn.0042688c
mov esi, eax
mov ecx, 1
mov eax, dword [esi + 4]
sub eax, dword [esi]
cmove eax, ecx
mov dword [ebp - 0x5c], eax
inc eax
push eax
call fcn.0041efa8
mov ecx, dword [ebp - 0x5c]
mov ebx, eax
inc ecx
mov dword [ebp - 0x60], ebx
push ecx
push 0
push ebx
call fcn.0043ffd0
mov ecx, dword [esi + 4]
add esp, 0x10
xor edx, edx
sub ecx, dword [esi]
je 0x4057d8
mov eax, dword [esi]
mov al, byte [edx + eax]
mov byte [edx + ebx], al
inc edx
mov eax, dword [esi + 4]
sub eax, dword [esi]
cmp edx, eax
jb 0x4057c6
lea ecx, [ebp - 0xa4]
mov byte [ebp - 4], 0
call fcn.004260c6
call fcn.004273d1
test al, al
je 0x405808
push ebx
pop ecx
push ecx
pop ebx
push ecx
pop esp
pop ecx
pop esi
push edx
push edi
pop edi
pop edx
push esi
push esi
push ecx
push ebp
push eax
push edx
pop ecx
pop esp
push ecx
mov edi, dword [ebp - 0x6c]
call fcn.0042763e
test al, al
je 0x405828
pop ebx
pop ebp
push ebp
push esp
push edi
push eax
push ecx
pop ebx
push eax
pop ecx
push ecx
pop esi
pop esi
push edx
push ecx
push ecx
pop ebp
push edx
push esi
pop eax
pop eax
push esi
push ebp
call fcn.00427683
test al, al
je 0x405845
push ecx
push ebx
pop ecx
push ebp
push edx
push ebx
push esp
pop eax
push edx
pop ecx
push esi
push ebx
pop ecx
push ebp
push ecx
pop ebp
pop edx
push ebx
push esi
push eax
mov ebx, dword [ebp - 0x60]
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], 0
push eax
push dword [ebp - 0x5c]
mov dword [ebp - 0x70], 0
push ebx
call fcn.0042855d
mov eax, dword [ebp - 0x64]
add esp, 0x10
test eax, eax
jne 0x40588d
push 0x8d
call fcn.00427fcd
add esp, 4
test ebx, ebx
je 0x4058a6
push ebx
call fcn.0041efa3
add esp, 4
jmp 0x4058a6
push eax
mov ecx, edi
call fcn.00405b00
test ebx, ebx
je 0x4058a2
push ebx
call fcn.0041efa3
add esp, 4
mov byte [edi + 0xc], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 0x10
jb 0x4058f0
mov ecx, dword [ebp - 0x40]
inc eax
cmp eax, 0x1000
jb 0x4058e7
test cl, 0x1f
je 0x4058c3
call fcn.004420b1
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x4058cf
call fcn.004420b1
sub ecx, eax
cmp ecx, 4
jae 0x4058db
call fcn.004420b1
cmp ecx, 0x23
jbe 0x4058e5
call fcn.004420b1
mov ecx, eax
push ecx
call fcn.0041eca4
add esp, 4
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.0041eca9
mov esp, ebp
pop ebp
ret