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

Disassembly:
sub esp, 0x54
push ebx
push ebp
push esi
mov esi, dword [esp + 0x64]
push edi
mov edi, ecx
test esi, esi
mov ebx, dword [edi + 4]
jne 0x401d17
call fcn.00403b40
test eax, eax
jne 0x401d31
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4
cmp esi, 1
jne 0x401d31
mov ecx, edi
call fcn.00403d40
test eax, eax
jne 0x401d31
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4
test ebx, ebx
je 0x402026
dec esi
lea ecx, [edi + 0xc]
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x4b
mov dword [esp + 0x68], esi
call sub.MFC42.DLL_CString::LockBuffer
lea ecx, [edi + 8]
mov dword [esp + 0x14], eax
call sub.MFC42.DLL_CString::LockBuffer
push 0x40e2b8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x401d7b
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4
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 eax, [esp + 0x2c]
push 0xe
push eax
call esi
push ebp
push 1
lea ecx, [esp + 0x60]
push 0x28
push ecx
call esi
mov edx, dword [esp + 0x6c]
add esp, 0x2c
mov eax, edx
and eax, 0x80000007
jns 0x401db9
dec eax
or eax, 0xfffffff8
inc eax
jne 0x401dbf
mov ecx, edx
jmp 0x401dd5
mov ecx, 8
sub ecx, eax
and ecx, 0x80000007
jns 0x401dd3
dec ecx
or ecx, 0xfffffff8
inc ecx
add ecx, edx
mov esi, dword [esp + 0x44]
mov eax, esi
and eax, 0x80000007
jns 0x401de7
dec eax
or eax, 0xfffffff8
inc eax
jne 0x401ded
mov eax, esi
jmp 0x401e04
mov edi, 8
sub edi, eax
mov eax, edi
and eax, 0x80000007
jns 0x401e02
dec eax
or eax, 0xfffffff8
inc eax
add eax, esi
mov dword [esp + 0x34], eax
mov dword [ebx + 0xc], eax
imul eax, ecx
mov word [esp + 0x38], 0x18
mov dword [esp + 0x30], ecx
lea eax, [eax + eax*2]
mov dword [esp + 0x2c], esi
push eax
mov dword [esp + 0x2c], 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 + 0x3c]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
push eax
push ebp
mov ecx, ebx
mov dword [esp + 0x2c], eax
call fcn.00402040
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 edx, dword [esp + 0x20]
add esp, 0x10
mov esi, eax
mov ecx, ebx
push esi
push ebp
push edi
push edx
call fcn.00402110
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
push 8
push 8
push eax
push ecx
push edi
mov ecx, ebx
call fcn.00402230
mov edx, dword [ebx + 0xc]
mov eax, dword [ebx + 8]
push 8
push 8
push edx
push eax
push ebp
mov ecx, ebx
call fcn.00402230
mov ecx, dword [ebx + 0xc]
mov edx, dword [ebx + 8]
push 8
push 8
push ecx
push edx
push esi
mov ecx, ebx
call fcn.00402230
mov eax, dword [esp + 0x68]
lea ecx, [ebx + 0x101c]
push eax
push ecx
push 0x40b578
mov ecx, ebx
call fcn.00402360
mov edx, dword [esp + 0x68]
lea eax, [ebx + 0x105c]
push edx
push eax
push 0x40b5b8
mov ecx, ebx
call fcn.00402360
mov ecx, ebx
call fcn.00402410
lea ecx, [ebx + 0x817]
mov dword [ebx + 0x1018], ecx
mov ecx, ebx
call fcn.00403990
mov edx, dword [esp + 0x14]
push 0x40e144
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebx + 4], eax
test eax, eax
je 0x401ff3
push eax
push 1
push 2
push 0x40b7e6
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov ecx, ebx
call fcn.004024d0
mov ecx, ebx
call fcn.00402540
mov ecx, ebx
call fcn.004025c0
mov ecx, ebx
call fcn.00402690
mov ecx, ebx
call fcn.00402850
lea eax, [ebx + 0x129c]
mov ecx, ebx
push eax
push 0x40b64c
push 0x40b638
call fcn.004028b0
lea ecx, [ebx + 0x132c]
push ecx
push 0x40b68c
push 0x40b678
mov ecx, ebx
call fcn.004028b0
lea edx, [ebx + 0x12e4]
mov ecx, ebx
push edx
push 0x40b66c
push 0x40b658
call fcn.004028b0
lea eax, [ebx + 0x192c]
mov ecx, ebx
push eax
push 0x40b744
push 0x40b730
call fcn.004028b0
push esi
push ebp
push edi
mov ecx, ebx
call fcn.00402960
mov ecx, dword [ebx + 4]
push ecx
push 1
push 2
push 0x40b7e8
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edx, dword [ebx + 4]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov eax, dword [esp + 0x10]
push eax
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 ecx, dword [ebx + 4]
add esp, 0x10
xor eax, eax
test ecx, ecx
setne al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x54
ret 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x54
ret 4