Function at 0x140002f90
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 [0x140018020]
xor rax, rsp
mov qword [rbp - 8], rax
xor ebx, ebx
mov rdi, rcx
mov rsi, rdx
mov word [rdx], bx
mov rcx, qword [rcx]
mov byte [rbp - 0x1f], bl
cmp rcx, 0xffffffffffffffff
je 0x140003258
lea r9, [rbp - 0x14]
lea r8d, [rbx + 1]
lea rdx, [rbp - 0x1f]
mov dword [rbp - 0x14], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x14], ebx
jle 0x140003258
movzx eax, byte [rbp - 0x1f]
cmp al, 0x7f
jbe 0x1400030b7
xor ecx, ecx
movzx edx, al
mov qword [rsp + 0x80], r12
mov word [rbp - 0x14], bx
mov byte [rbp - 0x18], al
mov byte [rbp - 0x17], cl
call qword [sym.imp.KERNEL32.dll_IsDBCSLeadByteEx]
mov r12d, eax
test eax, eax
je 0x140003051
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x1400030b3
lea r9, [rbp - 0x1c]
lea r8d, [rbx + 1]
lea rdx, [rbp - 0x20]
mov dword [rbp - 0x1c], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x1c], ebx
jle 0x1400030b3
movzx eax, byte [rbp - 0x20]
mov byte [rbp - 0x17], al
lea rax, [rbp - 0x14]
test r12d, r12d
lea r8, [rbp - 0x18]
setne bl
mov edx, 8
xor ecx, ecx
lea r9d, [rbx + 1]
mov dword [rsp + 0x28], 1
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, 0x3f
cmp eax, 1
mov al, 1
cmove cx, word [rbp - 0x14]
mov word [rsi], cx
mov r12, qword [rsp + 0x80]
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14000c160
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop rdi
pop rsi
pop rbp
ret
xor al, al
jmp 0x14000308f
cmp al, 0xd
jne 0x14000312a
mov eax, 0xd
mov word [rsi], ax
cmp byte [rdi + 0x15], bl
je 0x140003114
mov rcx, qword [rdi]
mov byte [rbp - 0x20], bl
cmp rcx, 0xffffffffffffffff
je 0x140003114
lea r9, [rbp - 0x1c]
lea r8d, [rax - 0xc]
lea rdx, [rbp - 0x20]
mov dword [rbp - 0x1c], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rbp - 0x1c], ebx
jle 0x140003114
cmp byte [rbp - 0x20], 0xa
je 0x14000311b
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x140003114
mov r9d, 1
xor r8d, r8d
or edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov al, 1
jmp 0x140003097
mov eax, 0xa
mov word [rsi], ax
mov al, 1
jmp 0x140003097
cmp al, 0x5c
jne 0x14000324b
cmp byte [rdi + 0x14], bl
je 0x14000324b
mov rcx, qword [rdi]
xor eax, eax
mov byte [rbp - 0x10], 0x5c
mov dword [rbp - 0xf], eax
mov word [rbp - 0xb], ax
mov byte [rbp - 9], al
cmp rcx, 0xffffffffffffffff
jne 0x140003158
or edx, ecx
jmp 0x140003181
lea r9, [rbp - 0x1c]
lea rdx, [rbp - 0xf]
mov r8d, 6
mov dword [rbp - 0x1c], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [rbp - 0x10], 0x5c
mov edx, dword [rbp - 0x1c]
jne 0x14000321e
movzx eax, byte [rbp - 0xf]
cmp al, 0x55
je 0x140003191
cmp al, 0x75
jne 0x14000321e
cmp byte [rbp - 0xe], 0x2b
jne 0x14000321e
movzx eax, byte [rbp - 0xd]
cmp al, 0x30
jl 0x1400031a7
cmp al, 0x39
jle 0x1400031b7
cmp al, 0x41
jl 0x1400031af
cmp al, 0x46
jle 0x1400031b7
cmp al, 0x61
jl 0x14000321e
cmp al, 0x66
jg 0x14000321e
movzx eax, byte [rbp - 0xc]
cmp al, 0x30
jl 0x1400031c3
cmp al, 0x39
jle 0x1400031d3
cmp al, 0x41
jl 0x1400031cb
cmp al, 0x46
jle 0x1400031d3
cmp al, 0x61
jl 0x14000321e
cmp al, 0x66
jg 0x14000321e
movzx eax, byte [rbp - 0xb]
cmp al, 0x30
jl 0x1400031df
cmp al, 0x39
jle 0x1400031ef
cmp al, 0x41
jl 0x1400031e7
cmp al, 0x46
jle 0x1400031ef
cmp al, 0x61
jl 0x14000321e
cmp al, 0x66
jg 0x14000321e
movzx eax, byte [rbp - 0xa]
cmp al, 0x30
jl 0x1400031fb
cmp al, 0x39
jle 0x14000320b
cmp al, 0x41
jl 0x140003203
cmp al, 0x46
jle 0x14000320b
cmp al, 0x61
jl 0x14000321e
cmp al, 0x66
jg 0x14000321e
lea rcx, [rbp - 0x10]
mov rdx, rsi
call fcn.14000a710
mov al, 1
jmp 0x140003097
test edx, edx
jle 0x14000323c
mov rcx, qword [rdi]
cmp rcx, 0xffffffffffffffff
je 0x14000323c
neg edx
mov r9d, 1
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, 0x5c
mov word [rsi], ax
mov al, 1
jmp 0x140003097
movzx eax, al
mov word [rsi], ax
mov al, 1
jmp 0x140003097
xor al, al
jmp 0x140003097