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

Disassembly:
push 0xffffffffffffffff
push 0x100848c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
lea edi, [ebp + 0x18]
mov ecx, edi
mov dword [esp + 0x18], edi
call sub.MFC42.DLL_CString::Empty
mov eax, dword [ebp + 4]
mov ecx, 0x10099b90
test al, 0x40
je 0x10026df1
mov ecx, 0x1009ea14
jmp 0x10026dfa
test al, 0x20
je 0x10026dfa
mov ecx, 0x10099e5c
mov eax, dword [esp + 0x2c]
xor ebx, ebx
push ecx
push eax
mov dword [ebp], ebx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebx
mov dword [ebp], eax
jne 0x10026e54
lea ecx, [esp + 0x30]
push ecx
call fcn.10024020
add esp, 4
push eax
mov ecx, edi
mov dword [esp + 0x28], ebx
call fcn.1002c286
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor al, al
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ecx, dword [ebp + 4]
mov byte [esp + 0x30], 1
test cl, 0x10
je 0x10027040
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push ebx
push eax
call esi
mov edx, dword [ebp]
push edx
call dword [sym.imp.MSVCRT.dll_ftell]
mov dword [ebp + 8], eax
mov eax, dword [ebp]
push 0
push 0
push eax
call esi
mov eax, dword [ebp + 8]
mov esi, 0x400
add esp, 0x1c
cmp eax, esi
mov dword [esp + 0x2c], esi
jge 0x10026ea9
test eax, eax
mov dword [esp + 0x2c], eax
je 0x10027086
mov esi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x14], eax
test esi, esi
je 0x10026edd
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 0x1002702e
mov ecx, dword [ebp + 4]
mov dword [ebp + 0x10], 1
and ecx, 0xfffffffa
xor edi, edi
mov dword [ebp + 4], ecx
mov eax, dword [0x1009c9a8]
test eax, eax
je 0x10026f64
mov eax, 0x1009c9ac
mov esi, dword [eax]
test esi, esi
jle 0x10026f1d
cmp ebx, dword [esp + 0x2c]
jge 0x10026f1d
mov ecx, dword [esp + 0x14]
mov edx, dword [eax - 4]
mov cl, byte [ecx + ebx]
cmp cl, byte [edx + ebx]
jne 0x10026f1d
inc ebx
cmp ebx, esi
jl 0x10026f03
cmp ebx, esi
je 0x10026f30
mov ecx, dword [eax + 0xc]
add eax, 0x10
inc edi
xor ebx, ebx
test ecx, ecx
jne 0x10026efd
jmp 0x10026f60
mov esi, dword [ebp + 4]
mov ecx, dword [ebp + 8]
shl edi, 4
sub ecx, ebx
mov edx, dword [edi + 0x1009c9b4]
mov dword [ebp + 8], ecx
or edx, esi
cmp ebx, 2
mov dword [ebp + 4], edx
jne 0x10026f51
mov dword [ebp + 0x10], ebx
mov eax, dword [edi + 0x1009c9b0]
lea ecx, [ebp + 0x1c]
push eax
call fcn.1002c27a
mov esi, dword [esp + 0x2c]
cmp esi, ebx
jle 0x10026f78
mov ecx, dword [ebp]
push 0
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test ebx, ebx
jne 0x1002700a
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_4
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x14]
push edx
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], 1
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
mov eax, dword [esp + 0x2c]
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 + 0x14]
call sub.MFC42.DLL_CString::ReleaseBuffer
push ecx
mov ecx, dword [esp + 0x14]
mov eax, esp
lea edx, [esp + 0x30]
mov dword [esp + 0x30], esp
push edx
mov dword [eax], ecx
call fcn.10023aa0
add esp, 8
push eax
lea ecx, [ebp + 0x1c]
mov byte [esp + 0x28], 2
call fcn.1002c286
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp + 0x1c]
lea ecx, [ebp + 0x1c]
mov edx, dword [eax - 8]
test edx, edx
jne 0x1002702a
mov edx, dword [esp + 0x14]
cmp byte [edx], 0x3c
jne 0x1002702a
push str.UTF_8
call fcn.1002c27a
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x10027113
test cl, 0x20
je 0x10027086
test cl, 0x40
mov dword [ebp + 0x10], 1
je 0x1002705e
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp + 8], eax
cmp dword [ebp + 8], ebx
jne 0x10027086
mov eax, dword [0x1009c9a8]
xor ecx, ecx
cmp eax, ebx
je 0x10027086
mov edx, dword [ebp + 4]
mov eax, 0x1009c9a8
test dword [eax + 0xc], edx
jne 0x100270ce
mov esi, dword [eax + 0x10]
add eax, 0x10
inc ecx
cmp esi, ebx
jne 0x10027076
mov edx, dword [ebp + 0x1c]
add ebp, 0x1c
mov eax, dword [edx - 8]
test eax, eax
je 0x100270b7
push ebp
mov ecx, edi
call fcn.1002c286
test ebx, ebx
je 0x100270ab
push str._BOM_
mov ecx, edi
call sub.MFC42.DLL_CString::operator
push 0x10099618
mov ecx, edi
call sub.MFC42.DLL_CString::operator
mov al, byte [esp + 0x30]
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
shl ecx, 4
mov esi, ecx
mov ebx, dword [esi + 0x1009c9ac]
cmp ebx, 2
jne 0x100270f0
mov dword [ebp + 0x10], ebx
mov ecx, dword [esi + 0x1009c9b0]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.1002c27a
mov edx, dword [ebp]
mov eax, dword [esi + 0x1009c9a8]
push edx
push 1
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edi, dword [esp + 0x28]
add esp, 0x10
cmp eax, 1
sete byte [esp + 0x30]
mov al, byte [esp + 0x30]
test al, al
jne 0x10027086
lea ecx, [esp + 0x14]
push ecx
call fcn.10024020
add esp, 4
push eax
mov ecx, edi
mov dword [esp + 0x28], 3
call fcn.1002c286
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor al, al
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret