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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x48
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 4]
mov dword [esi + 0x1f64], eax
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x4012f5
push 0
call fcn.00403110
test ebx, ebx
je 0x4015f3
mov ecx, dword [esi + 0x1f64]
lea edi, [esi + 0x1f50]
mov dword [esp + 0x60], ecx
mov ecx, edi
mov dword [esp + 0x14], edi
call sub.MFC42.DLL_CString::LockBuffer
add esi, 0x1f4c
mov dword [esp + 0x10], eax
mov ecx, esi
mov dword [esp + 0x18], esi
call sub.MFC42.DLL_CString::LockBuffer
push 0x40c06c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4015e5
push 0
push 0
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
mov esi, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 1
lea edx, [esp + 0x30]
push 0xe
push edx
call esi
push ebp
push 1
lea eax, [esp + 0x54]
push 0x28
push eax
call esi
mov edx, dword [esp + 0x60]
add esp, 0x2c
mov eax, edx
and eax, 0x80000007
jns 0x401384
dec eax
or eax, 0xfffffff8
inc eax
jne 0x40138a
mov ecx, edx
jmp 0x4013a0
mov ecx, 8
sub ecx, eax
and ecx, 0x80000007
jns 0x40139e
dec ecx
or ecx, 0xfffffff8
inc ecx
add ecx, edx
mov esi, dword [esp + 0x38]
mov eax, esi
and eax, 0x80000007
jns 0x4013b2
dec eax
or eax, 0xfffffff8
inc eax
jne 0x4013b8
mov eax, esi
jmp 0x4013cf
mov edi, 8
sub edi, eax
mov eax, edi
and eax, 0x80000007
jns 0x4013cd
dec eax
or eax, 0xfffffff8
inc eax
add eax, esi
mov dword [esp + 0x28], eax
mov dword [ebx + 0xc], eax
imul eax, ecx
mov word [esp + 0x2c], 0x18
mov dword [esp + 0x24], ecx
lea eax, [eax + eax*2]
mov dword [esp + 0x20], esi
push eax
mov dword [esp + 0x20], edx
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x14], esi
mov dword [ebx + 8], ecx
call sub.MFC42.DLL_operatornew
sub esp, 0x10
mov ecx, 5
lea esi, [esp + 0x30]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push eax
push ebp
mov ecx, ebx
mov dword [esp + 0x78], eax
call fcn.00401610
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov esi, dword [ebx + 8]
mov byte [ebx], 0
imul esi, dword [ebx + 0xc]
push esi
mov byte [ebx + 1], 7
call sub.MFC42.DLL_operatornew
push esi
mov edi, eax
call sub.MFC42.DLL_operatornew
push esi
mov ebp, eax
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x6c]
add esp, 0x10
mov esi, eax
push esi
push ebp
push edi
push ecx
mov ecx, ebx
call fcn.004016e0
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
push 8
push 8
push edx
push eax
push edi
mov ecx, ebx
call fcn.00401800
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push 8
push 8
push ecx
push edx
push ebp
mov ecx, ebx
call fcn.00401800
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
push 8
push 8
push eax
push ecx
push esi
mov ecx, ebx
call fcn.00401800
mov edx, dword [esp + 0x60]
lea eax, [ebx + 0x101c]
push edx
push eax
push 0x409490
mov ecx, ebx
call fcn.00401930
mov ecx, dword [esp + 0x60]
lea edx, [ebx + 0x105c]
push ecx
push edx
push 0x4094d0
mov ecx, ebx
call fcn.00401930
mov ecx, ebx
call fcn.004019e0
lea eax, [ebx + 0x817]
mov ecx, ebx
mov dword [ebx + 0x1018], eax
call fcn.00402f60
mov ecx, dword [esp + 0x10]
push 0x40c068
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebx + 4], eax
test eax, eax
je 0x4015be
push eax
push 1
push 2
push 0x4096fe
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov ecx, ebx
call fcn.00401aa0
mov ecx, ebx
call fcn.00401b10
mov ecx, ebx
call fcn.00401b90
mov ecx, ebx
call fcn.00401c60
mov ecx, ebx
call fcn.00401e20
lea edx, [ebx + 0x129c]
mov ecx, ebx
push edx
push 0x409564
push 0x409550
call fcn.00401e80
lea eax, [ebx + 0x132c]
mov ecx, ebx
push eax
push 0x4095a4
push 0x409590
call fcn.00401e80
lea ecx, [ebx + 0x12e4]
push ecx
push 0x409584
push 0x409570
mov ecx, ebx
call fcn.00401e80
lea edx, [ebx + 0x192c]
mov ecx, ebx
push edx
push 0x40965c
push 0x409648
call fcn.00401e80
push esi
push ebp
push edi
mov ecx, ebx
call fcn.00401f30
mov eax, dword [ebx + 4]
push eax
push 1
push 2
push 0x409700
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ecx, dword [ebx + 4]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov edx, dword [esp + 0x5c]
push edx
call sub.MFC42.DLL_operatordelete
push edi
call sub.MFC42.DLL_operatordelete
push ebp
call sub.MFC42.DLL_operatordelete
push esi
call sub.MFC42.DLL_operatordelete
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
add esp, 0x10
mov ecx, esi
call sub.MFC42.DLL_CString::UnlockBuffer
mov ecx, edi
call sub.MFC42.DLL_CString::UnlockBuffer
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x48
ret 8