Function at 0x4040a8
Capabilities:
Check if file exists
Enumerate files on windows
Get file attributes

Disassembly:
push 0x424
mov eax, 0x41c178
call fcn.0040869f
mov ebx, ecx
mov dword [ebp - 0x32c], ebx
mov dword [ebp - 0x328], ebx
xor eax, eax
mov dword [ebp - 0x328], ebx
lea edi, [ebp - 0x28]
xor ecx, ecx
stosd dword es:[edi], eax
mov dword [ebp - 0x330], ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], ecx
call fcn.00404062
mov edx, eax
xor edi, edi
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4040fd
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.0040575a
push 6
push 0x4243dc
lea ecx, [ebp - 0x28]
call fcn.004057c6
push 0x250
lea eax, [ebp - 0x320]
push edi
push eax
call fcn.00409ce0
add esp, 0xc
lea ecx, [ebp - 0x320]
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x328], eax
cmp eax, 0xffffffff
jne 0x40416b
push edi
mov ecx, ebx
call fcn.0040536e
jmp 0x40456d
push str.0.0.0
lea ecx, [ebp - 0x88]
call fcn.0040735d
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x37c]
push eax
call fcn.00402400
lea ecx, [ebp - 0x88]
call fcn.0040202c
xor eax, eax
lea edi, [ebp - 0x70]
stosd dword es:[edi], eax
xor ebx, ebx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
mov dword [ebp - 0x60], ebx
mov dword [ebp - 0x5c], 7
mov word [ebp - 0x70], ax
mov edi, dword [ebp - 0x328]
mov byte [ebp - 4], 4
lea eax, [ebp - 0x2f4]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040536e
push 0xffffffffffffffff
push 4
lea eax, [ebp - 0xb8]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x40]
call fcn.004052e8
push eax
lea ecx, [ebp - 0x40]
call fcn.00405337
lea ecx, [ebp - 0xb8]
call fcn.00407396
test byte [ebp - 0x320], 0x10
je 0x404408
cmp dword [ebp - 0x2c], 8
lea edx, [ebp - 0x40]
mov eax, dword [ebp - 0x30]
lea edi, [ebp - 0x58]
sbb cl, cl
cmp dword [ebp - 0x2c], 8
cmovae edx, dword [ebp - 0x40]
add cl, 1
lea esi, [edx + eax*2]
lea edx, [ebp - 0x40]
cmovne edx, dword [ebp - 0x40]
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], ebx
cmp edx, esi
jne 0x40424c
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], bl
jmp 0x40425d
mov eax, esi
lea ecx, [ebp - 0x58]
sub eax, edx
sar eax, 1
push eax
push esi
push edx
call fcn.0040604c
lea eax, [ebp - 0x58]
mov byte [ebp - 4], 6
push eax
lea eax, [ebp - 0x354]
push eax
call fcn.00402400
lea eax, [ebp - 0x2f4]
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x88]
call fcn.0040536e
mov byte [ebp - 4], 8
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
add eax, 0xfffffffb
push eax
push ebx
lea eax, [ebp - 0xb8]
push eax
call fcn.004052e8
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 9
push ecx
mov ecx, eax
call fcn.004057a9
push eax
lea ecx, [ebp - 0xa0]
call fcn.00407184
lea ecx, [ebp - 0xb8]
mov byte [ebp - 4], 0xb
call fcn.00407396
push str..not_finished
lea edx, [ebp - 0xa0]
lea ecx, [ebp - 0xd0]
call fcn.004058e3
pop ecx
cmp dword [eax + 0x14], 8
jb 0x4042ee
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404305
mov byte [ebp - 0x321], 1
test al, 0x10
je 0x40430b
mov byte [ebp - 0x321], bl
lea ecx, [ebp - 0xd0]
call fcn.00407396
cmp byte [ebp - 0x321], 0
jne 0x4043c2
lea eax, [ebp - 0x354]
push eax
lea eax, [ebp - 0x37c]
push eax
call fcn.004014ca
cmp eax, 0xffffffff
jne 0x4043c2
mov eax, dword [ebp - 0x354]
mov dword [ebp - 0x37c], eax
mov eax, dword [ebp - 0x350]
mov dword [ebp - 0x378], eax
mov eax, dword [ebp - 0x34c]
mov dword [ebp - 0x374], eax
mov eax, dword [ebp - 0x344]
sub eax, dword [ebp - 0x348]
push 0x1c
pop ecx
cdq
idiv ecx
lea ecx, [ebp - 0x370]
push eax
push dword [ebp - 0x348]
call fcn.00406346
mov eax, dword [ebp - 0x338]
sub eax, dword [ebp - 0x33c]
push 0x18
pop ecx
cdq
idiv ecx
lea ecx, [ebp - 0x364]
push eax
push dword [ebp - 0x33c]
call fcn.0040626f
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push dword [ebp - 0x30]
cmovae eax, dword [ebp - 0x40]
lea ecx, [ebp - 0x70]
push eax
call fcn.0040575a
lea ecx, [ebp - 0xa0]
call fcn.00407396
lea ecx, [ebp - 0x88]
call fcn.00407396
lea ecx, [ebp - 0x33c]
call fcn.004030b3
lea ecx, [ebp - 0x348]
call fcn.00403106
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jb 0x404402
inc eax
push eax
push dword [ebp - 0x58]
call fcn.00402000
pop ecx
pop ecx
mov edi, dword [ebp - 0x328]
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 4
call fcn.00407396
lea eax, [ebp - 0x320]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4041c2
push str.0.0.0
lea ecx, [ebp - 0x88]
call fcn.0040735d
lea eax, [ebp - 0x88]
mov byte [ebp - 4], 0xc
push eax
lea eax, [ebp - 0x354]
push eax
call fcn.00402400
lea eax, [ebp - 0x354]
mov byte [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x37c]
push eax
call fcn.004014ca
lea ecx, [ebp - 0x33c]
mov esi, eax
call fcn.004030b3
lea ecx, [ebp - 0x348]
call fcn.00403106
lea ecx, [ebp - 0x88]
mov byte [ebp - 4], 4
call fcn.0040202c
mov ebx, dword [ebp - 0x32c]
test esi, esi
jne 0x4044a8
xor eax, eax
mov ecx, ebx
push eax
call fcn.0040536e
jmp 0x40454f
call fcn.00404062
mov edx, eax
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
cmp cx, word [ebp - 0x330]
jne 0x4044b2
sub edx, esi
lea ecx, [ebp - 0x28]
sar edx, 1
push edx
push eax
call fcn.0040575a
push ecx
lea ecx, [ebp - 0x430]
call fcn.00405153
mov byte [ebp - 4], 0xe
lea edx, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
lea ecx, [ebp - 0x420]
push dword [ebp - 0x18]
cmovae edx, dword [ebp - 0x28]
call fcn.004060e0
pop ecx
mov ecx, eax
call fcn.00405940
cmp dword [ebp - 0x5c], 8
lea edx, [ebp - 0x70]
push dword [ebp - 0x60]
cmovae edx, dword [ebp - 0x70]
mov ecx, eax
call fcn.004060e0
pop ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
lea ecx, [ebp - 0x418]
call fcn.0040562d
lea ecx, [ebp - 0x3c8]
call fcn.00405124
lea eax, [ebp - 0x3c8]
mov byte [ebp - 4], 0xf
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004075d9
pop ecx
lea ecx, [ebp - 0x70]
call fcn.00407396
lea ecx, [ebp - 0x364]
call fcn.004030b3
lea ecx, [ebp - 0x370]
call fcn.00403106
lea ecx, [ebp - 0x28]
call fcn.00407396
mov eax, ebx
call fcn.0040864e
ret