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

Disassembly:
push 0xffffffffffffffff
push 0x402647
mov eax, dword fs:[0]
push eax
mov eax, 0x19358
call fcn.004025a0
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x19350], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x1936c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x19380]
mov esi, dword [esp + 0x19384]
mov edi, dword [esp + 0x1937c]
lea ecx, [esp + 0x2c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], esi
call sub.mfc90.dll_Ordinal_406
mov eax, esi
mov dword [esp + 0x19374], 0
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4011b5
sub eax, edx
cmp byte [eax + esi - 1], 0x5c
mov eax, 0x40323b
je 0x4011cf
mov eax, 0x40323c
push eax
push esi
lea ecx, [esp + 0x1dc]
push str._s_s.
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push 0
lea edx, [esp + 0x1d8]
push edx
lea ecx, [esp + 0x34]
call sub.mfc90.dll_Ordinal_2490
test eax, eax
je 0x4013d0
mov ebp, dword [sym.imp.MSVCR90.dll_fwrite]
mov ebx, dword [sym.imp.MSVCR90.dll_fread]
mov edi, edi
lea ecx, [esp + 0x2c]
call sub.mfc90.dll_Ordinal_2501
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], eax
call sub.mfc90.dll_Ordinal_4308
test eax, eax
jne 0x4013c5
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x30]
call sub.mfc90.dll_Ordinal_3010
push 0xc7
mov ecx, eax
mov byte [esp + 0x19378], 1
call dword [sym.imp.mfc90.dll_Ordinal_2691]
lea edx, [esp + 0x10c]
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x401258
mov byte [esp + 0x19374], cl
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90.dll_Ordinal_601]
mov edx, dword [esp + 0x2c]
mov eax, dword [edx + 0x40]
push 0x10
lea ecx, [esp + 0x30]
call eax
test eax, eax
je 0x4012bd
lea ecx, [esp + 0x10c]
push ecx
push esi
lea edx, [esp + 0x2a4]
push str._s_s_
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x2ac]
push eax
push ecx
push edi
call fcn.00401140
add esp, 0x1c
jmp 0x4013c5
lea edx, [esp + 0x10c]
push edx
push esi
lea eax, [esp + 0x4c]
push 0x403250
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
mov esi, dword [esp + 0x24]
mov eax, esi
add esp, 0x10
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4012e2
sub eax, edx
lea eax, [esp + eax + 0x44]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4012f2
push edi
push 4
lea ecx, [esp + 0x20]
sub eax, edx
push 1
push ecx
mov dword [esp + 0x28], eax
call ebp
mov eax, esi
add esp, 0x10
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x401313
mov edx, dword [esp + 0x18]
push edi
push edx
sub eax, ecx
lea eax, [esp + eax + 0x4c]
push 1
push eax
call ebp
lea ecx, [esp + 0x54]
push 0x403258
push ecx
call dword [sym.imp.MSVCR90.dll_fopen]
push 2
mov esi, eax
push 0
push esi
call dword [sym.imp.MSVCR90.dll_fseek]
add esp, 0x24
push esi
call dword [sym.imp.MSVCR90.dll_ftell]
add esp, 4
push edi
push 4
lea edx, [esp + 0x30]
push 1
push edx
mov dword [esp + 0x38], eax
call ebp
push 0
push 0
push esi
call dword [sym.imp.MSVCR90.dll_fseek]
add esp, 0x1c
push esi
push 0x19000
lea eax, [esp + 0x36c]
push 1
push eax
call ebx
add esp, 0x10
test eax, eax
jle 0x4013b7
lea esp, [esp]
push edi
push eax
lea ecx, [esp + 0x36c]
push 1
push ecx
call ebp
push esi
push 0x19000
lea edx, [esp + 0x37c]
push 1
push edx
call ebx
add esp, 0x20
test eax, eax
jg 0x401390
push esi
call dword [sym.imp.MSVCR90.dll_fclose]
mov esi, dword [esp + 0x24]
add esp, 4
cmp dword [esp + 0x1c], 0
jne 0x401210
lea ecx, [esp + 0x2c]
call sub.mfc90.dll_Ordinal_1556
lea ecx, [esp + 0x2c]
mov dword [esp + 0x19374], 0xffffffff
call sub.mfc90.dll_Ordinal_665
mov ecx, dword [esp + 0x1936c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x19350]
xor ecx, esp
call fcn.00401d82
add esp, 0x19364
ret