Function at 0x4056c0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42b0ad
mov eax, dword fs:[0]
push eax
sub esp, 0x58
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
mov byte [ebp - 0x41], 0
call fcn.0040cce0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
test edx, edx
jne 0x405710
xor bl, bl
jmp 0x4058b7
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 0x405813
cmp word [eax - 2], 0x5c
je 0x405813
push 1
xor eax, eax
mov dword [ebp - 0x64], 0
push 0x433214
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
call fcn.00409f20
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x64]
cmp dword [ebp - 0x50], 8
mov ebx, dword [ebp - 0x64]
mov esi, dword [ebp - 0x18]
cmovae ecx, ebx
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x54]
sub eax, esi
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x4c], esi
cmp edx, eax
ja 0x4057ba
cmp dword [ebp - 0x14], 8
lea edi, [edx + esi]
mov eax, dword [ebp - 0x4c]
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 - 0x48]
push ecx
call fcn.00418010
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x4057cf
push edx
push ecx
mov byte [ebp - 0x48], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x48]
push edx
call fcn.00409190
mov ebx, dword [ebp - 0x64]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x50]
cmp eax, 8
jb 0x40580a
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x405800
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405962
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 0x40595d
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 - 0x48]
lea ecx, [ebp - 0x40]
call fcn.00409530
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
movzx ebx, byte [ebp - 0x41]
test eax, eax
mov edx, dword [ebp - 0x2c]
mov ecx, 1
cmovne ebx, ecx
cmp edx, 8
jb 0x4058a3
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405899
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405962
push edx
push ecx
call fcn.004165af
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4058ed
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4058e3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405962
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 0x40593f
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x405935
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x405962
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