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

Disassembly:
push 0xffffffffffffffff
push 0x10056400
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, 0x100651d4
test al, 0x40
je 0x10008201
mov ecx, 0x100676cc
jmp 0x1000820a
test al, 0x20
je 0x1000820a
mov ecx, 0x100651dc
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 0x10008264
lea ecx, [esp + 0x30]
push ecx
call fcn.10005c40
add esp, 4
push eax
mov ecx, edi
mov dword [esp + 0x28], ebx
call fcn.1000b128
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 0x10008450
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 0x100082b9
test eax, eax
mov dword [esp + 0x2c], eax
je 0x10008496
mov esi, eax
push esi
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x14], eax
test esi, esi
je 0x100082ed
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 0x1000843e
mov ecx, dword [ebp + 4]
mov dword [ebp + 0x10], 1
and ecx, 0xfffffffa
xor edi, edi
mov dword [ebp + 4], ecx
mov eax, dword [0x10065658]
test eax, eax
je 0x10008374
mov eax, 0x1006565c
mov esi, dword [eax]
test esi, esi
jle 0x1000832d
cmp ebx, dword [esp + 0x2c]
jge 0x1000832d
mov ecx, dword [esp + 0x14]
mov edx, dword [eax - 4]
mov cl, byte [ecx + ebx]
cmp cl, byte [edx + ebx]
jne 0x1000832d
inc ebx
cmp ebx, esi
jl 0x10008313
cmp ebx, esi
je 0x10008340
mov ecx, dword [eax + 0xc]
add eax, 0x10
inc edi
xor ebx, ebx
test ecx, ecx
jne 0x1000830d
jmp 0x10008370
mov esi, dword [ebp + 4]
mov ecx, dword [ebp + 8]
shl edi, 4
sub ecx, ebx
mov edx, dword [edi + 0x10065664]
mov dword [ebp + 8], ecx
or edx, esi
cmp ebx, 2
mov dword [ebp + 4], edx
jne 0x10008361
mov dword [ebp + 0x10], ebx
mov eax, dword [edi + 0x10065660]
lea ecx, [ebp + 0x1c]
push eax
call fcn.1000b10a
mov esi, dword [esp + 0x2c]
cmp esi, ebx
jle 0x10008388
mov ecx, dword [ebp]
push 0
push ebx
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
test ebx, ebx
jne 0x1000841a
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
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.10005760
add esp, 8
push eax
lea ecx, [ebp + 0x1c]
mov byte [esp + 0x28], 2
call fcn.1000b128
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 0x1000843a
mov edx, dword [esp + 0x14]
cmp byte [edx], 0x3c
jne 0x1000843a
push str.UTF_8
call fcn.1000b10a
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x10008523
test cl, 0x20
je 0x10008496
test cl, 0x40
mov dword [ebp + 0x10], 1
je 0x1000846e
push eax
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 4
mov dword [ebp + 8], eax
cmp dword [ebp + 8], ebx
jne 0x10008496
mov eax, dword [0x10065658]
xor ecx, ecx
cmp eax, ebx
je 0x10008496
mov edx, dword [ebp + 4]
mov eax, 0x10065658
test dword [eax + 0xc], edx
jne 0x100084de
mov esi, dword [eax + 0x10]
add eax, 0x10
inc ecx
cmp esi, ebx
jne 0x10008486
mov edx, dword [ebp + 0x1c]
add ebp, 0x1c
mov eax, dword [edx - 8]
test eax, eax
je 0x100084c7
push ebp
mov ecx, edi
call fcn.1000b128
test ebx, ebx
je 0x100084bb
push str._BOM_
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
push 0x100650a0
mov ecx, edi
call sub.MFC42.DLL_CString::operator_1
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 + 0x1006565c]
cmp ebx, 2
jne 0x10008500
mov dword [ebp + 0x10], ebx
mov ecx, dword [esi + 0x10065660]
push ecx
lea ecx, [ebp + 0x1c]
call fcn.1000b10a
mov edx, dword [ebp]
mov eax, dword [esi + 0x10065658]
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 0x10008496
lea ecx, [esp + 0x14]
push ecx
call fcn.10005c40
add esp, 4
push eax
mov ecx, edi
mov dword [esp + 0x28], 3
call fcn.1000b128
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