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

Disassembly:
push 0xffffffffffffffff
push 0x40ffe0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x20]
mov ecx, ebx
mov dword [esp + 0x18], ebx
call sub.MFC42u.DLL_CString::Empty
mov eax, dword [esi + 4]
mov ecx, 0x418cdc
test al, 0x40
je 0x40602f
mov ecx, 0x418cd4
jmp 0x406038
test al, 0x20
je 0x406038
mov ecx, 0x414200
mov eax, dword [esp + 0x44]
push ecx
push eax
mov dword [esi], 0
call dword [sym.imp.MSVCRT.dll__wfopen]
add esp, 8
mov dword [esi], eax
test eax, eax
jne 0x40605f
mov ecx, esi
call fcn.00405e60
jmp 0x406363
mov ecx, dword [esi + 4]
xor edi, edi
test cl, 0x10
mov byte [esp + 0x44], 1
mov dword [esi + 0x18], 1
je 0x406279
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push edi
push eax
call ebp
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
mov edx, dword [esi]
push edi
push edi
push edx
mov dword [esi + 0x10], eax
call ebp
mov eax, dword [esi + 0x10]
mov ebp, 0x400
add esp, 0x1c
cmp eax, ebp
jge 0x4060b1
mov ebp, eax
test ebp, ebp
je 0x4062c0
push ebp
call sub.MFC42u.DLL_operatornew
add esp, 4
mov ebx, eax
test ebp, ebp
mov dword [esp + 0x14], ebx
je 0x4060e6
mov eax, dword [esi]
push eax
push 1
push ebp
push ebx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
cmp eax, 1
sete al
test al, al
mov byte [esp + 0x44], al
je 0x406267
mov ecx, dword [esi + 4]
mov dword [esp + 0x10], 0
and ecx, 0xfffffffa
mov dword [esi + 4], ecx
mov eax, dword [0x414518]
test eax, eax
je 0x406170
mov eax, 0x41451c
mov ecx, dword [eax]
test ecx, ecx
jle 0x406129
jmp 0x406111
mov ebx, dword [esp + 0x14]
cmp edi, ebp
jge 0x406129
mov edx, dword [eax - 4]
mov bl, byte [ebx + edi]
cmp bl, byte [edx + edi]
jne 0x406125
inc edi
cmp edi, ecx
jl 0x40610d
mov ebx, dword [esp + 0x14]
cmp edi, ecx
je 0x406144
mov edi, dword [esp + 0x10]
mov ecx, dword [eax + 0xc]
add eax, 0x10
inc edi
mov dword [esp + 0x10], edi
xor edi, edi
test ecx, ecx
jne 0x406105
jmp 0x406170
mov eax, dword [esp + 0x10]
mov edx, dword [esi + 4]
shl eax, 4
mov ecx, dword [eax + 0x414524]
or ecx, edx
cmp edi, 2
mov dword [esi + 4], ecx
jne 0x406161
mov dword [esi + 0x18], edi
mov edx, dword [eax + 0x414520]
lea ecx, [esi + 0x24]
push edx
call fcn.0040efa4
cmp ebp, edi
jle 0x406183
mov eax, dword [esi]
push 0
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test edi, edi
jne 0x40624b
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::CString_3
push ebp
push ebx
push ecx
mov dword [esp + 0x48], edi
mov ecx, esp
mov dword [esp + 0x20], esp
push str.UTF_8
call fcn.004015c0
lea ecx, [esp + 0x28]
call fcn.00406380
push ebp
lea ecx, [esp + 0x14]
mov byte [esp + 0x40], 1
call sub.MFC42u.DLL_CString::GetBuffer
push ecx
mov dword [esp + 0x30], ebp
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
mov dword [ecx], str.UTF_16
lea ecx, [esp + 0x24]
call fcn.00404dd0
push eax
lea ecx, [esp + 0x14]
call sub.MFC42u.DLL_CString::ReleaseBuffer
push ecx
mov ecx, dword [esp + 0x14]
mov eax, esp
lea edx, [esp + 0x18]
mov dword [esp + 0x18], esp
push edx
mov dword [eax], ecx
call fcn.00408c10
add esp, 8
push eax
lea ecx, [esi + 0x24]
mov byte [esp + 0x40], 2
call sub.MFC42u.DLL_CString::operator_2
lea ecx, [esp + 0x14]
mov byte [esp + 0x3c], 1
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x3c], 3
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x3c], 0
call sub.MFC42u.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x3c], 0xffffffff
call sub.MFC42u.DLL_CString::CString
mov eax, dword [esi + 0x24]
lea ecx, [esi + 0x24]
mov edx, dword [eax - 8]
test edx, edx
jne 0x406267
cmp byte [ebx], 0x3c
jne 0x406267
push str.UTF_8
call fcn.0040efa4
push ebx
call sub.MFC42u.DLL_operatordelete
mov ebx, dword [esp + 0x1c]
add esp, 4
jmp 0x406319
test cl, 0x20
je 0x4062c0
test cl, 0x40
je 0x40629d
push 2
push 0
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
mov ecx, dword [esi]
push ecx
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov dword [esi + 0x10], eax
mov eax, dword [0x414518]
xor ecx, ecx
test eax, eax
je 0x4062c0
mov edx, dword [esi + 4]
mov eax, 0x414518
test dword [eax + 0xc], edx
jne 0x4062ce
mov ebp, dword [eax + 0x10]
add eax, 0x10
inc ecx
test ebp, ebp
jne 0x4062b0
test byte [esi + 4], 0x40
je 0x40632a
mov edx, dword [esi + 0x10]
mov dword [esi + 0x14], edx
jmp 0x40632d
shl ecx, 4
mov ebp, ecx
mov edi, dword [ebp + 0x41451c]
cmp edi, 2
jne 0x4062e1
mov dword [esi + 0x18], edi
mov edx, dword [ebp + 0x414520]
lea ecx, [esi + 0x24]
push edx
call fcn.0040efa4
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4062fb
xor edi, edi
jmp 0x4062c0
mov eax, dword [esi]
mov ecx, dword [ebp + 0x414518]
push eax
push 1
push edi
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x44]
mov al, byte [esp + 0x44]
test al, al
jne 0x4062c0
mov ecx, esi
call fcn.00405e60
jmp 0x406363
mov dword [esi + 0x14], edi
test edi, edi
je 0x40635f
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0
call fcn.004015c0
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x418ccc
call fcn.004015c0
push ebx
call fcn.00404a80
add esp, 0x18
mov al, byte [esp + 0x44]
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x30
ret 4