Function at 0x140001b50
Capabilities:
Read file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x30
xor edi, edi
lea rsi, [rcx + 0x10]
mov eax, dword [rsi]
mov rbx, rcx
lea r14d, [rdi + 1]
cmp dword [rcx + 0x14], eax
jb 0x140001d64
mov r13d, 0x400
xor r15b, r15b
mov ecx, r13d
call fcn.140002798
mov rdi, rax
test rax, rax
je 0x140001d5a
mov rcx, qword [rbx + 0x38]
mov r9, rsi
mov r8d, r13d
mov rdx, rax
test rcx, rcx
jne 0x140001bbe
and qword [rsp + 0x20], rcx
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setg al
jmp 0x140001bd0
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x14003f18e.0]
test eax, eax
setns al
test al, al
je 0x140001d5a
cmp dword [rsi], 0
je 0x140001d5a
mov r13d, 2
cmp dword [rbx + 0x2c], r13d
jne 0x140001c9c
mov rcx, qword [rbx + 0x38]
lea r9, [rbp + 0x48]
mov dword [rbp + 0x48], r13d
mov r8d, r13d
lea rdx, [rbp + 0x40]
test rcx, rcx
jne 0x140001c1e
and qword [rsp + 0x20], rcx
mov rcx, qword [rbx]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
setg al
jmp 0x140001c30
mov rax, qword [rcx]
mov rax, qword [rax + 0x18]
call qword [case.0x14003f18e.0]
test eax, eax
setns al
mov edx, dword [rsi]
lea r8, [rbp + 0x40]
neg al
mov rcx, rdi
lea rax, [rbp + 0x50]
sbb r9d, r9d
mov qword [rsp + 0x20], rax
and r9d, dword [rbp + 0x48]
mov dword [rbp + 0x48], r9d
call fcn.140001db8
mov dword [rsi], eax
mov eax, dword [rbp + 0x48]
test eax, eax
je 0x140001c9c
sub eax, dword [rbp + 0x50]
mov rcx, qword [rbx + 0x38]
neg eax
test rcx, rcx
jne 0x140001c7e
mov rcx, qword [rbx]
mov r9d, r14d
xor r8d, r8d
mov edx, eax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140001c9c
and dword [rbp + 0x54], 0
xor r9d, r9d
mov dword [rbp + 0x50], eax
mov r8d, r14d
mov rax, qword [rcx]
mov rdx, qword [rbp + 0x50]
mov rax, qword [rax + 0x28]
call qword [case.0x14003f18e.0]
cmp dword [rbx + 0x20], 0
jne 0x140001ca9
mov r15b, r14b
mov dword [rbx + 0x20], r14d
mov ecx, dword [rbx + 0x24]
test ecx, ecx
je 0x140001cb2
shr dword [rsi], 1
cmp dword [rbx + 0x28], 0
je 0x140001ce7
mov eax, dword [rsi]
xor r8d, r8d
lea r9d, [rax*2 - 2]
test r9d, r9d
je 0x140001ce7
mov cl, byte [r8 + rdi]
mov al, byte [rdi + r8 + 1]
mov byte [r8 + rdi], al
mov byte [rdi + r8 + 1], cl
add r8d, r13d
cmp r8d, r9d
jb 0x140001cca
mov ecx, dword [rbx + 0x24]
test ecx, ecx
je 0x140001cfc
mov rcx, qword [rbx + 0x18]
call fcn.1400027dc
mov qword [rbx + 0x18], rdi
xor edi, edi
jmp 0x140001d43
mov rax, qword gs:[0x58]
mov edx, 0x20
mov rcx, qword [rax]
mov eax, dword [rdx + rcx]
cmp dword [0x14007f3ec], eax
jg 0x140001d83
mov rax, qword [rbx + 0x18]
mov r8, rdi
mov r9d, dword [rsi]
xor edx, edx
mov ecx, dword [0x14007f3f0]
mov dword [rsp + 0x28], 0x400
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rsi], eax
test eax, eax
je 0x140001d5a
test r15b, r15b
je 0x140001d53
cmp dword [rbx + 0x24], 0
je 0x140001d53
mov eax, r14d
jmp 0x140001d55
xor eax, eax
mov dword [rbx + 0x14], eax
jmp 0x140001d64
and dword [rsi], 0
and dword [rbx + 0x14], 0
xor r14d, r14d
test rdi, rdi
je 0x140001d71
mov rcx, rdi
call fcn.1400027dc
mov eax, r14d
add rsp, 0x30
pop r15
pop r14
pop r13
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, [0x14007f3ec]
call fcn.14003f088
cmp dword [0x14007f3ec], 0xffffffff
jne 0x140001d18
call qword [sym.imp.KERNEL32.dll_GetACP]
lea rcx, [0x14007f3ec]
mov dword [0x14007f3f0], eax
call fcn.14003f028
jmp 0x140001d18