Function at 0x402c20
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x4251fe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x55c
push ebx
push ebp
push esi
push edi
push 0xe
push 0x428560
mov dword [esp + 0x57c], 0
call fcn.00402370
mov edi, dword [esp + 0x588]
add esp, 8
mov esi, eax
mov eax, 0x426180
test edi, edi
je 0x402c6d
mov eax, edi
push eax
lea eax, [esp + 0x264]
push esi
push eax
call fcn.0041bf8c
push esi
call fcn.0041bfde
add esp, 0x10
lea ecx, [esp + 0x260]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x402cd3
lea edx, [esp + 0x260]
lea eax, [esp + 0x468]
push edx
push str._s
push eax
call fcn.0041bf8c
add esp, 0xc
lea ecx, [esp + 0x120]
lea edx, [esp + 0x468]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
jne 0x402cf7
test edi, edi
je 0x403285
mov al, byte [edi - 1]
test al, al
je 0x402cf0
cmp al, 0xff
je 0x402cf0
dec al
mov byte [edi - 1], al
jmp 0x403285
dec edi
push edi
jmp 0x40327d
push 0x19
push 0x42853c
call fcn.00402370
push 0x36
push 0x428504
mov dword [esp + 0x34], eax
call fcn.00402370
push 0x37
push 0x4284cc
mov edi, eax
call fcn.00402370
push 4
push 0x4284c4
mov ebp, eax
call fcn.00402370
add esp, 0x20
mov ebx, eax
test byte [esp + 0x120], 0x10
je 0x402eeb
mov esi, 0x4284c0
lea eax, [esp + 0x14c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402d72
test cl, cl
je 0x402d6e
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402d72
add eax, 2
add esi, 2
test cl, cl
jne 0x402d4e
xor eax, eax
jmp 0x402d77
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402eeb
mov esi, 0x4284bc
lea eax, [esp + 0x14c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x402daf
test cl, cl
je 0x402dab
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x402daf
add eax, 2
add esi, 2
test cl, cl
jne 0x402d8b
xor eax, eax
jmp 0x402db4
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x402eeb
mov edx, dword [esp + 0x24]
lea eax, [esp + 0x14c]
lea ecx, [esp + 0x260]
push eax
push ecx
lea eax, [esp + 0x36c]
push edx
push eax
call fcn.0041bf8c
add esp, 0x10
lea ecx, [esp + 0x58]
call fcn.00408f50
push 0
lea ecx, [esp + 0x368]
push 0x74
lea edx, [esp + 0x4c]
push ecx
push edx
lea ecx, [esp + 0x68]
mov byte [esp + 0x584], 1
call fcn.00409080
mov ecx, eax
push 0
mov eax, dword [ecx]
test eax, eax
mov edx, dword [ecx + 4]
mov dword [esp + 0x38], edx
mov ecx, dword [ecx + 8]
mov dword [esp + 0x3c], ecx
jne 0x402f07
lea edx, [esp + 0x54]
push edi
push edx
lea ecx, [esp + 0x64]
call fcn.00413e10
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
mov dword [esp + 0x14], edx
call fcn.0040b7b0
test eax, eax
je 0x402e73
lea eax, [esp + 0x1c]
push ebx
lea ecx, [esp + 0x1c]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040b720
mov ecx, eax
call fcn.00408760
mov ecx, eax
call fcn.00408f00
push 0
lea edx, [esp + 0x40]
push ebp
push edx
lea ecx, [esp + 0x64]
call fcn.00413e10
mov ecx, dword [eax]
mov dword [esp + 0x10], ecx
lea ecx, [esp + 0x10]
mov edx, dword [eax + 4]
mov dword [esp + 0x14], edx
call fcn.0040b7b0
test eax, eax
je 0x402ec0
lea eax, [esp + 0x28]
push ebx
lea ecx, [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040b720
mov ecx, eax
call fcn.00408760
mov ecx, eax
call fcn.00408f00
push 0
push 0x21
lea edx, [esp + 0x36c]
push 0x428374
push edx
lea ecx, [esp + 0x68]
call fcn.004093f0
lea ecx, [esp + 0x58]
mov byte [esp + 0x574], 0
call fcn.00408f70
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x120]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x402f2a
jmp 0x402d34
push str.Error
push str.Failed_to_read_file
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [esp + 0x574], 0
lea ecx, [esp + 0x58]
jmp 0x40321f
push edi
call fcn.0041bfde
push ebp
call fcn.0041bfde
push ebx
call fcn.0041bfde
push 0x11
push 0x4284a8
call fcn.00402370
mov esi, eax
mov eax, dword [esp + 0x594]
add esp, 0x14
test eax, eax
mov eax, 0x426180
je 0x402f64
mov eax, dword [esp + 0x580]
push eax
lea edx, [esp + 0x264]
push esi
push edx
call fcn.0041bf8c
push esi
call fcn.0041bfde
mov ebx, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
add esp, 0x10
lea eax, [esp + 0x260]
push eax
call ebx
test eax, eax
je 0x403224
lea ecx, [esp + 0x260]
lea edx, [esp + 0x468]
push ecx
push str._s
push edx
call fcn.0041bf8c
add esp, 0xc
lea eax, [esp + 0x120]
lea ecx, [esp + 0x468]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x20], eax
je 0x403224
push 0x41
push 0x428464
call fcn.00402370
push 0x15
push 0x42844c
mov dword [esp + 0x2c], eax
call fcn.00402370
mov ebp, dword [esp + 0x34]
add esp, 0x10
mov dword [esp + 0x18], eax
test byte [esp + 0x120], 0x10
je 0x4031e5
mov esi, 0x4284c0
lea eax, [esp + 0x14c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403039
test cl, cl
je 0x403035
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403039
add eax, 2
add esi, 2
test cl, cl
jne 0x403015
xor eax, eax
jmp 0x40303e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4031e5
mov esi, 0x4284bc
lea eax, [esp + 0x14c]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x403076
test cl, cl
je 0x403072
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x403076
add eax, 2
add esi, 2
test cl, cl
jne 0x403052
xor eax, eax
jmp 0x40307b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4031e5
push 6
push 0x428444
call fcn.00402370
push 6
push 0x42843c
mov esi, eax
call fcn.00402370
mov edi, eax
push 6
lea eax, [esp + 0x160]
push esi
push eax
call fcn.0041c010
add esp, 0x1c
test eax, eax
je 0x4030e1
push 6
lea ecx, [esp + 0x150]
push edi
push ecx
call fcn.0041c010
add esp, 0xc
test eax, eax
je 0x4030e1
push esi
call fcn.0041bfde
push edi
call fcn.0041bfde
add esp, 8
jmp 0x4031e5
push esi
call fcn.0041bfde
push edi
call fcn.0041bfde
lea edx, [esp + 0x154]
lea eax, [esp + 0x268]
push edx
push eax
lea ecx, [esp + 0x374]
push ebp
push ecx
call fcn.0041bf8c
add esp, 0x18
lea edx, [esp + 0x364]
push edx
call ebx
test eax, eax
je 0x4031e5
lea ecx, [esp + 0x58]
call fcn.00408f50
push 0
lea eax, [esp + 0x368]
push 0x74
lea ecx, [esp + 0x4c]
push eax
push ecx
lea ecx, [esp + 0x68]
mov byte [esp + 0x584], 2
call fcn.00409080
mov edx, eax
push 0
mov eax, dword [edx]
test eax, eax
mov ecx, dword [edx + 4]
mov dword [esp + 0x38], ecx
mov edx, dword [edx + 8]
mov dword [esp + 0x3c], edx
jne 0x403201
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x40]
push eax
push ecx
lea ecx, [esp + 0x64]
call fcn.00413e10
mov edx, dword [eax]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], edx
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
call fcn.0040b7b0
test eax, eax
je 0x4031ba
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x2c]
push ecx
lea eax, [esp + 0x2c]
push edx
push eax
lea ecx, [esp + 0x1c]
call fcn.0040b720
mov ecx, eax
call fcn.00408760
mov ecx, eax
call fcn.00408f00
push 0
push 0x21
lea ecx, [esp + 0x36c]
push 0x428374
push ecx
lea ecx, [esp + 0x68]
call fcn.004093f0
lea ecx, [esp + 0x58]
mov byte [esp + 0x574], 0
call fcn.00408f70
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x120]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x403241
jmp 0x402ffb
push str.Error
push str.Failed_to_read_file
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [esp + 0x574], 0
lea ecx, [esp + 0x58]
call fcn.00408f70
mov ecx, dword [esp + 0x580]
test ecx, ecx
je 0x403285
mov al, byte [ecx - 1]
test al, al
je 0x40327b
cmp al, 0xff
je 0x40327b
dec al
mov byte [ecx - 1], al
jmp 0x403285
push ebp
call fcn.0041bfde
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.0041bfde
mov edx, dword [esp + 0x24]
push edx
call fcn.0041bfde
mov ecx, dword [esp + 0x58c]
add esp, 0xc
test ecx, ecx
je 0x403285
mov al, byte [ecx - 1]
test al, al
je 0x40327b
cmp al, 0xff
je 0x40327b
dec al
mov byte [ecx - 1], al
jmp 0x403285
dec ecx
push ecx
call fcn.0041b142
add esp, 4
mov ecx, dword [esp + 0x56c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x568
ret