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

Disassembly:
jmp 0x401780
push 0xffffffffffffffff
push 0x403e18
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x4c]
mov ecx, 0x4068fc
push eax
mov dword [esp + 0x48], 2
mov dword [esp + 0x14], 0x12345678
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x18]
push ecx
push 0x406900
call dword [sym.imp.MSVCRT.dll__stat]
mov eax, dword [esp + 0x34]
add esp, 8
test eax, eax
mov dword [0x406624], eax
je 0x401a8b
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [0x406b0c], eax
test eax, eax
je 0x401a8b
push 0x406650
push 0x406900
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x401a7b
mov eax, dword [0x406624]
mov ecx, dword [0x406b0c]
push esi
push eax
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov edi, eax
push esi
mov dword [esp + 0x28], edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov edx, dword [0x406624]
add esp, 0x14
cmp edi, edx
jne 0x401a7b
mov ebp, dword [0x406b0c]
lea edi, [edx - 4]
xor ecx, ecx
test edi, edi
jbe 0x40189b
xor eax, eax
lea esi, [ecx + ebp]
mov bl, byte [esi + eax]
cmp bl, byte [esp + eax + 0x10]
jne 0x40186a
inc eax
cmp eax, 4
jb 0x40185b
cmp eax, 4
je 0x401878
add ecx, 4
cmp ecx, edi
jb 0x401856
jmp 0x40189b
mov eax, dword [0x406620]
mov dword [ecx + ebp], eax
mov eax, dword [0x406b0c]
mov edx, dword [0x406624]
mov dword [eax + ecx + 4], edx
mov edx, dword [0x406624]
mov ebp, dword [0x406b0c]
add edx, 0xfffffffc
cmp ecx, edx
jb 0x4018a8
push ebp
jmp 0x401a82
mov edx, dword [esp + 0x4c]
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x401a7b
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x401a7b
cmp eax, dword [esp + 0x58]
jg 0x401a7b
call fcn.00401023
mov eax, dword [esp + 0x54]
push 0x40664c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x401903
mov ecx, dword [0x406b0c]
push ecx
jmp 0x401a82
mov edx, dword [esp + 0x14]
mov eax, dword [0x406b0c]
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
push esi
push edx
push 1
push eax
call ebx
mov ecx, dword [esp + 0x5c]
push 0x406650
push ecx
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x40193d
mov edx, dword [0x406b0c]
push edx
jmp 0x4019bc
push esi
push 4
lea eax, [esp + 0x34]
push 1
push eax
call ebx
mov ecx, dword [0x406624]
mov edx, dword [0x406b0c]
push edi
push ecx
push 1
push edx
add ebp, eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x20
test eax, eax
je 0x401995
push esi
push eax
mov eax, dword [0x406b0c]
push 1
push eax
call ebx
mov ecx, dword [0x406624]
mov edx, dword [0x406b0c]
push edi
push ecx
push 1
push edx
add ebp, eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x20
test eax, eax
jne 0x401969
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x54]
push 0x406650
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4019d1
mov ecx, dword [0x406b0c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 8
jmp 0x401a8b
mov edx, dword [0x406624]
mov eax, dword [0x406b0c]
push edi
push edx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
je 0x401a1a
mov ecx, dword [0x406b0c]
push esi
push eax
push 1
push ecx
call ebx
mov edx, dword [0x406624]
add ebp, eax
mov eax, dword [0x406b0c]
push edi
push edx
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x20
test eax, eax
jne 0x4019ee
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fclose]
call edi
push esi
call edi
mov ecx, dword [0x406b0c]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0xc
lea ecx, [esp + 0x4c]
mov byte [esp + 0x44], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x50]
mov byte [esp + 0x44], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CString::CString
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x2c]
mov dword fs:[0], ecx
add esp, 0x38
ret
mov edx, dword [0x406b0c]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x4c]
mov byte [esp + 0x44], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x50]
mov byte [esp + 0x44], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x54]
mov dword [esp + 0x44], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov dword fs:[0], ecx
add esp, 0x38
ret