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

Disassembly:
push 0x30
mov eax, 0x1037399
call fcn.0101e25c
lea esi, [ebx + 0x20]
mov dword [ebp - 0x24], esi
call fcn.01007f3d
mov eax, dword [ebx + 4]
test al, 0x40
mov ecx, 0x10414a8
je 0x1009eb3
mov ecx, 0x10414b0
jmp 0x1009ebc
test al, 0x20
je 0x1009ebc
mov ecx, 0x10414b8
push ecx
push dword [ebp + 8]
xor esi, esi
mov dword [ebx], esi
call fcn.0101c8f0
cmp eax, esi
pop ecx
pop ecx
mov dword [ebx], eax
jne 0x1009edc
push ebx
call fcn.01009d5e
jmp 0x100a1ce
mov ecx, dword [ebx + 4]
test cl, 0x10
mov byte [ebp + 0xb], 1
mov dword [ebp - 0x14], esi
mov dword [ebx + 0x18], 1
je 0x100a0ef
push 2
push esi
push eax
call fcn.0101c084
add esp, 0xc
push dword [ebx]
call fcn.0101ca9b
pop ecx
push esi
push esi
push dword [ebx]
mov dword [ebx + 0x10], eax
call fcn.0101c084
mov eax, dword [ebx + 0x10]
mov edi, 0x400
add esp, 0xc
cmp eax, edi
jge 0x1009f2f
mov edi, eax
cmp edi, esi
je 0x100a191
push edi
call fcn.0101abcc
pop ecx
push dword [ebx]
mov dword [ebp - 0x1c], eax
push 1
push edi
push eax
call fcn.0101cda5
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov byte [ebp + 0xb], al
je 0x100a0de
and dword [ebx + 4], 0xfffffffa
cmp dword [0x1049810], esi
mov dword [ebp - 0x18], esi
je 0x1009fec
xor eax, eax
mov ecx, dword [eax + 0x1049814]
cmp ecx, esi
mov dword [ebp - 0x20], ecx
jle 0x1009fa3
jmp 0x1009f7d
xor esi, esi
mov ecx, dword [ebp - 0x14]
cmp ecx, edi
jge 0x1009fa3
mov esi, dword [ebp - 0x1c]
mov cl, byte [esi + ecx]
mov edx, dword [eax + 0x1049810]
mov esi, dword [ebp - 0x14]
cmp cl, byte [esi + edx]
jne 0x1009fa1
inc esi
cmp esi, dword [ebp - 0x20]
mov dword [ebp - 0x14], esi
jl 0x1009f7b
xor esi, esi
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp - 0x20]
je 0x1009fc1
inc dword [ebp - 0x18]
mov eax, dword [ebp - 0x18]
shl eax, 4
cmp dword [eax + 0x1049810], esi
mov dword [ebp - 0x14], esi
jne 0x1009f6c
jmp 0x1009fec
mov eax, dword [ebp - 0x18]
shl eax, 4
mov ecx, dword [eax + 0x104981c]
or ecx, dword [ebx + 4]
push 2
mov dword [ebx + 4], ecx
pop ecx
cmp edx, ecx
jne 0x1009fdd
mov dword [ebx + 0x18], ecx
push dword [eax + 0x1049818]
lea eax, [ebx + 0x24]
push eax
call fcn.0100db3a
cmp edi, dword [ebp - 0x14]
jle 0x1009fff
push esi
push dword [ebp - 0x14]
push dword [ebx]
call fcn.0101c084
add esp, 0xc
cmp dword [ebp - 0x14], esi
jne 0x100a0c1
mov eax, dword [0x104add0]
mov ecx, 0x104add0
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
push edi
push dword [ebp - 0x1c]
mov dword [ebp - 4], esi
push ecx
mov eax, esp
mov dword [eax], str.UTF_8
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x20], esp
push eax
call fcn.01008b7b
push edi
lea esi, [ebp - 0x18]
mov byte [ebp - 4], 1
call fcn.01007f7d
push ecx
mov dword [ebp - 0x2c], edi
mov ecx, esp
mov dword [ebp - 0x20], esp
push eax
lea edi, [ebp - 0x3c]
mov dword [ecx], str.UTF_16
call fcn.01008d42
cmp eax, 0xffffffff
mov esi, dword [ebp - 0x18]
jne 0x100a06b
mov eax, esi
call fcn.01007149
lea edx, [ebp - 0x18]
call fcn.010071c6
push ecx
mov eax, esp
mov dword [ebp - 0x20], esp
mov dword [eax], esi
lea eax, [ebp - 0x20]
push eax
call fcn.0100bef9
pop ecx
pop ecx
lea edi, [ebx + 0x24]
mov byte [ebp - 4], 2
call fcn.010061b5
mov eax, dword [ebp - 0x20]
add eax, 0xfffffff0
call fcn.01003a27
mov eax, dword [ebp - 0x38]
add eax, 0xfffffff0
call fcn.01003a27
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
call fcn.01003a27
or dword [ebp - 4], 0xffffffff
lea eax, [esi - 0x10]
call fcn.01003a27
xor esi, esi
lea eax, [ebx + 0x24]
mov ecx, dword [eax]
cmp dword [ecx - 0xc], esi
jne 0x100a0de
mov ecx, dword [ebp - 0x1c]
cmp byte [ecx], 0x3c
jne 0x100a0de
push str.UTF_8
push eax
call fcn.0100db3a
push dword [ebp - 0x1c]
call fcn.0101bded
mov al, byte [ebp + 0xb]
pop ecx
jmp 0x100a189
test cl, 0x20
je 0x100a191
test cl, 0x40
je 0x100a114
push 2
push esi
push eax
call fcn.0101c084
add esp, 0xc
push dword [ebx]
call fcn.0101ca9b
pop ecx
mov dword [ebx + 0x10], eax
xor edi, edi
cmp dword [0x1049810], esi
je 0x100a191
mov ecx, dword [ebx + 4]
xor eax, eax
test dword [eax + 0x104981c], ecx
jne 0x100a13b
inc edi
mov eax, edi
shl eax, 4
cmp dword [eax + 0x1049810], esi
jne 0x100a123
jmp 0x100a191
shl edi, 4
mov eax, dword [edi + 0x1049814]
push 2
pop ecx
cmp eax, ecx
mov dword [ebp - 0x14], eax
jne 0x100a151
mov dword [ebx + 0x18], ecx
push dword [edi + 0x1049818]
lea eax, [ebx + 0x24]
push eax
call fcn.0100db3a
cmp dword [ebx + 0x10], esi
je 0x100a16a
mov dword [ebp - 0x14], esi
jmp 0x100a191
push dword [ebx]
push 1
push dword [ebp - 0x14]
push dword [edi + 0x1049810]
call fcn.0101bf7b
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov byte [ebp + 0xb], al
test al, al
je 0x1009ed1
test byte [ebx + 4], 0x40
je 0x100a19c
mov eax, dword [ebx + 0x10]
jmp 0x100a19f
mov eax, dword [ebp - 0x14]
cmp dword [ebp - 0x14], esi
mov dword [ebx + 0x14], eax
je 0x100a1cb
push 0xffffffffffffffff
push 0xffffffffffffffff
push esi
push ecx
mov eax, esp
mov dword [ebp - 0x1c], esp
push ecx
mov dword [eax], esi
mov eax, esp
mov dword [ebp - 0x1c], esp
push dword [ebp - 0x24]
mov dword [eax], 0x10414c0
call fcn.01008a20
add esp, 0x18
mov al, byte [ebp + 0xb]
call fcn.0101e334
ret 4