Function at 0x140005510
Capabilities:
Get file attributes

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x90
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x80], rbx
mov qword [rbp + 0x88], rsi
mov qword [rbp + 0x90], rdi
mov rax, qword [0x1400b3ad8]
xor rax, rbp
mov qword [rbp + 0x48], rax
mov rbx, rdx
mov r12, rcx
mov qword [rbp + 0x30], rcx
xor esi, esi
mov rdi, rsi
mov qword [rbp + 0x20], rsi
mov dword [rbp + 0x14], pe_nt_image_headers64
mov ecx, pe_nt_image_headers64
call fcn.14001c700
mov r13, rax
mov qword [rbp + 8], rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [rbp + 0x28], eax
cmp eax, 0xffffffff
je 0x140005813
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], 0x8000080
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [rsi + 1]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rdi, rax
mov qword [rbp + 0x20], rax
cmp rax, 0xffffffffffffffff
je 0x140005813
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov eax, 0x8000
call fcn.14007ab30
sub rsp, rax
lea r15, [rsp + 0x40]
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x10]
mov r8d, eax
mov rdx, r15
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x140005813
mov ecx, esi
mov dword [rbp + 0x2c], ecx
mov r8d, dword [rbp + 0x10]
cmp ecx, r8d
jae 0x140005622
mov eax, ecx
movzx edx, byte [rax + r15]
cmp dl, 0xd
je 0x140005622
cmp dl, 0xa
je 0x140005622
inc ecx
mov dword [rbp + 0x2c], ecx
jmp 0x140005605
cmp esi, r8d
jne 0x14000562b
mov eax, esi
jmp 0x140005656
mov eax, esi
cmp byte [rax + r15], 0xa
jne 0x14000563b
mov eax, 1
jmp 0x140005656
lea eax, [r8 - 1]
cmp esi, eax
jae 0x140005651
lea eax, [rsi + 1]
cmp byte [rax + r15], 0xa
jne 0x140005651
mov eax, esi
jmp 0x140005656
mov eax, 2
mov dword [r12 + 0x4c], eax
cdqe
lea rbx, [0x14095d9f8]
mov rbx, qword [rbx + rax*8]
mov qword [rbp + 0x40], rbx
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.1400071a0
mov r12d, esi
mov dword [rbp + 0x18], esi
mov edi, esi
mov dword [rbp], esi
nop dword [rax]
mov ecx, dword [rbp + 0x10]
cmp r12d, ecx
jae 0x140005789
mov eax, r12d
movsx r13d, byte [rax + r15]
mov dword [rbp + 0x38], r13d
inc r12d
mov dword [rbp + 0x18], r12d
cmp r12d, ecx
jne 0x1400056e3
cmp ecx, 0x8000
jne 0x1400056e3
mov qword [rsp + 0x20], rsi
lea r9, [rbp + 0x10]
mov r8d, ecx
mov rdx, r15
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x14000580b
mov r12d, esi
mov dword [rbp + 0x18], esi
movsxd rax, r14d
mov rdx, qword [rbp + 8]
mov byte [rax + rdx], r13b
inc r14d
mov dword [rbp + 0x1c], r14d
mov eax, dword [rbp + 0x14]
cmp r14d, eax
jne 0x140005736
add eax, 0x100
mov dword [rbp + 0x14], eax
mov dword [rbp + 0x3c], eax
movsxd rcx, eax
call fcn.14001c700
mov rbx, rax
movsxd r8, r14d
mov rdx, qword [rbp + 8]
mov rcx, rax
call fcn.140061b40
mov rcx, qword [rbp + 8]
call fcn.14001c6f8
mov rdx, rbx
mov qword [rbp + 8], rbx
mov rbx, qword [rbp + 0x40]
movsxd rax, edi
cmp r13b, byte [rax + rbx]
jne 0x14000577f
inc edi
mov dword [rbp], edi
movsxd rcx, edi
cmp byte [rcx + rbx], 0
jne 0x140005784
movsxd rax, r14d
sub rax, rcx
mov byte [rax + rdx], 0
mov rcx, rdx
call fcn.140004ea0
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, qword [rbp + 0x30]
call fcn.140005210
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov edi, esi
mov dword [rbp], esi
jmp 0x140005784
mov edi, esi
mov dword [rbp], esi
jmp 0x140005690
movsxd rax, r14d
mov r13, qword [rbp + 8]
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140004ea0
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rbx, qword [rbp + 0x30]
mov rcx, rbx
call fcn.140005210
mov dword [rbx + 0x40], 1
mov eax, dword [rbp + 0x28]
and eax, 1
mov dword [rbx + 0x44], eax
mov dword [rbx + 0x48], esi
mov dword [rbx + 0xb4], esi
mov dword [rbx + 0xb0], esi
mov dword [rbx + 0x54], 0x80000
mov dword [rbx + 0xa8], esi
mov dword [rbx + 0xac], esi
mov esi, 1
mov dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.140006060
mov rdi, qword [rbp + 0x20]
jmp 0x140005813
mov r13, qword [rbp + 8]
mov rdi, qword [rbp + 0x20]
test r13, r13
je 0x140005820
mov rcx, r13
call fcn.14001c6f8
test rdi, rdi
je 0x14000582e
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.140060db0
mov rbx, qword [rbp + 0x80]
mov rsi, qword [rbp + 0x88]
mov rdi, qword [rbp + 0x90]
lea rsp, [rbp + 0x50]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
mov qword [rsp + 8], rbx
push rdi
sub rsp, 0x20
mov rbx, rdx
mov rdi, rcx
call fcn.14004c408
test eax, eax
jne 0x140015f94
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
lea rcx, [rdi + 0xa0]
or r8d, 0xffffffff
mov rdx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x140005510