Function at 0x405320
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b065
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x43800c]
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
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0
call fcn.0040cce0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
test edx, edx
jne 0x40536c
xor bl, bl
jmp 0x405606
mov esi, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edi, dword [ebp - 0x28]
lea ecx, [ebp - 0x28]
cmp esi, 8
cmovae eax, edi
cmovae ecx, edi
lea eax, [eax + edx*2]
cmp eax, ecx
je 0x40546f
cmp word [eax - 2], 0x5c
je 0x40546f
push 1
xor eax, eax
mov dword [ebp - 0x40], 0
push 0x433214
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
call fcn.00409f20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 8
mov ebx, dword [ebp - 0x40]
mov esi, dword [ebp - 0x18]
cmovae ecx, ebx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x30]
sub eax, esi
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], esi
cmp edx, eax
ja 0x405416
cmp dword [ebp - 0x14], 8
lea edi, [edx + esi]
mov eax, dword [ebp - 0x78]
lea esi, [ebp - 0x28]
cmovae esi, dword [ebp - 0x28]
mov dword [ebp - 0x18], edi
lea ecx, [esi + eax*2]
lea eax, [edx + edx]
push eax
push dword [ebp - 0x74]
push ecx
call fcn.00418010
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x40542b
push edx
push ecx
mov byte [ebp - 0x74], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x74]
push edx
call fcn.00409190
mov ebx, dword [ebp - 0x40]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x405466
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x40545c
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push ecx
push ebx
call fcn.004165af
add esp, 8
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov ebx, dword [ebp + 0x30]
mov eax, 0x7ffffffe
sub eax, edx
cmp eax, ebx
jb 0x4056ac
cmp esi, 8
lea ecx, [ebp - 0x28]
push ebx
cmovae ecx, edi
lea eax, [ebp + 0x20]
cmp dword [ebp + 0x34], 8
cmovae eax, dword [ebp + 0x20]
push eax
push edx
push ecx
push ecx
push dword [ebp - 0x74]
lea ecx, [ebp - 0x58]
call fcn.00409530
lea eax, [ebp + 0x38]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x40]
call fcn.00408650
sub esp, 0x18
mov byte [ebp - 4], 4
lea eax, [ebp - 0x58]
mov ecx, esp
push eax
call fcn.00408650
lea ecx, [ebp - 0x70]
call fcn.0040e880
add esp, 0x18
mov byte [ebp - 4], 5
lea eax, [ebp - 0x58]
cmp dword [ebp - 0x44], 8
cmovae eax, dword [ebp - 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405510
sub esp, 0xc0
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00402ca0
call fcn.00405c50
add esp, 0xc0
test al, al
je 0x405510
mov bl, 1
jmp 0x405530
cmp dword [ebp - 0x2c], 8
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x70]
cmovae edx, dword [ebp - 0x40]
cmp dword [ebp - 0x5c], 8
cmovae ecx, dword [ebp - 0x70]
call fcn.0040e7a0
test eax, eax
setne bl
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x40556a
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405560
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp - 0x2c]
xor eax, eax
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
cmp edx, 8
jb 0x4055b8
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4055ae
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push edx
push ecx
call fcn.004165af
add esp, 8
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x4055f2
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4055e8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push edx
push ecx
call fcn.004165af
add esp, 8
xor eax, eax
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], ax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40563c
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405632
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push edx
push ecx
call fcn.004165af
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
lea ecx, [ebp + 0x20]
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.00402dd0
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x40568e
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405684
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4056b1
push edx
push ecx
call fcn.004165af
add esp, 8
mov al, bl
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.004165a1
mov esp, ebp
pop ebp
ret
call fcn.00409d80
call fcn.00419a7c
int3