Function at 0x1400055b0
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 [0x140238ff8]
xor rax, rbp
mov qword [rbp + 0x48], rax
mov rbx, rdx
mov r12, rcx
mov qword [rbp + 0x30], rcx
xor esi, esi
mov edi, esi
mov qword [rbp + 0x20], rsi
mov dword [rbp + 0x14], 0x100
mov ecx, 0x100
call fcn.14001c0f8
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 0x140005891
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 0x140005891
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov eax, 0x8000
call fcn.1401754f0
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 0x140005891
mov ecx, esi
mov r8d, dword [rbp + 0x10]
mov dword [rbp + 0x2c], ecx
cmp ecx, r8d
jae 0x1400056be
mov eax, ecx
movzx edx, byte [rax + r15]
cmp dl, 0xd
je 0x1400056be
cmp dl, 0xa
je 0x1400056be
inc ecx
jmp 0x1400056a1
cmp esi, r8d
jne 0x1400056c7
mov eax, esi
jmp 0x1400056f0
mov eax, esi
cmp byte [rax + r15], 0xa
jne 0x1400056d7
mov eax, 1
jmp 0x1400056f0
lea eax, [r8 - 1]
cmp esi, eax
jae 0x1400056eb
lea eax, [rsi + 1]
cmp byte [rax + r15], 0xa
mov eax, esi
je 0x1400056f0
mov eax, 2
mov dword [r12 + 0x4c], eax
cdqe
lea rbx, [0x1420af2d8]
mov rbx, qword [rbx + rax*8]
mov qword [rbp + 0x40], rbx
lea rcx, [r12 + 0x58]
xor edx, edx
mov r8d, 0x1000
call fcn.140007210
mov r12d, esi
mov dword [rbp + 0x18], esi
mov edi, esi
mov dword [rbp], esi
mov ecx, dword [rbp + 0x10]
cmp r12d, ecx
jae 0x140005815
mov eax, r12d
movsx r13d, byte [rax + r15]
mov dword [rbp + 0x38], r13d
inc r12d
mov dword [rbp + 0x18], r12d
cmp r12d, ecx
jne 0x140005776
cmp ecx, 0x8000
jne 0x140005776
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 0x140005889
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 0x1400057c9
add eax, 0x100
mov dword [rbp + 0x14], eax
mov dword [rbp + 0x3c], eax
movsxd rcx, eax
call fcn.14001c0f8
mov rbx, rax
movsxd r8, r14d
mov rdx, qword [rbp + 8]
mov rcx, rax
call fcn.1401759b0
mov rcx, qword [rbp + 8]
call fcn.14001c100
mov rdx, rbx
mov qword [rbp + 8], rbx
mov rbx, qword [rbp + 0x40]
movsxd rax, edi
cmp r13b, byte [rax + rbx]
jne 0x14000580b
inc edi
mov dword [rbp], edi
movsxd rcx, edi
cmp byte [rcx + rbx], 0
jne 0x140005810
movsxd rax, r14d
sub rax, rcx
mov byte [rax + rdx], 0
mov rcx, rdx
call fcn.140004f30
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rcx, qword [rbp + 0x30]
call fcn.1400052d0
mov r14d, esi
mov dword [rbp + 0x1c], esi
mov dword [rbp], esi
mov edi, esi
jmp 0x140005723
movsxd rax, r14d
mov r13, qword [rbp + 8]
mov byte [rax + r13], 0
mov rcx, r13
call fcn.140004f30
mov rdx, rax
or r9d, 0xffffffff
or r8d, r9d
mov rbx, qword [rbp + 0x30]
mov rcx, rbx
call fcn.1400052d0
mov dword [rbx + 0x40], 1
mov eax, dword [rbp + 0x28]
and eax, 1
mov dword [rbx + 0x44], eax
mov dword [rbx + 0x48], esi
mov qword [rbx + 0xb0], rsi
mov dword [rbx + 0x54], 0x80000
mov qword [rbx + 0xa8], rsi
mov esi, 1
mov dword [rsp + 0x20], 0xffffffff
mov r9d, 0x1000
xor r8d, r8d
xor edx, edx
mov rcx, rbx
call fcn.1400060e0
jmp 0x14000588d
mov r13, qword [rbp + 8]
mov rdi, qword [rbp + 0x20]
test r13, r13
je 0x14000589e
mov rcx, r13
call fcn.14001c100
test rdi, rdi
je 0x1400058ac
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.140172990
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.14004f628
test eax, eax
jne 0x140015c44
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
ret
lea rcx, [rdi + 0x180]
mov rdx, rbx
mov rbx, qword [rsp + 0x30]
add rsp, 0x20
pop rdi
jmp 0x1400055b0