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

Disassembly:
mov eax, 0x4288c8
call fcn.00428180
sub esp, 0x14
push ebx
push esi
mov esi, ecx
push edi
lea ecx, [esi + 0x20]
mov dword [ebp - 0x20], ecx
call sub.MFC42.DLL_CString::Empty
mov eax, dword [esi + 4]
mov ecx, 0x42f86c
test al, 0x40
je 0x402459
mov ecx, 0x42f868
jmp 0x402462
test al, 0x20
je 0x402462
mov ecx, 0x42f864
push ecx
xor edi, edi
push dword [ebp + 8]
mov dword [esi], edi
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
cmp eax, edi
pop ecx
mov dword [esi], eax
je 0x4026e1
mov ecx, dword [esi + 4]
mov bl, 1
test cl, 0x10
mov dword [ebp + 8], edi
mov dword [esi + 0x18], 1
je 0x40263c
push 2
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
push dword [esi]
call dword [sym.imp.MSVCRT.dll_ftell]
push edi
push edi
push dword [esi]
mov dword [esi + 0x10], eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [esi + 0x10]
mov eax, 0x400
add esp, 0x1c
cmp ecx, eax
mov dword [ebp - 0x10], eax
jge 0x4024d0
cmp ecx, edi
mov dword [ebp - 0x10], ecx
je 0x40267d
push dword [ebp - 0x10]
call sub.MFC42.DLL_operatornew
cmp dword [ebp - 0x10], edi
pop ecx
mov dword [ebp - 0x18], eax
je 0x402501
push dword [esi]
push 1
push dword [ebp - 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov ebx, eax
add esp, 0x10
dec ebx
neg ebx
sbb bl, bl
inc bl
je 0x40262e
and dword [esi + 4], 0xfffffffa
xor eax, eax
cmp dword [0x42d290], edi
je 0x40258c
mov ecx, 0x42d294
mov dword [ebp - 0x14], ecx
cmp dword [ecx], edi
jle 0x40254d
mov edx, dword [ebp + 8]
cmp edx, dword [ebp - 0x10]
jge 0x402549
mov ecx, dword [ecx - 4]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov cl, byte [edi + edx]
mov edi, dword [ebp - 0x1c]
cmp cl, byte [edi + edx]
jne 0x402546
mov ecx, dword [ebp - 0x14]
inc edx
mov dword [ebp + 8], edx
cmp edx, dword [ecx]
jl 0x40251b
xor edi, edi
jmp 0x40254d
mov ecx, dword [ebp - 0x14]
xor edi, edi
jmp 0x402550
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
je 0x402565
add ecx, 0x10
inc eax
mov dword [ebp - 0x14], ecx
mov dword [ebp + 8], edi
cmp dword [ecx - 4], edi
jne 0x402517
jmp 0x40258c
shl eax, 4
push 2
mov ecx, dword [eax + 0x42d29c]
or ecx, dword [esi + 4]
mov dword [esi + 4], ecx
pop ecx
cmp edx, ecx
jne 0x40257e
mov dword [esi + 0x18], ecx
push dword [eax + 0x42d298]
lea ecx, [esi + 0x24]
call sub.MFC42.DLL_CString::operator
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x10], eax
jle 0x4025a1
push edi
push eax
push dword [esi]
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
cmp dword [ebp + 8], edi
jne 0x402611
lea ecx, [ebp - 0x14]
call sub.MFC42.DLL_CString::CString_1
push dword [ebp - 0x10]
lea ecx, [ebp - 0x14]
mov dword [ebp - 4], edi
push dword [ebp - 0x18]
push dword [ebp - 0x10]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea ecx, [ebp - 0x14]
push dword [ebp - 0x10]
call sub.MFC42.DLL_CString::ReleaseBuffer
push ecx
mov ecx, dword [ebp - 0x14]
mov eax, esp
mov dword [ebp - 0x1c], esp
mov dword [eax], ecx
lea eax, [ebp - 0x1c]
push eax
call fcn.0040466f
pop ecx
pop ecx
push eax
lea ecx, [esi + 0x24]
mov byte [ebp - 4], 1
call sub.MFC42.DLL_CString::operator_1
and byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00427e82
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00427e82
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
cmp dword [eax - 8], edi
jne 0x40262e
mov eax, dword [ebp - 0x18]
cmp byte [eax], 0x3c
jne 0x40262e
push 0x42dfa0
call sub.MFC42.DLL_CString::operator
push dword [ebp - 0x18]
call sub.MFC42.DLL_operatordelete
pop ecx
jmp 0x4026dd
test cl, 0x20
je 0x40267d
test cl, 0x40
je 0x40265e
push 2
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
push dword [esi]
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov dword [esi + 0x10], eax
xor eax, eax
cmp dword [0x42d290], edi
je 0x40267d
mov edx, dword [esi + 4]
mov ecx, 0x42d290
test dword [ecx + 0xc], edx
jne 0x402688
add ecx, 0x10
inc eax
cmp dword [ecx], edi
jne 0x402670
test byte [esi + 4], 0x40
je 0x4026ea
mov eax, dword [esi + 0x10]
jmp 0x4026ed
shl eax, 4
mov edi, eax
push 2
pop ecx
mov eax, dword [edi + 0x42d294]
cmp eax, ecx
mov dword [ebp + 8], eax
jne 0x4026a0
mov dword [esi + 0x18], ecx
push dword [edi + 0x42d298]
lea ecx, [esi + 0x24]
call sub.MFC42.DLL_CString::operator
cmp dword [esi + 0x10], 0
je 0x4026bc
and dword [ebp + 8], 0
xor edi, edi
jmp 0x40267d
push dword [esi]
push 1
push dword [ebp + 8]
push dword [edi + 0x42d290]
call dword [sym.imp.MSVCRT.dll_fwrite]
mov ebx, eax
add esp, 0x10
dec ebx
neg ebx
sbb bl, bl
inc bl
xor edi, edi
test bl, bl
jne 0x40267d
mov ecx, esi
call fcn.004022e1
jmp 0x402723
mov eax, dword [ebp + 8]
cmp dword [ebp + 8], edi
mov dword [esi + 0x14], eax
je 0x402721
push 0xffffffffffffffff
push 0xffffffffffffffff
push edi
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push edi
call fcn.0040121a
push ecx
mov ecx, esp
mov dword [ebp + 8], esp
push 0x42f860
call fcn.0040121a
push dword [ebp - 0x20]
call fcn.004010ad
add esp, 0x18
mov al, bl
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret 4