Function at 0x406ae0
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d335
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x43a00c]
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.0040e1c0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
test edx, edx
jne 0x406b2c
xor bl, bl
jmp 0x406dc6
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 0x406c2f
cmp word [eax - 2], 0x5c
je 0x406c2f
push 1
xor eax, eax
mov dword [ebp - 0x40], 0
push 0x434f10
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
call fcn.0040c560
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 0x406bd6
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.00419040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x406beb
push edx
push ecx
mov byte [ebp - 0x74], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x74]
push edx
call fcn.0040b310
mov ebx, dword [ebp - 0x40]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x406c26
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x406c1c
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push ecx
push ebx
call fcn.00417807
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 0x406e6c
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.0040b6b0
lea eax, [ebp + 0x38]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x40]
call fcn.0040a240
sub esp, 0x18
mov byte [ebp - 4], 4
lea eax, [ebp - 0x58]
mov ecx, esp
push eax
call fcn.0040a240
lea ecx, [ebp - 0x70]
call fcn.0040fd50
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 0x406cd0
sub esp, 0xc0
lea eax, [ebp + 8]
mov ecx, esp
push eax
call fcn.00403100
call fcn.00407410
add esp, 0xc0
test al, al
je 0x406cd0
mov bl, 1
jmp 0x406cf0
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.0040fc70
test eax, eax
setne bl
mov edx, dword [ebp - 0x5c]
cmp edx, 8
jb 0x406d2a
mov ecx, dword [ebp - 0x70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406d20
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push edx
push ecx
call fcn.00417807
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 0x406d78
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406d6e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push edx
push ecx
call fcn.00417807
add esp, 8
mov edx, dword [ebp - 0x44]
cmp edx, 8
jb 0x406db2
mov ecx, dword [ebp - 0x58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406da8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push edx
push ecx
call fcn.00417807
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 0x406dfc
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406df2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push edx
push ecx
call fcn.00417807
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.00403230
mov edx, dword [ebp + 0x1c]
cmp edx, 8
jb 0x406e4e
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x406e44
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x406e71
push edx
push ecx
call fcn.00417807
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.004177f9
mov esp, ebp
pop ebp
ret
call fcn.0040c400
call fcn.0041af8c
int3