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

Disassembly:
push 0x200
mov eax, 0x412c19
call fcn.00411e05
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 0x4154dc
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 0x406c01
push ecx
push ecx
lea ecx, [ebp - 0x20c]
call fcn.0040f7ae
mov byte [ebp - 4], 2
push dword [ebp - 0x1c]
call fcn.0040fb22
test eax, eax
jne 0x406bf6
push 0x4154e4
lea ecx, [ebp - 0x20c]
call fcn.004044be
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
call fcn.004045b0
test eax, eax
jne 0x4067ad
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
jmp 0x406bf5
push 0x4154f0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
je 0x40681f
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x4067d6
mov eax, dword [esi + 0x1c]
jmp 0x4067d8
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
test eax, eax
je 0x40681f
test esi, esi
je 0x4067f0
mov eax, dword [esi + 0x1c]
jmp 0x4067f2
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
mov ecx, eax
call fcn.0040e9aa
test eax, eax
je 0x40681f
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
mov esi, dword [ebp + 0x10]
push eax
lea ecx, [esi + 0xc]
call fcn.00401a37
jmp 0x406822
mov esi, dword [ebp + 0x10]
push 0x4154fc
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
je 0x406875
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40684b
mov eax, dword [eax + 0x1c]
jmp 0x40684d
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
mov ecx, eax
call fcn.0040e9aa
test eax, eax
je 0x406875
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [esi + 0x10]
call fcn.00401a37
push 0x415504
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
je 0x4068cc
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40689e
mov eax, dword [eax + 0x1c]
jmp 0x4068a0
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
test eax, eax
je 0x4068cc
mov ecx, eax
call fcn.0040e9aa
test eax, eax
je 0x4068cc
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [esi + 0x14]
call fcn.00401a37
push 0x415510
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
je 0x406923
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4068f5
mov eax, dword [eax + 0x1c]
jmp 0x4068f7
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
test eax, eax
je 0x406923
mov ecx, eax
call fcn.0040e9aa
test eax, eax
je 0x406923
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [esi + 0x18]
call fcn.00401a37
push 0x41551c
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
je 0x40697a
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40694c
mov eax, dword [eax + 0x1c]
jmp 0x40694e
mov eax, edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], eax
call fcn.004045d0
test eax, eax
je 0x40697a
mov ecx, eax
call fcn.0040e9aa
test eax, eax
je 0x40697a
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [esi + 0x28]
call fcn.00401a37
cmp dword [ebp + 0xc], 0
je 0x406bea
mov ecx, dword [ebp + 8]
lea ecx, [ecx - 0x10]
call fcn.00401b9c
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 0x4069dd
sub eax, dword [ebp + 8]
sar eax, 1
js 0x4069dd
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp + 8]
call fcn.00403470
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 4
call fcn.00403848
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
lea ecx, [ecx - 0x10]
call fcn.00401572
mov esi, dword [ebp - 0x18]
mov edi, dword [esi - 0xc]
cmp edi, ebx
jg 0x4069f4
lea ecx, [esi - 0x10]
call fcn.00401b9c
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
jmp 0x406a0e
lea ecx, [ebp - 0x18]
call fcn.00403955
dec edi
push eax
push ebx
lea ecx, [esi + edi*2]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00403a91
mov edi, dword [ebp - 0x10]
push 0x414bd8
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 5
call fcn.0040376f
lea ecx, [edi - 0x10]
mov byte [ebp - 4], 3
mov ebx, eax
call fcn.00401572
test ebx, ebx
je 0x406a41
push 0x414bd8
lea ecx, [ebp - 0x18]
call fcn.004037b5
mov esi, dword [ebp - 0x18]
push str.FileList
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x14]
call fcn.00404588
lea ecx, [ebp - 0x10]
call fcn.004045b0
test eax, eax
jne 0x406a78
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.00401572
xor ebx, ebx
inc ebx
jmp 0x406bf6
push str.FileItem
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x10]
call fcn.00404588
lea ecx, [ebp - 0x14]
call fcn.004045b0
test eax, eax
je 0x406be0
mov edi, dword [ebp + 0x10]
push ecx
push str.name
lea ecx, [ebp - 0x14]
call fcn.004045b0
mov ecx, eax
call fcn.0040f3c8
push ecx
push str.description
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x2c], eax
call fcn.004045b0
mov ecx, eax
call fcn.0040f3c8
push ecx
push str.optional
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x34], eax
call fcn.004045b0
mov ecx, eax
call fcn.0040f3c8
mov ebx, eax
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x406bbd
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [ebp - 0x10]
call fcn.004038e5
lea ecx, [ebp - 0x4c]
call fcn.004045f0
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x4c]
call fcn.00403848
lea eax, [ebp - 0x10]
push eax
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x30]
call fcn.0040701e
pop ecx
push eax
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 8
call fcn.00403848
mov byte [ebp - 4], 7
mov ecx, dword [ebp - 0x30]
lea ecx, [ecx - 0x10]
call fcn.00401572
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x406b5d
push eax
lea ecx, [ebp - 0x28]
call fcn.00404636
push eax
lea ecx, [ebp - 0x44]
call fcn.00401a37
and dword [ebp - 0x40], 0
test ebx, ebx
je 0x406b7d
cmp byte [ebx], 0x31
jne 0x406b77
movzx eax, byte [ebx + 1]
test al, al
jne 0x406b77
xor eax, eax
inc eax
jmp 0x406b7a
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 0x406ba6
test al, 0x10
jne 0x406ba6
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x10]
push eax
lea ecx, [edi + 0x78]
call fcn.00406f91
mov ecx, eax
call fcn.00404a95
lea ecx, [ebp - 0x4c]
call fcn.0040632f
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
call fcn.00401572
push ecx
lea ecx, [ebp - 0x14]
call fcn.004045b0
mov ecx, eax
call fcn.004044f0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], eax
call fcn.004045b0
test eax, eax
jne 0x406a9c
lea ecx, [esi - 0x10]
call fcn.00401572
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.0040f925
lea ecx, [ebp - 0x28]
call fcn.004026cc
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
call fcn.00401572
mov eax, ebx
call fcn.00411dce
ret 0xc