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

Disassembly:
push 0x90
mov eax, 0x100bd1de
call fcn.1008b481
mov edi, ecx
mov dword [ebp - 0x6c], edi
lea esi, [edi + 0x20]
push 0
mov ecx, esi
call fcn.10001aab
test byte [edi + 4], 0x40
mov ecx, 0x100ee9b0
je 0x10012bdb
mov eax, 0x100ee9b8
jmp 0x10012be7
test byte [edi + 4], 0x20
mov eax, 0x100ee9c0
cmove eax, ecx
and dword [edi], 0
push eax
push dword [ebp + 8]
call fcn.1009def5
mov dword [edi], eax
pop ecx
pop ecx
test eax, eax
jne 0x10012c07
mov ecx, edi
call fcn.10012a8e
jmp 0x10012f49
xor ebx, ebx
mov byte [ebp - 0x74], 1
test byte [edi + 4], 0x10
mov dword [edi + 0x18], 1
je 0x10012e5f
push 2
push ebx
push eax
call fcn.1009e23f
add esp, 0xc
push dword [edi]
call fcn.1009e838
pop ecx
push ebx
push ebx
push dword [edi]
mov dword [edi + 0x10], eax
call fcn.1009e23f
mov esi, 0x400
add esp, 0xc
mov dword [ebp - 0x80], esi
cmp dword [edi + 0x10], esi
jge 0x10012c5c
mov esi, dword [edi + 0x10]
mov dword [ebp - 0x80], esi
test esi, esi
je 0x10012f0f
push esi
call fcn.1008aae9
pop ecx
push dword [edi]
mov dword [ebp - 0x70], eax
push 1
push esi
push eax
call fcn.1009ea0f
add esp, 0x10
dec eax
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x74], eax
je 0x10012e4d
and dword [edi + 4], 0xfffffffa
xor edx, edx
mov dword [ebp - 0x78], edx
cmp dword [0x1010b9e0], edx
je 0x10012d2d
xor eax, eax
mov dword [ebp - 0x7c], eax
mov eax, dword [eax + 0x1010b9e4]
xor ebx, ebx
mov dword [ebp - 0x84], eax
test eax, eax
jle 0x10012ce1
mov edi, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x70]
cmp ebx, esi
jge 0x10012cdb
mov ecx, dword [edi + 0x1010b9e0]
mov al, byte [edx + ebx]
cmp al, byte [ebx + ecx]
jne 0x10012cd5
mov eax, dword [edi + 0x1010b9e4]
inc ebx
cmp ebx, eax
jl 0x10012cb6
jmp 0x10012cdb
mov eax, dword [ebp - 0x84]
mov edi, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x78]
cmp ebx, eax
je 0x10012cfd
inc edx
xor ebx, ebx
mov eax, edx
mov dword [ebp - 0x78], edx
shl eax, 4
mov dword [ebp - 0x7c], eax
cmp dword [eax + 0x1010b9e0], ebx
jne 0x10012c9e
jmp 0x10012d2d
shl edx, 4
push 2
mov eax, dword [edx + 0x1010b9ec]
or dword [edi + 4], eax
pop eax
cmp ebx, eax
jne 0x10012d13
mov dword [edi + 0x18], eax
mov esi, dword [edx + 0x1010b9e8]
push esi
call fcn.10001a48
pop ecx
push eax
push esi
lea ecx, [edi + 0x38]
call fcn.10001ddf
mov esi, dword [ebp - 0x80]
cmp esi, ebx
jle 0x10012d3e
push 0
push ebx
push dword [edi]
call fcn.1009e23f
add esp, 0xc
test ebx, ebx
jne 0x10012e23
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.100117d1
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.1008aae9
pop ecx
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x14], esi
jge 0x10012d9b
push esi
lea ecx, [ebp - 0x28]
call fcn.10002cf1
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.100119fe
push eax
push esi
push dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push 0
call fcn.10002d2a
push esi
call fcn.1008aaf2
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.10014bd9
pop ecx
push eax
lea ecx, [edi + 0x38]
call fcn.1000284a
xor esi, esi
lea ecx, [ebp - 0x9c]
push esi
push 1
call fcn.10001f53
push esi
push 1
lea ecx, [ebp - 0x50]
call fcn.10001f53
push esi
push 1
lea ecx, [ebp - 0x68]
call fcn.10001f53
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
push esi
push 1
call fcn.10001f53
jmp 0x10012e25
xor esi, esi
cmp dword [edi + 0x48], esi
mov esi, dword [ebp - 0x70]
jne 0x10012e50
cmp byte [esi], 0x3c
jne 0x10012e50
push str.UTF_8
call fcn.10001a48
pop ecx
push eax
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.10001ddf
jmp 0x10012e50
mov esi, dword [ebp - 0x70]
push esi
call fcn.1008aaf2
mov eax, dword [ebp - 0x74]
pop ecx
jmp 0x10012f07
test byte [edi + 4], 0x20
je 0x10012f12
test byte [edi + 4], 0x40
push 2
pop ecx
je 0x10012e8c
push ecx
push 0
push eax
call fcn.1009e23f
add esp, 0xc
push dword [edi]
call fcn.1009e838
pop ecx
push 2
mov dword [edi + 0x10], eax
pop ecx
xor eax, eax
cmp dword [0x1010b9e0], eax
je 0x10012f12
mov esi, dword [edi + 4]
xor edx, edx
test dword [edx + 0x1010b9ec], esi
jne 0x10012eb3
inc eax
mov edx, eax
shl edx, 4
cmp dword [edx + 0x1010b9e0], ebx
jne 0x10012e9b
jmp 0x10012f0f
shl eax, 4
mov dword [ebp - 0x6c], eax
mov ebx, dword [eax + 0x1010b9e4]
cmp ebx, ecx
jne 0x10012ec6
mov dword [edi + 0x18], ecx
mov esi, dword [eax + 0x1010b9e8]
push esi
call fcn.10001a48
pop ecx
push eax
push esi
lea ecx, [edi + 0x38]
call fcn.10001ddf
cmp dword [edi + 0x10], 0
je 0x10012ee7
xor ebx, ebx
jmp 0x10012f0f
push dword [edi]
mov eax, dword [ebp - 0x6c]
push 1
push ebx
push dword [eax + 0x1010b9e0]
call fcn.1009ecf7
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov dword [ebp - 0x74], eax
test al, al
je 0x10012bfb
lea esi, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x10012f20
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x10012f23
mov dword [edi + 0x14], ebx
test ebx, ebx
je 0x10012f46
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], 0x100ee9c8
call fcn.10011699
add esp, 0x10
mov al, byte [ebp - 0x74]
call fcn.1008b42b
ret 4