Function at 0x100005f40
Capabilities:
Get common file path
Get disk information
Set current directory

Disassembly:
mov r11, rsp
sub rsp, 0x3a8
mov rax, qword [0x100011410]
mov qword [rsp + 0x370], rax
mov qword [r11 - 8], rbp
mov qword [r11 - 0x10], rsi
mov qword [r11 - 0x18], rdi
mov qword [r11 - 0x20], r12
xor r12d, r12d
test edx, edx
mov ebp, r8d
mov edi, edx
mov rsi, rcx
mov dword [rsp + 0x40], r12d
jne 0x100005f85
lea eax, [rdx + 1]
jmp 0x100006295
lea rdx, [rsp + 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x100005ffa
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4bc
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0x10
call fcn.100005260
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x100005fde
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x100012170], eax
xor eax, eax
jmp 0x100006295
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
xor eax, eax
mov dword [0x100012170], ecx
jmp 0x100006295
lea rdx, [rsp + 0x40]
xor ecx, ecx
mov qword [rsp + 0x3c8], rbx
call fcn.100009f50
test eax, eax
mov ebx, eax
jne 0x1000060cc
lea rcx, [rsp + 0x171]
xor edx, edx
mov r8d, 0x1ff
mov byte [rsp + 0x170], r12b
call sub.msvcrt.dll_memset
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x10000604d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x100012170], eax
jmp 0x100006062
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
mov dword [0x100012170], ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x200
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], ecx
mov r8d, eax
lea rax, [rsp + 0x170]
xor r9d, r9d
xor edx, edx
mov ecx, 0x1000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0x10
lea r9, [rsp + 0x170]
mov r8, rsi
mov edx, 0x4b0
xor ecx, ecx
call fcn.100005260
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
xor eax, eax
jmp 0x10000628d
mov dword [rsp + 0x38], r12d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x30], r12
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_GetVolumeInformationA]
test eax, eax
jne 0x1000061a2
lea rcx, [rsp + 0x171]
xor edx, edx
mov r8d, 0x1ff
mov byte [rsp + 0x170], r12b
call sub.msvcrt.dll_memset
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x100006137
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x100012170], eax
jmp 0x10000614c
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx ecx, ax
or ecx, 0x80070000
mov dword [0x100012170], ecx
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, 0x200
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], ecx
mov r8d, eax
lea rax, [rsp + 0x170]
xor r9d, r9d
xor edx, edx
mov ecx, 0x1000
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_FormatMessageA]
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0x10
lea r9, [rsp + 0x170]
mov r8, rsi
mov edx, 0x4f9
jmp 0x1000060b3
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
lea rcx, [rsp + 0x4c]
mov r8d, 3
mov rdx, rsi
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
mov edx, dword [rsp + 0x40]
mov ecx, 0x200
xor ax, ax
nop
cmp edx, ecx
je 0x1000061df
inc ax
add ecx, ecx
cmp ax, 8
jb 0x1000061d0
cmp ax, 8
jne 0x10000620b
xor r9d, r9d
xor r8d, r8d
mov edx, 0x4c5
xor ecx, ecx
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 0x10
call fcn.100005260
xor eax, eax
jmp 0x10000628d
test byte [0x100012ba4], 8
je 0x10000623d
bt dword [rsp + 0x44], 0xf
jae 0x10000623d
movzx eax, ax
lea rcx, [0x100013420]
mov edx, dword [rcx + rax*4]
mov eax, dword [0x100012ba8]
mov r8d, eax
add edx, edx
shr r8d, 2
add r8d, eax
jmp 0x100006251
mov r8d, dword [0x100012ba8]
lea rcx, [0x100013420]
movzx eax, ax
mov edx, dword [rcx + rax*4]
mov eax, edi
and eax, 1
je 0x100006274
test dil, 2
je 0x100006274
lea eax, [r8 + rdx]
cmp eax, ebx
jbe 0x100006281
lea r9, [rsp + 0x4c]
mov ecx, ebp
call fcn.100002630
jmp 0x10000628d
test eax, eax
je 0x10000627c
cmp edx, ebx
jmp 0x100006264
cmp r8d, ebx
jmp 0x100006264
mov dword [0x100012170], r12d
mov eax, 1
mov rbx, qword [rsp + 0x3c8]
mov r12, qword [rsp + 0x388]
mov rdi, qword [rsp + 0x390]
mov rsi, qword [rsp + 0x398]
mov rbp, qword [rsp + 0x3a0]
mov rcx, qword [rsp + 0x370]
call fcn.10000ea20
add rsp, 0x3a8
ret