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

Disassembly:
push 0x90
mov eax, 0x100bd45e
call fcn.1008b701
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, 0x100ee9a0
je 0x10012b2b
mov eax, 0x100ee9a8
jmp 0x10012b37
test byte [edi + 4], 0x20
mov eax, 0x100ee9b0
cmove eax, ecx
and dword [edi], 0
push eax
push dword [ebp + 8]
call fcn.1009e175
mov dword [edi], eax
pop ecx
pop ecx
test eax, eax
jne 0x10012b57
mov ecx, edi
call fcn.100129de
jmp 0x10012e99
xor ebx, ebx
mov byte [ebp - 0x74], 1
test byte [edi + 4], 0x10
mov dword [edi + 0x18], 1
je 0x10012daf
push 2
push ebx
push eax
call fcn.1009e4bf
add esp, 0xc
push dword [edi]
call fcn.1009eab8
pop ecx
push ebx
push ebx
push dword [edi]
mov dword [edi + 0x10], eax
call fcn.1009e4bf
mov esi, 0x400
add esp, 0xc
mov dword [ebp - 0x80], esi
cmp dword [edi + 0x10], esi
jge 0x10012bac
mov esi, dword [edi + 0x10]
mov dword [ebp - 0x80], esi
test esi, esi
je 0x10012e5f
push esi
call fcn.1008ad69
pop ecx
push dword [edi]
mov dword [ebp - 0x70], eax
push 1
push esi
push eax
call fcn.1009ec8f
add esp, 0x10
dec eax
neg eax
sbb al, al
add al, 1
mov dword [ebp - 0x74], eax
je 0x10012d9d
and dword [edi + 4], 0xfffffffa
xor edx, edx
mov dword [ebp - 0x78], edx
cmp dword [0x1010b9e0], edx
je 0x10012c7d
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 0x10012c31
mov edi, dword [ebp - 0x7c]
mov edx, dword [ebp - 0x70]
cmp ebx, esi
jge 0x10012c2b
mov ecx, dword [edi + 0x1010b9e0]
mov al, byte [edx + ebx]
cmp al, byte [ebx + ecx]
jne 0x10012c25
mov eax, dword [edi + 0x1010b9e4]
inc ebx
cmp ebx, eax
jl 0x10012c06
jmp 0x10012c2b
mov eax, dword [ebp - 0x84]
mov edi, dword [ebp - 0x6c]
mov edx, dword [ebp - 0x78]
cmp ebx, eax
je 0x10012c4d
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 0x10012bee
jmp 0x10012c7d
shl edx, 4
push 2
mov eax, dword [edx + 0x1010b9ec]
or dword [edi + 4], eax
pop eax
cmp ebx, eax
jne 0x10012c63
mov dword [edi + 0x18], eax
mov esi, dword [edx + 0x1010b9e8]
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 0x10012c8e
push 0
push ebx
push dword [edi]
call fcn.1009e4bf
add esp, 0xc
test ebx, ebx
jne 0x10012d73
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.10011721
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.1008ad69
pop ecx
mov dword [ebp - 0x6c], eax
cmp dword [ebp - 0x14], esi
jge 0x10012ceb
push esi
lea ecx, [ebp - 0x28]
call fcn.10002c90
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.1001194e
push eax
push esi
push dword [ebp - 0x18]
lea ecx, [ebp - 0x28]
push 0
call fcn.10002cc9
push esi
call fcn.1008ad72
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.10014b29
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 0x10012d75
xor esi, esi
cmp dword [edi + 0x48], esi
mov esi, dword [ebp - 0x70]
jne 0x10012da0
cmp byte [esi], 0x3c
jne 0x10012da0
push str.UTF_8
call fcn.10001a38
pop ecx
push eax
push str.UTF_8
lea ecx, [edi + 0x38]
call fcn.10001dcf
jmp 0x10012da0
mov esi, dword [ebp - 0x70]
push esi
call fcn.1008ad72
mov eax, dword [ebp - 0x74]
pop ecx
jmp 0x10012e57
test byte [edi + 4], 0x20
je 0x10012e62
test byte [edi + 4], 0x40
push 2
pop ecx
je 0x10012ddc
push ecx
push 0
push eax
call fcn.1009e4bf
add esp, 0xc
push dword [edi]
call fcn.1009eab8
pop ecx
push 2
mov dword [edi + 0x10], eax
pop ecx
xor eax, eax
cmp dword [0x1010b9e0], eax
je 0x10012e62
mov esi, dword [edi + 4]
xor edx, edx
test dword [edx + 0x1010b9ec], esi
jne 0x10012e03
inc eax
mov edx, eax
shl edx, 4
cmp dword [edx + 0x1010b9e0], ebx
jne 0x10012deb
jmp 0x10012e5f
shl eax, 4
mov dword [ebp - 0x6c], eax
mov ebx, dword [eax + 0x1010b9e4]
cmp ebx, ecx
jne 0x10012e16
mov dword [edi + 0x18], ecx
mov esi, dword [eax + 0x1010b9e8]
push esi
call fcn.10001a38
pop ecx
push eax
push esi
lea ecx, [edi + 0x38]
call fcn.10001dcf
cmp dword [edi + 0x10], 0
je 0x10012e37
xor ebx, ebx
jmp 0x10012e5f
push dword [edi]
mov eax, dword [ebp - 0x6c]
push 1
push ebx
push dword [eax + 0x1010b9e0]
call fcn.1009ef77
add esp, 0x10
dec eax
neg eax
sbb al, al
inc al
mov dword [ebp - 0x74], eax
test al, al
je 0x10012b4b
lea esi, [edi + 0x20]
test byte [edi + 4], 0x40
je 0x10012e70
mov eax, dword [edi + 0x10]
mov dword [edi + 0x14], eax
jmp 0x10012e73
mov dword [edi + 0x14], ebx
test ebx, ebx
je 0x10012e96
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], 0x100ee9b8
call fcn.100115e9
add esp, 0x10
mov al, byte [ebp - 0x74]
call fcn.1008b6ab
ret 4