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

Disassembly:
push 0x90
mov eax, 0x100bd97e
call fcn.1008bbf4
mov edi, ecx
mov dword [ebp - 0x6c], edi
lea esi, [edi + 0x20]
push 0
mov ecx, esi
call fcn.10001a9b
test byte [edi + 4], 0x40
mov ecx, 0x100ef9b0
je 0x10012b7b
mov eax, 0x100ef9b8
jmp 0x10012b87
test byte [edi + 4], 0x20
mov eax, 0x100ef9c0
cmove eax, ecx
and dword [edi], 0
push eax
push dword [ebp + 8]
call fcn.1009e68a
mov dword [edi], eax
pop ecx
pop ecx
test eax, eax
jne 0x10012ba7
mov ecx, edi
call fcn.10012a2e
jmp 0x10012ee9
xor ebx, ebx
mov byte [ebp - 0x74], 1
test byte [edi + 4], 0x10
mov dword [edi + 0x18], 1
je 0x10012dff
push 2
push ebx
push eax
call fcn.1009e9d4
add esp, 0xc
push dword [edi]
call fcn.1009efcd
pop ecx
push ebx
push ebx
push dword [edi]
mov dword [edi + 0x10], eax
call fcn.1009e9d4
mov esi, 0x400
add esp, 0xc
mov dword [ebp - 0x80], esi
cmp dword [edi + 0x10], esi
jge 0x10012bfc
mov esi, dword [edi + 0x10]
mov dword [ebp - 0x80], esi
test esi, esi
je 0x10012eaf
push esi
call fcn.1008b25c
pop ecx
push dword [edi]
mov dword [ebp - 0x70], eax
push 1
push esi
push eax
call fcn.1009f1a4
add esp, 0x10
dec eax
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x74], eax
je 0x10012ded
and dword [edi + 4], 0xfffffffa
xor edx, edx
mov dword [ebp - 0x78], edx
cmp dword [0x1010c9e0], edx
je 0x10012ccd
xor eax, eax
mov dword [ebp - 0x7c], eax
mov eax, dword [eax + 0x1010c9e4]
xor ebx, ebx
mov dword [ebp - 0x84], eax
test eax, eax
jle 0x10012c81
mov edi, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x70]
cmp ebx, esi
jge 0x10012c7b
mov ecx, dword [edi + 0x1010c9e0]
mov al, byte [edx + ebx]
cmp al, byte [ebx + ecx]
jne 0x10012c75
mov eax, dword [edi + 0x1010c9e4]
inc ebx
cmp ebx, eax
jl 0x10012c56
jmp 0x10012c7b
mov eax, dword [ebp - 0x84]
mov edi, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x78]
cmp ebx, eax
je 0x10012c9d
inc edx
xor ebx, ebx
mov eax, edx
mov dword [ebp - 0x78], edx
shl eax, 4
mov dword [ebp - 0x7c], eax
cmp dword [eax + 0x1010c9e0], ebx
jne 0x10012c3e
jmp 0x10012ccd
shl edx, 4
push 2
mov eax, dword [edx + 0x1010c9ec]
or dword [edi + 4], eax
pop eax
cmp ebx, eax
jne 0x10012cb3
mov dword [edi + 0x18], eax
mov esi, dword [edx + 0x1010c9e8]
push esi
call fcn.10001a38
pop ecx
push eax
push esi
lea ecx, [edi + 0x38]
call fcn.10001dcf
mov esi, dword [ebp - 0x80]
cmp esi, ebx
jle 0x10012cde
push 0
push ebx
push dword [edi]
call fcn.1009e9d4
add esp, 0xc
test ebx, ebx
jne 0x10012dc3
and dword [ebp - 0x18], ebx
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
and dword [ebp - 4], eax
push esi
push dword [ebp - 0x70]
push ecx
mov eax, esp
lea ecx, [ebp - 0x68]
mov dword [eax], str.UTF_8
call fcn.10011771
xor ecx, ecx
mov byte [ebp - 4], 1
push 2
pop edx
lea eax, [esi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1008b25c
pop ecx
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x14], esi
jge 0x10012d3b
push esi
lea ecx, [ebp - 0x28]
call fcn.10002ce1
push ecx
mov eax, esp
mov dword [ebp - 0x30], esi
mov esi, dword [ebp - 0x6c]
lea ecx, [ebp - 0x68]
push esi
mov dword [eax], str.UTF_16
call fcn.1001199e
push eax
push esi
push dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push 0
call fcn.10002d1a
push esi
call fcn.1008b265
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
mov ecx, esp
cmovae eax, dword [ebp - 0x28]
mov dword [ecx], eax
lea ecx, [ebp - 0x9c]
call fcn.10014b79
pop ecx
push eax
lea ecx, [edi + 0x38]
call fcn.1000283a
xor esi, esi
lea ecx, [ebp - 0x9c]
push esi
push 1
call fcn.10001f43
push esi
push 1
lea ecx, [ebp - 0x50]
call fcn.10001f43
push esi
push 1
lea ecx, [ebp - 0x68]
call fcn.10001f43
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
push esi
push 1
call fcn.10001f43
jmp 0x10012dc5
xor esi, esi
cmp dword [edi + 0x48], esi
mov esi, dword [ebp - 0x70]
jne 0x10012df0
cmp byte [esi], 0x3c
jne 0x10012df0
push str.UTF_8
call fcn.10001a38
pop ecx
push eax
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.10001dcf
jmp 0x10012df0
mov esi, dword [ebp - 0x70]
push esi
call fcn.1008b265
mov eax, dword [ebp - 0x74]
pop ecx
jmp 0x10012ea7
test byte [edi + 4], 0x20
je 0x10012eb2
test byte [edi + 4], 0x40
push 2
pop ecx
je 0x10012e2c
push ecx
push 0
push eax
call fcn.1009e9d4
add esp, 0xc
push dword [edi]
call fcn.1009efcd
pop ecx
push 2
mov dword [edi + 0x10], eax
pop ecx
xor eax, eax
cmp dword [0x1010c9e0], eax
je 0x10012eb2
mov esi, dword [edi + 4]
xor edx, edx
test dword [edx + 0x1010c9ec], esi
jne 0x10012e53
inc eax
mov edx, eax
shl edx, 4
cmp dword [edx + 0x1010c9e0], ebx
jne 0x10012e3b
jmp 0x10012eaf
shl eax, 4
mov dword [ebp - 0x6c], eax
mov ebx, dword [eax + 0x1010c9e4]
cmp ebx, ecx
jne 0x10012e66
mov dword [edi + 0x18], ecx
mov esi, dword [eax + 0x1010c9e8]
push esi
call fcn.10001a38
pop ecx
push eax
push esi
lea ecx, [edi + 0x38]
call fcn.10001dcf
cmp dword [edi + 0x10], 0
je 0x10012e87
xor ebx, ebx
jmp 0x10012eaf
push dword [edi]
mov eax, dword [ebp - 0x6c]
push 1
push ebx
push dword [eax + 0x1010c9e0]
call fcn.1009f48c
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov dword [ebp - 0x74], eax
test al, al
je 0x10012b9b
lea esi, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x10012ec0
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x10012ec3
mov dword [edi + 0x14], ebx
test ebx, ebx
je 0x10012ee6
push 0xffffffffffffffff
push 0xffffffffffffffff
push ecx
mov eax, esp
xor edx, edx
push ecx
mov ecx, esi
and dword [eax], 0
mov eax, esp
mov dword [eax], 0x100ef9c8
call fcn.10011639
add esp, 0x10
mov al, byte [ebp - 0x74]
call fcn.1008bb9e
ret 4