Function at 0x140002f60
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x20], rbx
push rbp
push rsi
push rdi
mov rbp, rsp
sub rsp, 0x50
mov rax, qword [0x140019008]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
mov rdi, rcx
mov word [rdx], bx
mov rsi, rdx
mov rcx, qword [rcx]
mov byte [rbp - 0x1f], bl
cmp rcx, 0xffffffffffffffff
je 0x140003209
lea r9, [rbp - 0x18]
mov dword [rbp - 0x18], ebx
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x1f]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x18], ebx
jle 0x140003209
movzx eax, byte [rbp - 0x1f]
cmp al, 0x7f
jbe 0x140003087
xor ecx, ecx
mov qword [rsp + 0x80], r14
movzx edx, al
mov byte [rbp - 0x1b], cl
mov word [rbp - 0x18], bx
mov byte [rbp - 0x1c], al
call qword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
mov r14d, eax
test eax, eax
je 0x140003021
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x140003083
lea r9, [rbp - 0x14]
mov dword [rbp - 0x14], ebx
lea r8d, [rbx + 1]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x14], ebx
jle 0x140003083
movzx eax, byte [rbp - 0x20]
mov byte [rbp - 0x1b], al
lea rax, [rbp - 0x18]
mov dword [rsp + 0x28], 1
test r14d, r14d
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x1c]
mov edx, 8
setne bl
xor ecx, ecx
lea r9d, [rbx + 1]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, 1
mov ecx, 0x3f
mov al, 1
cmove cx, word [rbp - 0x18]
mov word [rsi], cx
mov r14, qword [rsp + 0x80]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14000c2d0
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
xor al, al
jmp 0x14000305f
cmp al, 0xd
jne 0x1400030fa
mov eax, 0xd
mov word [rsi], ax
cmp byte [rdi + 0x15], bl
je 0x1400030e4
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x1400030e4
lea r9, [rbp - 0x14]
mov dword [rbp - 0x14], ebx
lea r8d, [rax - 0xc]
mov qword [rsp + 0x20], rbx
lea rdx, [rbp - 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x14], ebx
jle 0x1400030e4
cmp byte [rbp - 0x20], 0xa
je 0x1400030eb
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x1400030e4
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov al, 1
jmp 0x140003067
mov eax, 0xa
mov word [rsi], ax
mov al, 1
jmp 0x140003067
cmp al, 0x5c
jne 0x1400031fc
cmp byte [rdi + 0x14], bl
je 0x1400031fc
xor eax, eax
mov byte [rbp - 0x10], 0x5c
lea rdx, [rbp - 0xf]
mov dword [rbp - 0xf], eax
mov rcx, rdi
mov word [rbp - 0xb], ax
mov byte [rbp - 9], al
lea r8d, [rax + 6]
call fcn.140002bb0
cmp byte [rbp - 0x10], 0x5c
mov r10d, eax
jne 0x1400031ca
movzx ecx, byte [rbp - 0xf]
sub cl, 0x55
test cl, 0xdf
jne 0x1400031ca
cmp byte [rbp - 0xe], 0x2b
jne 0x1400031ca
movzx edx, byte [rbp - 0xd]
lea ecx, [rdx - 0x30]
cmp cl, 9
jbe 0x140003169
lea eax, [rdx - 0x41]
cmp al, 5
jbe 0x140003169
sub dl, 0x61
cmp dl, 5
ja 0x1400031ca
movzx ecx, byte [rbp - 0xc]
lea eax, [rcx - 0x30]
cmp al, 9
jbe 0x140003183
lea eax, [rcx - 0x41]
cmp al, 5
jbe 0x140003183
sub cl, 0x61
cmp cl, 5
ja 0x1400031ca
movzx ecx, byte [rbp - 0xb]
lea eax, [rcx - 0x30]
cmp al, 9
jbe 0x14000319d
lea eax, [rcx - 0x41]
cmp al, 5
jbe 0x14000319d
sub cl, 0x61
cmp cl, 5
ja 0x1400031ca
movzx ecx, byte [rbp - 0xa]
lea eax, [rcx - 0x30]
cmp al, 9
jbe 0x1400031b7
lea eax, [rcx - 0x41]
cmp al, 5
jbe 0x1400031b7
sub cl, 0x61
cmp cl, 5
ja 0x1400031ca
mov rdx, rsi
lea rcx, [rbp - 0x10]
call fcn.14000a820
mov al, 1
jmp 0x140003067
test r10d, r10d
jle 0x1400031ed
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x1400031ed
neg r10d
mov r9d, 1
mov edx, r10d
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, 0x5c
mov word [rsi], ax
mov al, 1
jmp 0x140003067
movzx eax, al
mov word [rsi], ax
mov al, 1
jmp 0x140003067
xor al, al
jmp 0x140003067