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

Disassembly:
push 0xffffffffffffffff
push 0x42cc60
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea ecx, [ebp + 0x20]
mov dword [esp + 0x1c], ecx
call sub.MFC42.DLL_CString::Empty
mov eax, dword [ebp + 4]
mov ecx, 0x43a7f8
test al, 0x40
je 0x41bd1d
mov ecx, 0x43a7f4
jmp 0x41bd26
test al, 0x20
je 0x41bd26
mov ecx, 0x43a7f0
mov eax, dword [esp + 0x30]
push ecx
push eax
mov dword [ebp], 0
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp], eax
test eax, eax
jne 0x41bd4f
mov ecx, ebp
call fcn.0041bb60
jmp 0x41c01c
mov ecx, dword [ebp + 4]
xor ebx, ebx
test cl, 0x10
mov byte [esp + 0x30], 1
mov dword [ebp + 0x18], 1
je 0x41bf2c
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push ebx
push eax
call esi
mov ecx, dword [ebp]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
mov edx, dword [ebp]
push ebx
push ebx
push edx
mov dword [ebp + 0x10], eax
call esi
mov eax, dword [ebp + 0x10]
mov esi, 0x400
add esp, 0x1c
cmp eax, esi
mov dword [esp + 0x10], esi
jge 0x41bdab
test eax, eax
mov dword [esp + 0x10], eax
je 0x41bf74
mov esi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
test esi, esi
je 0x41bddf
mov ecx, dword [ebp]
push ecx
push 1
push esi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
sete al
test al, al
mov byte [esp + 0x30], al
je 0x41bf1a
mov ecx, dword [ebp + 4]
xor edi, edi
and ecx, 0xfffffffa
mov dword [ebp + 4], ecx
mov eax, dword [0x438220]
test eax, eax
je 0x41be59
mov eax, 0x438224
mov esi, dword [eax]
test esi, esi
jle 0x41be18
cmp ebx, dword [esp + 0x10]
jge 0x41be18
mov ecx, dword [esp + 0x18]
mov edx, dword [eax - 4]
mov cl, byte [ecx + ebx]
cmp cl, byte [edx + ebx]
jne 0x41be18
inc ebx
cmp ebx, esi
jl 0x41bdfe
cmp ebx, esi
je 0x41be2b
mov ecx, dword [eax + 0xc]
add eax, 0x10
inc edi
xor ebx, ebx
test ecx, ecx
jne 0x41bdf8
jmp 0x41be55
mov esi, dword [ebp + 4]
shl edi, 4
mov eax, edi
mov edx, dword [eax + 0x43822c]
or edx, esi
cmp ebx, 2
mov dword [ebp + 4], edx
jne 0x41be46
mov dword [ebp + 0x18], ebx
mov eax, dword [eax + 0x438228]
lea ecx, [ebp + 0x24]
push eax
call fcn.00428ed6
mov esi, dword [esp + 0x10]
cmp esi, ebx
jle 0x41be6d
mov ecx, dword [ebp]
push 0
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test ebx, ebx
jne 0x41befa
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_4
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], ebx
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
mov eax, dword [esp + 0x10]
mov ecx, eax
push eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
push ecx
mov ecx, dword [esp + 0x18]
mov eax, esp
lea edx, [esp + 0x14]
mov dword [esp + 0x14], esp
push edx
mov dword [eax], ecx
call fcn.0041ee80
add esp, 8
push eax
lea ecx, [ebp + 0x24]
mov byte [esp + 0x2c], 1
call sub.MFC42.DLL_CString::operator_2
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp + 0x24]
lea ecx, [ebp + 0x24]
mov edx, dword [eax - 8]
test edx, edx
jne 0x41bf1a
mov edx, dword [esp + 0x18]
cmp byte [edx], 0x3c
jne 0x41bf1a
push str.UTF_8
call fcn.00428ed6
mov eax, dword [esp + 0x18]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x41bfce
test cl, 0x20
je 0x41bf74
test cl, 0x40
je 0x41bf51
push 2
push 0
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [ebp]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov dword [ebp + 0x10], eax
mov eax, dword [0x438220]
xor ecx, ecx
test eax, eax
je 0x41bf74
mov edx, dword [ebp + 4]
mov eax, 0x438220
test dword [eax + 0xc], edx
jne 0x41bf82
mov esi, dword [eax + 0x10]
add eax, 0x10
inc ecx
test esi, esi
jne 0x41bf64
test byte [ebp + 4], 0x40
je 0x41bfdf
mov edx, dword [ebp + 0x10]
mov dword [ebp + 0x14], edx
jmp 0x41bfe2
shl ecx, 4
mov esi, ecx
mov ebx, dword [esi + 0x438224]
cmp ebx, 2
jne 0x41bf95
mov dword [ebp + 0x18], ebx
mov edx, dword [esi + 0x438228]
lea ecx, [ebp + 0x24]
push edx
call fcn.00428ed6
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x41bfaf
xor ebx, ebx
jmp 0x41bf74
mov eax, dword [ebp]
mov ecx, dword [esi + 0x438220]
push eax
push 1
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x30]
mov al, byte [esp + 0x30]
test al, al
jne 0x41bf74
mov ecx, ebp
call fcn.0041bb60
jmp 0x41c01c
mov dword [ebp + 0x14], ebx
test ebx, ebx
je 0x41c018
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0
call fcn.00408590
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x43a7ec
call fcn.00408590
mov eax, dword [esp + 0x30]
push eax
call fcn.0041a690
add esp, 0x18
mov al, byte [esp + 0x30]
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1c
ret 4