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

Disassembly:
mov eax, 0x403b94
call sub.MSVCRT.dll__EH_prolog
sub esp, 0x34
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x1c]
mov dword [esp + 0x14], 0x12345678
call sub.MFC42.DLL_CString::CString
and dword [esp + 0x4c], 0
lea ebp, [esi + 0x170]
push ebp
lea ecx, [esi + 0x168]
call sub.MFC42.DLL_CString::operator
lea eax, [esp + 0x20]
lea edi, [esi + 0x64]
push eax
push edi
call dword [sym.imp.MSVCRT.dll__stat]
mov eax, dword [esp + 0x3c]
pop ecx
test eax, eax
pop ecx
mov dword [0x406034], eax
jne 0x401ea0
xor bl, bl
jmp 0x402158
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [esi + 0x16c], eax
je 0x401e99
push 0x40607c
push edi
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
pop ecx
test edi, edi
pop ecx
jne 0x401ed5
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
jmp 0x401e99
push edi
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push dword [0x406034]
push 1
push dword [esi + 0x16c]
call ebx
push edi
mov dword [esp + 0x24], eax
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [0x406034]
add esp, 0x14
cmp dword [esp + 0x10], eax
jne 0x401ec6
lea ecx, [eax - 4]
xor edi, edi
test ecx, ecx
jbe 0x401f61
mov ecx, dword [esi + 0x16c]
xor edx, edx
add ecx, edi
mov dword [esp + 0x18], ecx
mov cl, byte [ecx]
cmp cl, byte [esp + edx + 0x14]
jne 0x401f33
mov ecx, dword [esp + 0x18]
inc edx
inc ecx
cmp edx, 4
mov dword [esp + 0x18], ecx
jb 0x401f1c
cmp edx, 4
je 0x401f44
add edi, 4
lea ecx, [eax - 4]
cmp edi, ecx
jb 0x401f0e
jmp 0x401f61
mov eax, dword [esi + 0x16c]
push 8
add eax, edi
push 0x406030
push eax
call sub.MSVCRT.dll_memcpy
mov eax, dword [0x406034]
add esp, 0xc
add eax, 0xfffffffc
cmp edi, eax
jae 0x401ec6
mov eax, dword [ebp]
lea ecx, [esp + 0x20]
push ecx
push eax
call dword [sym.imp.MSVCRT.dll__stat]
pop ecx
test eax, eax
pop ecx
jne 0x402149
cmp dword [esp + 0x34], eax
je 0x402149
mov ecx, esi
call fcn.004021c5
test al, al
je 0x401ec6
mov eax, dword [esi + 0x178]
push 0x406064
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [esp + 0x18], eax
test eax, eax
pop ecx
je 0x401ec6
push eax
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
push dword [esp + 0x14]
push 1
push dword [esi + 0x16c]
call edi
mov dword [esp + 0x20], eax
mov eax, dword [ebp]
push 0x40607c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 0x18
test ebp, ebp
je 0x401ec6
push 0xc8
call dword [sym.imp.MSVCRT.dll_malloc]
test eax, eax
pop ecx
mov dword [esp + 0x18], eax
je 0x401e99
push ebp
push 0xc8
push 1
push eax
call ebx
push 0xc8
push dword [esp + 0x2c]
push dword [esi + 0x16c]
call sub.MSVCRT.dll_memcmp
add esp, 0x1c
test eax, eax
jne 0x402054
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
push dword [esi + 0x16c]
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
push dword [esp + 0x20]
call esi
add esp, 0xc
jmp 0x401e99
push dword [esp + 0x18]
call dword [sym.imp.MSVCRT.dll_free]
push 0
push 0
push ebp
call dword [sym.imp.MSVCRT.dll_fseek]
push dword [esp + 0x24]
lea eax, [esp + 0x48]
push 4
push 1
push eax
call edi
push dword [esp + 0x34]
add dword [esp + 0x34], eax
lea eax, [esp + 0x40]
push 4
push 1
push eax
call edi
push ebp
add dword [esp + 0x44], eax
push dword [0x406034]
push 1
push dword [esi + 0x16c]
call ebx
add esp, 0x40
test eax, eax
je 0x4020d0
push dword [esp + 0x14]
push eax
push 1
push dword [esi + 0x16c]
call edi
push ebp
add dword [esp + 0x24], eax
push dword [0x406034]
push 1
push dword [esi + 0x16c]
call ebx
add esp, 0x20
jmp 0x4020a3
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi + 0x174]
mov dword [esp], 0x40607c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
pop ecx
test ebp, ebp
pop ecx
je 0x402149
push ebp
push dword [0x406034]
push 1
push dword [esi + 0x16c]
call ebx
add esp, 0x10
test eax, eax
je 0x402134
push dword [esp + 0x14]
push eax
push 1
push dword [esi + 0x16c]
call edi
push ebp
add dword [esp + 0x24], eax
push dword [0x406034]
push 1
push dword [esi + 0x16c]
call ebx
add esp, 0x20
jmp 0x402107
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
push ebp
call edi
push dword [esp + 0x18]
call edi
pop ecx
mov bl, 1
pop ecx
jmp 0x40214b
xor bl, bl
push dword [esi + 0x16c]
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
or dword [esp + 0x4c], 0xffffffff
lea ecx, [esp + 0x1c]
call fcn.004033e2
mov ecx, dword [esp + 0x44]
pop edi
pop esi
mov al, bl
pop ebp
pop ebx
mov dword fs:[0], ecx
leave
ret