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

Disassembly:
push 0x840
mov eax, 0x102f2f6
call fcn.01026060
mov eax, dword [ebp + 0xc]
xor ebx, ebx
mov esi, ecx
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x838], eax
mov eax, dword [ebp + 0x10]
push ebx
mov edi, 0x10028d0
push edi
mov dword [ebp - 0x834], ecx
mov dword [ebp - 0x840], eax
call dword [sym.imp.MFC80U.DLL_Ordinal_2261]
cmp eax, 0xffffffff
jne 0x1012525
mov ecx, dword [ebp - 0x834]
push 1
mov byte [ebp - 0x815], 1
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
push eax
lea eax, [ebp - 0x82c]
push eax
call fcn.0101ca6e
mov dword [ebp - 4], ebx
push edi
push eax
lea eax, [ebp - 0x820]
push eax
call fcn.01007c8d
add esp, 0x18
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x82c]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov ecx, dword [ebp - 0x834]
push ebx
push 0x100080
push 3
push ebx
push 1
push SysReAllocString
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push eax
call edi
mov dword [ebp - 0x824], eax
mov dword [ebp - 0x828], eax
mov byte [ebp - 4], 3
cmp eax, 0xffffffff
jne 0x10121a1
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + esi + 4]
push 1
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
lea ecx, [eax + esi + 4]
call dword [edi]
jmp 0x1012506
push ebx
push 0x100080
push 2
push ebx
push ebx
push 0x40000000
lea ecx, [ebp - 0x820]
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
push eax
call edi
mov dword [ebp - 0x844], eax
mov dword [ebp - 0x830], eax
mov byte [ebp - 4], 4
cmp eax, 0xffffffff
jne 0x10121fc
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + esi + 4]
push 1
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
lea ecx, [eax + esi + 4]
call dword [edi]
jmp 0x10124f7
lea ecx, [ebp - 0x814]
mov dword [ebp - 0x81c], ebx
call dword [sym.imp.MFC80U.DLL_Ordinal_293]
mov byte [ebp - 4], 5
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
lea eax, [ebp - 0x81c]
push eax
push 0x7fe
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x824]
call edi
test eax, eax
je 0x10124c4
push ebx
push dword [ebp - 0x81c]
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.ADVAPI32.dll_IsTextUnicode]
push ebx
push ebx
push ebx
push dword [ebp - 0x824]
mov dword [ebp - 0x848], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x81c]
push eax
push 0x7fe
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x824]
call edi
jmp 0x1012435
mov eax, dword [ebp - 0x81c]
cmp eax, ebx
je 0x101243d
mov ecx, eax
shr ecx, 1
cmp dword [ebp - 0x848], ebx
mov word [ebp + ecx*2 - 0x810], bx
jne 0x101230c
lea eax, [eax + eax + 2]
push eax
push 8
mov dword [ebp - 0x82c], 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push dword [ebp - 0x81c]
mov edi, eax
push edi
push dword [ebp - 0x81c]
lea eax, [ebp - 0x810]
push eax
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x81c]
push edi
lea ecx, [ebp - 0x814]
mov word [edi + eax*2], bx
call dword [sym.imp.MFC80U.DLL_Ordinal_776]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x1012329
lea eax, [ebp - 0x810]
push eax
lea ecx, [ebp - 0x814]
mov dword [ebp - 0x82c], 2
call dword [sym.imp.MFC80U.DLL_Ordinal_776]
push 0xa
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_5524]
cmp eax, 0xffffffff
je 0x1012395
mov edi, dword [ebp - 0x81c]
inc eax
mov ecx, eax
imul ecx, dword [ebp - 0x82c]
push eax
lea eax, [ebp - 0x84c]
sub edi, ecx
push eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_3990]
mov byte [ebp - 4], 6
push eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x84c]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
push 1
push ebx
neg edi
push edi
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push dword [ebp - 0x840]
lea ecx, [ebp - 0x814]
push dword [ebp - 0x838]
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
push eax
lea eax, [ebp - 0x83c]
push eax
mov ecx, esi
call fcn.01011f98
mov byte [ebp - 4], 7
push eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x83c]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
push ebx
lea eax, [ebp - 0x81c]
push eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_2895]
add eax, eax
push eax
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_870]
push eax
push dword [ebp - 0x844]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1012499
push ebx
lea eax, [ebp - 0x81c]
push eax
push 0x7fe
lea eax, [ebp - 0x810]
push eax
push dword [ebp - 0x824]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1012286
mov ecx, dword [ebp - 0x834]
lea eax, [ebp - 0x820]
push eax
call dword [sym.imp.MFC80U.DLL_Ordinal_774]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x830]
call fcn.01010702
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x828]
call fcn.01010702
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x820]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov al, byte [ebp - 0x815]
jmp 0x1012527
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + esi + 4]
push 1
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
lea ecx, [eax + esi + 4]
call dword [edi]
mov byte [ebp - 0x815], bl
jmp 0x1012450
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
mov edi, dword [eax + esi + 4]
push 1
push 1
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi + 4]
mov eax, dword [eax + 4]
lea ecx, [eax + esi + 4]
call dword [edi]
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x814]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x830]
call fcn.01010702
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x828]
call fcn.01010702
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x820]
call dword [sym.imp.MFC80U.DLL_Ordinal_577]
xor al, al
call fcn.010260f2
ret 0xc