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

Disassembly:
push 0xffffffffffffffff
push 0x41cd30
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, 0x426a04
test al, 0x40
je 0x40394d
mov ecx, 0x426a00
jmp 0x403956
test al, 0x20
je 0x403956
mov ecx, 0x4269fc
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 0x40397f
mov ecx, ebp
call fcn.00403780
jmp 0x403c4c
mov ecx, dword [ebp + 4]
xor ebx, ebx
test cl, 0x10
mov byte [esp + 0x30], 1
mov dword [ebp + 0x18], 1
je 0x403b5c
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 0x4039db
test eax, eax
mov dword [esp + 0x10], eax
je 0x403ba4
mov esi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
test esi, esi
je 0x403a0f
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 0x403b4a
mov ecx, dword [ebp + 4]
xor edi, edi
and ecx, 0xfffffffa
mov dword [ebp + 4], ecx
mov eax, dword [0x424428]
test eax, eax
je 0x403a89
mov eax, 0x42442c
mov esi, dword [eax]
test esi, esi
jle 0x403a48
cmp ebx, dword [esp + 0x10]
jge 0x403a48
mov ecx, dword [esp + 0x18]
mov edx, dword [eax - 4]
mov cl, byte [ecx + ebx]
cmp cl, byte [edx + ebx]
jne 0x403a48
inc ebx
cmp ebx, esi
jl 0x403a2e
cmp ebx, esi
je 0x403a5b
mov ecx, dword [eax + 0xc]
add eax, 0x10
inc edi
xor ebx, ebx
test ecx, ecx
jne 0x403a28
jmp 0x403a85
mov esi, dword [ebp + 4]
shl edi, 4
mov eax, edi
mov edx, dword [eax + 0x424434]
or edx, esi
cmp ebx, 2
mov dword [ebp + 4], edx
jne 0x403a76
mov dword [ebp + 0x18], ebx
mov eax, dword [eax + 0x424430]
lea ecx, [ebp + 0x24]
push eax
call fcn.0041c30c
mov esi, dword [esp + 0x10]
cmp esi, ebx
jle 0x403a9d
mov ecx, dword [ebp]
push 0
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test ebx, ebx
jne 0x403b2a
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
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.00406aa0
add esp, 8
push eax
lea ecx, [ebp + 0x24]
mov byte [esp + 0x2c], 1
call fcn.0041c3ea
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], bl
call fcn.0041c2f4
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 0xffffffff
call fcn.0041c2f4
mov eax, dword [ebp + 0x24]
lea ecx, [ebp + 0x24]
mov edx, dword [eax - 8]
test edx, edx
jne 0x403b4a
mov edx, dword [esp + 0x18]
cmp byte [edx], 0x3c
jne 0x403b4a
push str.UTF_8
call fcn.0041c30c
mov eax, dword [esp + 0x18]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x403bfe
test cl, 0x20
je 0x403ba4
test cl, 0x40
je 0x403b81
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 [0x424428]
xor ecx, ecx
test eax, eax
je 0x403ba4
mov edx, dword [ebp + 4]
mov eax, 0x424428
test dword [eax + 0xc], edx
jne 0x403bb2
mov esi, dword [eax + 0x10]
add eax, 0x10
inc ecx
test esi, esi
jne 0x403b94
test byte [ebp + 4], 0x40
je 0x403c0f
mov edx, dword [ebp + 0x10]
mov dword [ebp + 0x14], edx
jmp 0x403c12
shl ecx, 4
mov esi, ecx
mov ebx, dword [esi + 0x42442c]
cmp ebx, 2
jne 0x403bc5
mov dword [ebp + 0x18], ebx
mov edx, dword [esi + 0x424430]
lea ecx, [ebp + 0x24]
push edx
call fcn.0041c30c
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x403bdf
xor ebx, ebx
jmp 0x403ba4
mov eax, dword [ebp]
mov ecx, dword [esi + 0x424428]
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 0x403ba4
mov ecx, ebp
call fcn.00403780
jmp 0x403c4c
mov dword [ebp + 0x14], ebx
test ebx, ebx
je 0x403c48
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push ecx
mov ecx, esp
mov dword [esp + 0x28], esp
push 0
call fcn.00402430
push ecx
mov ecx, esp
mov dword [esp + 0x2c], esp
push 0x4269f8
call fcn.00402430
mov eax, dword [esp + 0x30]
push eax
call fcn.00402280
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