Function at 0x406e80
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d37d
mov eax, dword fs:[0]
push eax
sub esp, 0x58
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
mov byte [ebp - 0x41], 0
call fcn.0040e1c0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
test edx, edx
jne 0x406ed0
xor bl, bl
jmp 0x407077
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 0x406fd3
cmp word [eax - 2], 0x5c
je 0x406fd3
push 1
xor eax, eax
mov dword [ebp - 0x64], 0
push 0x434f10
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x50], 7
mov word [ebp - 0x64], ax
call fcn.0040c560
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 0x406f7a
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.00419040
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
jmp 0x406f8f
push edx
push ecx
mov byte [ebp - 0x48], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x48]
push edx
call fcn.0040b310
mov ebx, dword [ebp - 0x64]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x50]
cmp eax, 8
jb 0x406fca
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x406fc0
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407122
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 0x40711d
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.0040b6b0
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 0x407063
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x407059
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407122
push edx
push ecx
call fcn.00417807
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 0x4070ad
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4070a3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407122
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 0x4070ff
mov ecx, dword [ebp + 8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4070f5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x407122
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