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

Disassembly:
sub esp, 0x4c4
mov eax, dword [0x42b160]
xor eax, esp
mov dword [esp + 0x4c0], eax
push ebx
xor ebx, ebx
push ebp
push esi
mov esi, dword [esp + 0x4d4]
push edi
push 0x13c
lea eax, [esp + 0x8c]
push ebx
push eax
mov byte [esp + 0x34], 1
mov dword [esp + 0x39], ebx
mov dword [esp + 0x61], ebx
mov dword [esp + 0x5d], ebx
mov dword [esp + 0x59], ebx
mov dword [esp + 0x55], ebx
mov dword [esp + 0x51], ebx
mov dword [esp + 0x4d], ebx
mov dword [esp + 0x49], ebx
mov dword [esp + 0x45], ebx
mov dword [esp + 0x41], ebx
mov dword [esp + 0x3d], ebx
mov dword [esp + 0x35], ebx
mov dword [esp + 0x65], 0x11
mov dword [esp + 0x90], ebx
call fcn.00418570
add esp, 0xc
mov dword [esp + 0x14], ebx
call fcn.00404d40
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4059a0
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub eax, edx
cmp eax, 3
jae 0x405a4e
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov byte [esp + 0x28], 0x11
mov esi, 0x41
mov dword [esp + 0x10], 0x19
push esi
lea ecx, [esp + 0x2cc]
push str._C:_
push ecx
call fcn.0041861e
add esp, 0xc
lea edx, [esp + 0x2c8]
push edx
call ebp
cmp eax, 0xffffffff
je 0x405a41
lea eax, [esp + 0x2c8]
push eax
lea ecx, [esp + 0x1c8]
push str._s_r_n
push ecx
call fcn.0041861e
lea eax, [esp + 0x1d0]
add esp, 0xc
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405a20
mov ecx, dword [0x42c47c]
sub eax, edx
push ebx
lea edx, [esp + 0x18]
push edx
push eax
lea eax, [esp + 0x1d0]
push eax
push ecx
call edi
inc esi
sub dword [esp + 0x10], 1
jne 0x4059d0
jmp 0x405c64
push esi
call ebp
test al, 0x10
je 0x405ba0
push esi
lea edx, [esp + 0x2cc]
push str._s.
push edx
call fcn.0041861e
add esp, 0xc
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x2cc]
push ecx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x405b66
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x405aa0
cmp byte [esp + 0xb0], 0x2e
je 0x405b40
lea edx, [esp + 0xb0]
push edx
push esi
lea eax, [esp + 0x2d0]
push str._s_s
push eax
call fcn.0041861e
add esp, 0x10
lea ecx, [esp + 0x2c8]
push ecx
call ebp
test al, 0x10
je 0x405af1
lea edx, [esp + 0xb0]
push edx
push 0x4267d8
lea eax, [esp + 0x2d0]
push eax
jmp 0x405b06
lea ecx, [esp + 0xb0]
push ecx
push str._s_r_n
lea edx, [esp + 0x2d0]
push edx
call fcn.0041861e
lea eax, [esp + 0x2d4]
add esp, 0xc
inc dword [esp + 0x2d]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405b20
push ebx
sub eax, edx
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [0x42c47c]
lea edx, [esp + 0x2d4]
push edx
push eax
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x84]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405aa0
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x2d], eax
cmp eax, ebx
jne 0x405b96
push ebx
lea ecx, [esp + 0x2c]
push ecx
mov ecx, 0x42c650
mov byte [esp + 0x30], 1
mov dword [esp + 0x61], 0x11
call fcn.00414ce0
jmp 0x405c90
mov byte [esp + 0x28], 0x11
jmp 0x405c64
lea edx, [esp + 0x60]
push edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
mov esi, dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x68]
push ecx
call esi
movzx edx, word [esp + 0x1e]
movzx eax, word [esp + 0x1a]
movzx ecx, word [esp + 0x18]
push edx
mov edx, dword [esp + 0x84]
push eax
push ecx
push edx
lea eax, [esp + 0x1d4]
push str.is_file
push eax
call fcn.0041861e
add esp, 0x18
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x78]
push edx
call esi
lea eax, [esp + 0x1c4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c04
movzx ecx, word [esp + 0x1e]
push ecx
movzx ecx, word [esp + 0x1c]
sub eax, edx
movzx edx, word [esp + 0x1e]
push edx
push ecx
lea edx, [esp + eax + 0x1d0]
push str.et__d__d__d
push edx
call fcn.0041861e
lea eax, [esp + 0x1d8]
add esp, 0x14
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405c40
push ebx
sub eax, edx
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [0x42c47c]
lea edx, [esp + 0x1d0]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea ecx, [esp + 0x29]
push ecx
call fcn.00404d70
add esp, 4
mov esi, eax
push esi
lea edx, [esp + 0x2c]
push edx
mov ecx, 0x42c650
call fcn.00414ce0
cmp esi, ebx
je 0x405c90
push esi
call fcn.00418bde
add esp, 4
mov ecx, dword [esp + 0x4d0]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0041869b
add esp, 0x4c4
ret