Function at 0x140189570
Capabilities:
Get file attributes
Read file on windows

Disassembly:
mov byte [rsp + 0x18], r8b
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rdi
mov eax, 0x1150
call fcn.1401da720
sub rsp, rax
mov qword [rsp + 0x1130], 0xfffffffffffffffe
mov rax, qword [0x1402aa5c0]
xor rax, rsp
mov qword [rsp + 0x1140], rax
mov rax, qword [rsp + 0x1160]
cmp qword [rax + 8], 0
jne 0x1401895c1
xor al, al
jmp 0x140189a79
movzx eax, byte [rsp + 0x1170]
test eax, eax
jne 0x1401895f2
lea rdx, [0x1402454c8]
mov rcx, qword [rsp + 0x1168]
call fcn.1400aa128
cmp rax, qword [rsp + 0x1168]
jne 0x1401895f2
xor al, al
jmp 0x140189a79
mov dx, 0x3a
mov rcx, qword [rsp + 0x1168]
call fcn.1400ab6c8
test rax, rax
je 0x140189615
mov dword [rsp + 0x1138], 1
jmp 0x140189620
mov dword [rsp + 0x1138], 0
movzx eax, byte [rsp + 0x1138]
mov byte [rsp + 0x4f0], al
mov rdx, qword [rsp + 0x1168]
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rdx, [rsp + 0x2e0]
mov rcx, qword [rsp + 0x1160]
call fcn.1401882d0
movzx edx, word [0x140244844]
mov word [rsp + 0x90], dx
lea rdi, [rsp + 0x92]
xor eax, eax
mov ecx, 0x206
rep stosb byte [rdi], al
movzx eax, byte [rsp + 0x1170]
test eax, eax
je 0x1401896d9
lea rax, [rsp + 0x720]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x520]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x1168]
call fcn.1400ac0b0
lea rdx, [rsp + 0x720]
mov qword [rsp + 0x20], rdx
lea r9, [rsp + 0x520]
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x90]
call fcn.1400ac140
jmp 0x14018979f
movzx eax, byte [rsp + 0x4f0]
test eax, eax
je 0x14018974f
mov rcx, qword [rsp + 0x1160]
add rcx, 0x10
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd r8, eax
mov rdx, qword [rsp + 0x1160]
add rdx, 0x10
mov rcx, qword [rsp + 0x1168]
call fcn.1400ab814
test eax, eax
je 0x14018971e
xor al, al
jmp 0x140189a79
mov rcx, qword [rsp + 0x1160]
add rcx, 0x10
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
mov rax, qword [rsp + 0x1168]
lea rdx, [rax + rcx*2]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x14018979f
lea rdx, [0x1402454d0]
mov rcx, qword [rsp + 0x1168]
call fcn.1400aa128
cmp rax, qword [rsp + 0x1168]
jne 0x140189789
mov rdx, qword [rsp + 0x1168]
add rdx, 4
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x14018979f
mov rdx, qword [rsp + 0x1168]
lea rcx, [rsp + 0x90]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
mov dword [rsp + 0x514], 0
mov rcx, qword [rsp + 0x1168]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [rsp + 0x518], eax
mov r8b, 1
lea rdx, [rsp + 0x2d0]
lea rcx, [rsp + 0x2e0]
call fcn.1401881d0
mov dword [rsp + 0x510], 0
movzx eax, word [rsp + 0x2d0]
mov dword [rsp + 0x50c], eax
movzx eax, word [rsp + 0x2d2]
sub eax, 1
mov dword [rsp + 0x508], eax
movzx eax, word [rsp + 0x2d6]
mov dword [rsp + 0x504], eax
movzx eax, word [rsp + 0x2d8]
mov dword [rsp + 0x500], eax
movzx eax, word [rsp + 0x2da]
mov dword [rsp + 0x4fc], eax
movzx eax, word [rsp + 0x2dc]
mov dword [rsp + 0x4f8], eax
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 1
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
lea rcx, [rsp + 0x2e0]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsp + 0x2c8], rax
cmp qword [rsp + 0x2c8], 0xffffffffffffffff
jne 0x14018988b
xor al, al
jmp 0x140189a79
lea rdx, [rsp + 0x90]
lea rcx, [rsp + 0x2a0]
call fcn.140188bc0
nop
mov rdx, qword [rsp + 0x1168]
lea rcx, [rsp + 0x60]
call fcn.140188bc0
nop
lea rcx, [rsp + 0x60]
call fcn.14000b1e0
mov rdi, rax
lea rcx, [rsp + 0x2a0]
call fcn.14000b1e0
mov dword [rsp + 0x48], 0xffffffff
mov dword [rsp + 0x40], 8
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov dword [rsp + 0x20], 0
xor r9d, r9d
lea r8, [rsp + 0x4f8]
mov rdx, rax
mov rcx, qword [rsp + 0x1160]
mov rcx, qword [rcx + 8]
call fcn.14005f330
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x140189a0d
mov rax, qword [rsp + 0x1160]
mov ecx, dword [rax + 0x21c]
add ecx, 1
mov rax, qword [rsp + 0x1160]
mov dword [rax + 0x21c], ecx
mov dword [rsp + 0x1124], 0
mov dword [rsp + 0x1120], 0
cmp dword [rsp + 0x50], 0
jne 0x1401899ea
mov qword [rsp + 0x20], 0
lea r9, [rsp + 0x1124]
mov r8d, 0x800
lea rdx, [rsp + 0x920]
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1401899ea
mov ecx, dword [rsp + 0x1124]
mov eax, dword [rsp + 0x1120]
add eax, ecx
mov dword [rsp + 0x1120], eax
cmp dword [rsp + 0x1124], 0
je 0x1401899e3
mov r8d, dword [rsp + 0x1124]
lea rdx, [rsp + 0x920]
mov rcx, qword [rsp + 0x1160]
mov rcx, qword [rcx + 8]
call fcn.14005f590
mov dword [rsp + 0x50], eax
jmp 0x1401899e5
jmp 0x1401899ea
jmp 0x14018995f
mov rax, qword [rsp + 0x1160]
mov ecx, dword [rax + 0x224]
add ecx, dword [rsp + 0x1120]
mov rax, qword [rsp + 0x1160]
mov dword [rax + 0x224], ecx
mov rcx, qword [rsp + 0x1160]
mov rcx, qword [rcx + 8]
call fcn.140060050
mov rcx, qword [rsp + 0x2c8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x50], 0
jne 0x140189a40
mov dword [rsp + 0x113c], 1
jmp 0x140189a4b
mov dword [rsp + 0x113c], 0
movzx eax, byte [rsp + 0x113c]
mov byte [rsp + 0x1128], al
lea rcx, [rsp + 0x60]
call fcn.14000bbd0
nop
lea rcx, [rsp + 0x2a0]
call fcn.14000bbd0
mov al, byte [rsp + 0x1128]
mov rcx, qword [rsp + 0x1140]
xor rcx, rsp
call fcn.1400a8790
add rsp, 0x1150
pop rdi
ret