Function at 0x140022730
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x41e0
call fcn.140189b00
sub rsp, rax
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov rax, qword [0x1401f3660]
xor rax, rsp
mov qword [rsp + 0x41d0], rax
mov r12d, r9d
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov r13, qword [rsp + 0x4240]
mov r14, qword [rsp + 0x4248]
mov r15, qword [rsp + 0x4258]
mov rcx, qword [rcx + 0x160]
test rcx, rcx
je 0x1400227a1
call fcn.140023190
jmp 0x140022a36
cmp qword [rsi + 0x158], 0
jne 0x1400227b3
or eax, 0xffffffff
jmp 0x140022a36
test rdx, rdx
jne 0x1400227c0
lea eax, [rdx - 0x66]
jmp 0x140022a36
cmp qword [rsi + 8], 0
jne 0x1400227cf
or eax, 0xffffffff
jmp 0x140022a36
xor eax, eax
mov dword [rsp + 0x58], eax
mov dword [rsp + 0x5c], eax
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x64], eax
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x6c], eax
mov dword [rsp + 0x70], eax
mov dword [rsp + 0x74], eax
mov dword [rsp + 0x78], eax
mov byte [rsp + 0xc0], al
xor edx, edx
mov r8d, 0x104
lea rcx, [rsp + 0xc1]
call fcn.140041940
test rdi, rdi
je 0x140022882
mov r8, rdi
mov edx, 0x105
lea rcx, [rsp + 0xc0]
call fcn.1400433f0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0xc0]
repne scasb al, byte [rdi]
not rcx
sub rcx, 1
test ecx, ecx
jle 0x140022898
lea rcx, [rsp + 0xc0]
call qword [sym.imp.SHLWAPI.dll_PathAddBackslashA]
lea rdi, [rsp + 0xc0]
xor eax, eax
or rcx, 0xffffffffffffffff
repne scasb al, byte [rdi]
xor ecx, ecx
nop
nop
nop
movzx eax, byte [rbx + rcx]
mov byte [rdi + rcx - 1], al
add rcx, 1
test al, al
jne 0x140022870
jmp 0x140022898
mov r8, rbx
mov edx, 0x105
lea rcx, [rsp + 0xc0]
call fcn.1400433f0
nop
lea r8, [rsp + 0x70]
lea rdx, [rsp + 0xc0]
mov rcx, rsi
call fcn.140022b50
xor eax, eax
mov ecx, 8
test r12d, r12d
cmovne eax, ecx
mov dword [rsp + 0x48], r12d
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x38], r13
mov eax, dword [rsp + 0x4260]
mov dword [rsp + 0x30], eax
mov qword [rsp + 0x28], r15
mov eax, dword [rsp + 0x4250]
mov dword [rsp + 0x20], eax
mov r9, r14
lea r8, [rsp + 0x58]
mov rdx, rbx
mov rcx, qword [rsi + 8]
call qword [rsi + 0x178]
mov ebx, eax
test eax, eax
jne 0x140022a36
xor r12d, r12d
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 1
lea r9d, [r12 + 3]
mov r8d, 0x80000000
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xa8]
call fcn.140023620
nop
mov dword [rsp + 0x50], r12d
mov rdi, qword [rsp + 0xb0]
nop
test ebx, ebx
jne 0x140022a18
cmp rdi, 0xffffffffffffffff
je 0x1400229e9
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov r8d, 0x3fff
lea rdx, [rsp + 0x1d0]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400229c1
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x140022a18
mov dword [rsp + 0x98], eax
lea rax, [0x1401d0828]
mov qword [rsp + 0x90], rax
lea rdx, [0x1401f0a80]
lea rcx, [rsp + 0x90]
call fcn.140041dc0
int3
mov r8d, dword [rsp + 0x50]
test r8d, r8d
je 0x140022a18
test r8d, r8d
je 0x140022950
lea rdx, [rsp + 0x1d0]
mov rcx, qword [rsi + 8]
call qword [rsi + 0x180]
mov ebx, eax
jmp 0x140022950
mov dword [rsp + 0x88], 0xffffffff
lea rax, [0x1401d0828]
mov qword [rsp + 0x80], rax
lea rdx, [0x1401f0a80]
lea rcx, [rsp + 0x80]
call fcn.140041dc0
int3
mov rcx, qword [rsi + 8]
call qword [rsi + 0x188]
mov ebx, eax
cmp rdi, 0xffffffffffffffff
je 0x140022a34
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, ebx
mov rcx, qword [rsp + 0x41d0]
xor rcx, rsp
call fcn.140041910
add rsp, 0x41e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret