Function at 0x406758
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push 0x200
mov eax, 0x412c59
call fcn.00411e45
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], edi
xor ebx, ebx
lea eax, [ebp - 0x1c]
inc ebx
mov byte [ebp - 4], bl
push 0x4154ec
push dword [ebp + 8]
mov dword [ebp - 0x1c], edi
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
add esp, 0xc
cmp dword [ebp - 0x1c], edi
je 0x406c3e
push ecx
push ecx
lea ecx, [ebp - 0x20c]
call fcn.0040f7ee
mov byte [ebp - 4], 2
push dword [ebp - 0x1c]
call fcn.0040fb62
test eax, eax
jne 0x406c33
push 0x4154f4
lea ecx, [ebp - 0x20c]
call fcn.004044fe
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
call fcn.004045f0
test eax, eax
jne 0x4067ea
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x406c32
push 0x415500
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
je 0x40685c
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x406813
mov eax, dword [esi + 0x1c]
jmp 0x406815
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
test eax, eax
je 0x40685c
test esi, esi
je 0x40682d
mov eax, dword [esi + 0x1c]
jmp 0x40682f
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
mov ecx, eax
call fcn.0040e9ea
test eax, eax
je 0x40685c
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
mov esi, dword [ebp + 0x10]
push eax
lea ecx, [esi + 0xc]
call fcn.00401a77
jmp 0x40685f
mov esi, dword [ebp + 0x10]
push 0x41550c
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
je 0x4068b2
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x406888
mov eax, dword [eax + 0x1c]
jmp 0x40688a
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
mov ecx, eax
call fcn.0040e9ea
test eax, eax
je 0x4068b2
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [esi + 0x10]
call fcn.00401a77
push 0x415514
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
je 0x406909
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4068db
mov eax, dword [eax + 0x1c]
jmp 0x4068dd
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
test eax, eax
je 0x406909
mov ecx, eax
call fcn.0040e9ea
test eax, eax
je 0x406909
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [esi + 0x14]
call fcn.00401a77
push 0x415520
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
je 0x406960
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x406932
mov eax, dword [eax + 0x1c]
jmp 0x406934
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
test eax, eax
je 0x406960
mov ecx, eax
call fcn.0040e9ea
test eax, eax
je 0x406960
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [esi + 0x18]
call fcn.00401a77
push 0x41552c
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
je 0x4069b7
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x406989
mov eax, dword [eax + 0x1c]
jmp 0x40698b
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.00404610
test eax, eax
je 0x4069b7
mov ecx, eax
call fcn.0040e9ea
test eax, eax
je 0x4069b7
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [esi + 0x28]
call fcn.00401a77
cmp dword [ebp + 0xc], 0
je 0x406c27
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00401bdc
lea esi, [eax + 0x10]
mov dword [ebp - 0x18], esi
mov byte [ebp - 4], 3
push 0x5c
push dword [ebp + 8]
call dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
pop ecx
pop ecx
test eax, eax
je 0x406a1a
sub eax, dword [ebp + 8]
sar eax, 1
js 0x406a1a
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.004034b0
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.00403888
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.004015b2
mov esi, dword [ebp - 0x18]
mov edi, dword [esi - 0xc]
cmp edi, ebx
jg 0x406a31
lea ecx, [esi - 0x10]
call fcn.00401bdc
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
jmp 0x406a4b
lea ecx, [ebp - 0x18]
call fcn.00403995
dec edi
push eax
push ebx
lea ecx, [esi + edi*2]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00403ad1
mov edi, dword [ebp - 0x10]
push 0x414be8
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.004037af
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 3
mov ebx, eax
call fcn.004015b2
test ebx, ebx
je 0x406a7e
push 0x414be8
lea ecx, [ebp - 0x18]
call fcn.004037f5
mov esi, dword [ebp - 0x18]
push str.FileList
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.004045c8
lea ecx, [ebp - 0x10]
call fcn.004045f0
test eax, eax
jne 0x406ab5
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
lea ecx, [esi - 0x10]
call fcn.004015b2
xor ebx, ebx
inc ebx
jmp 0x406c33
push str.FileItem
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.004045c8
lea ecx, [ebp - 0x14]
call fcn.004045f0
test eax, eax
je 0x406c1d
mov edi, dword [ebp + 0x10]
push ecx
push str.name
lea ecx, [ebp - 0x14]
call fcn.004045f0
mov ecx, eax
call fcn.0040f408
push ecx
push str.description
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x2c], eax
call fcn.004045f0
mov ecx, eax
call fcn.0040f408
push ecx
push str.optional
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x34], eax
call fcn.004045f0
mov ecx, eax
call fcn.0040f408
mov ebx, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x406bfa
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [ebp - 0x10]
call fcn.00403925
lea ecx, [ebp - 0x4c]
call fcn.00404630
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x4c]
call fcn.00403888
lea eax, [ebp - 0x10]
push eax
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x30]
call fcn.0040705b
pop ecx
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 8
call fcn.00403888
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.004015b2
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406b9a
push eax
lea ecx, [ebp - 0x28]
call fcn.00404676
push eax
lea ecx, [ebp - 0x44]
call fcn.00401a77
and dword [ebp - 0x40], 0
test ebx, ebx
je 0x406bba
cmp byte [ebx], 0x31
jne 0x406bb4
movzx eax, byte [ebx + 1]
test al, al
jne 0x406bb4
xor eax, eax
inc eax
jmp 0x406bb7
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], eax
push dword [ebp - 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x406be3
test al, 0x10
jne 0x406be3
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [edi + 0x78]
call fcn.00406fce
mov ecx, eax
call fcn.00404ad5
lea ecx, [ebp - 0x4c]
call fcn.0040636c
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.004015b2
push ecx
lea ecx, [ebp - 0x14]
call fcn.004045f0
mov ecx, eax
call fcn.00404530
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
call fcn.004045f0
test eax, eax
jne 0x406ad9
lea ecx, [esi - 0x10]
call fcn.004015b2
xor edi, edi
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ebx, edi
pop ecx
lea ecx, [ebp - 0x20c]
call fcn.0040f965
lea ecx, [ebp - 0x28]
call fcn.0040270c
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.004015b2
mov eax, ebx
call fcn.00411e0e
ret 0xc