Function at 0x401170
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x401f56
push eax
mov eax, 0x1934c
mov dword fs:[0], esp
call fcn.00401da0
push edi
lea ecx, [esp + 0x14]
call fcn.00401d4c
mov edx, dword [esp + 0x19368]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x19358], 0
mov al, byte [ecx + edx - 1]
cmp al, 0x5c
mov eax, 0x403108
je 0x4011c9
mov eax, 0x403030
push eax
push edx
lea eax, [esp + 0x1c8]
push str._s_s.
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [esp + 0x1c0]
push 0
push ecx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x4013cb
push ebx
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
push ebp
mov ebp, dword [esp + 0x19368]
push esi
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [esp + 0x20]
mov dword [esp + 0x1c], eax
call sub.MFC42.DLL_CFileFind::IsDots
test eax, eax
jne 0x4013bc
lea edx, [esp + 0x14]
lea ecx, [esp + 0x20]
push edx
call sub.MFC42.DLL_CFileFind::GetFileName
push 0xc7
mov ecx, eax
mov byte [esp + 0x19368], 1
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x104]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x19364], 0
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
call fcn.00401d58
mov edx, dword [esp + 0x20]
push 0x10
lea ecx, [esp + 0x24]
call dword [edx + 0x40]
test eax, eax
je 0x4012d5
mov ecx, dword [esp + 0x19374]
lea eax, [esp + 0x104]
push eax
push ecx
lea edx, [esp + 0x29c]
push str._s_s_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x19380]
lea eax, [esp + 0x2a4]
push eax
push ecx
push ebp
call fcn.00401170
add esp, 0x1c
jmp 0x4013bc
mov eax, dword [esp + 0x19374]
lea edx, [esp + 0x104]
push edx
push eax
lea ecx, [esp + 0x44]
push 0x403018
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x19380]
or ecx, 0xffffffff
mov edi, esi
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ebp
push 4
lea edx, [esp + 0x28]
lea edi, [esp + ecx + 0x54]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
push edx
mov dword [esp + 0x30], ecx
call ebx
mov eax, dword [esp + 0x30]
push ebp
push eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
lea ecx, [esp + ecx + 0x68]
push ecx
call ebx
lea edx, [esp + 0x6c]
push 0x403014
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
mov esi, eax
push 2
push 0
push esi
call edi
add esp, 0x44
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov dword [esp + 0x1c], eax
push ebp
push 4
lea eax, [esp + 0x24]
push 1
push eax
call ebx
push 0
push 0
push esi
call edi
add esp, 0x20
push esi
push 0x19000
lea ecx, [esp + 0x364]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jle 0x4013b2
push ebp
push eax
lea edx, [esp + 0x364]
push 1
push edx
call ebx
add esp, 0x10
jmp 0x401382
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x40120c
pop esi
pop ebp
pop ebx
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CFileFind::Close
lea ecx, [esp + 0x14]
mov dword [esp + 0x19358], 0xffffffff
call sub.MFC42.DLL_CFileFind::CFileFind
mov ecx, dword [esp + 0x19350]
pop edi
mov dword fs:[0], ecx
add esp, 0x19358
ret