Function at 0x1400078c0
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x790]
sub rsp, 0x890
mov rax, qword [0x140019030]
xor rax, rsp
mov qword [rbp + 0x780], rax
mov r12, rcx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rax
lea ebx, [rax + 1]
lea rcx, [0x1400119c0]
test rdx, rdx
cmovne rcx, rdx
xor r13d, r13d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rax + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x50], rax
mov ecx, ebx
cmp rax, 0xffffffffffffffff
cmovne ecx, ebx
mov dword [rsp + 0x58], ecx
mov dword [rsp + 0x60], ebx
mov word [rsp + 0x64], 0x101
je 0x140007bc2
lea rcx, [rsp + 0x50]
call fcn.140002ad0
movzx ecx, byte [rsp + 0x64]
test al, al
cmovne ecx, r13d
mov byte [rsp + 0x64], cl
mov r14d, dword [rsp + 0x60]
mov rdi, qword [rsp + 0x50]
nop dword [rax]
nop word [rax + rax]
mov r15d, 0x400
mov word [rbp - 0x80], r13w
cmp rdi, 0xffffffffffffffff
je 0x140007bc2
cmp dword [rsp + 0x58], 1
jne 0x140007bc2
lea rsi, [rbp - 0x80]
cmp rdi, 0xffffffffffffffff
je 0x140007b93
cmp dword [rsp + 0x58], 1
jne 0x140007b93
mov eax, r14d
sub eax, 1
je 0x140007b29
sub eax, 1
je 0x140007a4a
sub eax, 1
je 0x1400079e8
cmp eax, 1
jne 0x140007b93
mov word [rsp + 0x40], r13w
mov word [rsp + 0x48], r13w
mov dword [rsp + 0x68], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x68]
mov r8d, 2
lea rdx, [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x68], 2
jl 0x140007b93
movzx ecx, word [rsp + 0x48]
cmp r14d, 4
jne 0x140007a40
movzx eax, cx
shr ax, 8
shl cx, 8
or cx, ax
mov word [rsp + 0x48], cx
mov word [rsp + 0x40], cx
jmp 0x140007b4b
mov byte [rsp + 0x44], 0
mov dword [rsp + 0x6c], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x6c]
mov r8d, ebx
lea rdx, [rsp + 0x44]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [rsp + 0x6c], 0
jle 0x140007b93
movzx ecx, byte [rsp + 0x44]
cmp cl, 0x7f
ja 0x140007a8e
mov word [rsp + 0x40], cx
jmp 0x140007b4b
movzx eax, cl
and al, 0xe0
cmp al, 0xc0
jne 0x140007a9e
mov ebx, 2
jmp 0x140007ac0
movzx eax, cl
and al, 0xf0
cmp al, 0xe0
jne 0x140007aae
mov ebx, 3
jmp 0x140007ac0
movzx eax, cl
and al, 0xf8
cmp al, 0xf0
jne 0x140007b93
mov ebx, 4
mov dword [rsp + 0x4c], r13d
mov byte [rsp + 0x4c], cl
mov dword [rsp + 0x70], r13d
lea r8d, [rbx - 1]
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x70]
lea rdx, [rsp + 0x4d]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [rbx - 1]
cmp dword [rsp + 0x70], eax
jl 0x140007b8e
mov dword [rsp + 0x28], 1
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, ebx
lea r8, [rsp + 0x4c]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, 1
cmp eax, ebx
jne 0x140007b93
jmp 0x140007b46
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.140002c80
mov r14d, dword [rsp + 0x60]
mov rdi, qword [rsp + 0x50]
test al, al
je 0x140007b93
movzx ecx, word [rsp + 0x40]
movzx eax, cx
cmp eax, 0xa
je 0x140007b9c
cmp eax, 0xd
je 0x140007b67
cmp eax, 0x1a
je 0x140007b72
mov word [rsi], cx
add rsi, 2
dec r15d
cmp r15d, 1
jle 0x140007b9c
jmp 0x1400079b4
cmp rdi, 0xffffffffffffffff
je 0x140007b9c
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x140007b9c
mov ebx, 1
lea rax, [rbp - 0x80]
cmp rsi, rax
je 0x140007bc2
mov word [rsi], r13w
lea rax, [rbp - 0x80]
sub rsi, rax
sar rsi, 1
test esi, esi
jle 0x140007bc2
xor r8d, r8d
lea rdx, [rbp - 0x80]
mov rcx, r12
call fcn.140006c10
jmp 0x140007990
cmp rdi, 0xffffffffffffffff
je 0x140007bd1
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rbp + 0x780]
xor rcx, rsp
call fcn.14000dba0
mov rbx, qword [rsp + 0x8e0]
add rsp, 0x890
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret