Function at 0x180005990
Capabilities:
Get common file path
Set current directory

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
lea rbp, [rax - 0x7f8]
sub rsp, 0x8e0
mov qword [rbp - 0x58], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x1800bd650]
xor rax, rsp
mov qword [rbp + 0x7d0], rax
mov rsi, rdx
mov rdi, rcx
xor r12d, r12d
lea r8d, [r12 + 1]
lea rdx, [0x1800d6860]
lea rcx, [rbp - 0x50]
call fcn.1800240d0
lock inc dword [0x1800d0214]
mov r8d, dword [rdi + 8]
xor edx, edx
mov eax, r8d
div dword [0x1800d68a0]
mov rcx, qword [0x1800d6898]
test rcx, rcx
je 0x180005a27
mov rcx, qword [rcx + rdx*8]
test rcx, rcx
je 0x180005a27
nop
cmp dword [rcx + 0x18], r8d
je 0x180005a20
mov rcx, qword [rcx]
test rcx, rcx
jne 0x180005a10
jmp 0x180005a27
mov ebx, 1
jmp 0x180005a2a
mov ebx, r12d
lea rcx, [rbp - 0x50]
call fcn.180024110
test ebx, ebx
jne 0x180005e4f
lea rax, vtable.CObjectID.0
mov qword [rsp + 0x20], rax
mov eax, 1
lock xadd dword [0x1800d0214], eax
inc eax
mov dword [rsp + 0x28], eax
mov rax, qword [0x18007db48]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], rax
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rax
mov ecx, dword [rdi + 8]
xor edx, edx
mov eax, ecx
div dword [0x1800d6840]
mov rbx, qword [0x1800d6838]
test rbx, rbx
je 0x180005def
mov rbx, qword [rbx + rdx*8]
test rbx, rbx
je 0x180005def
cmp dword [rbx + 0x18], ecx
je 0x180005ac7
mov rbx, qword [rbx]
test rbx, rbx
jne 0x180005ab5
jmp 0x180005def
mov eax, dword [rbx + 0x28]
mov dword [rsp + 0x28], eax
lea rdx, [rbx + 0x30]
lea rcx, [rsp + 0x30]
call fcn.180020ef0
lea rdx, [rbx + 0x38]
lea rcx, [rsp + 0x38]
call fcn.180020ef0
lea rdx, [rbx + 0x40]
lea rcx, [rsp + 0x40]
call fcn.180020ef0
lea rdx, [rbx + 0x48]
lea rcx, [rsp + 0x48]
call fcn.180020ef0
lea rdx, [rbx + 0x50]
lea rcx, [rsp + 0x50]
call fcn.180020ef0
lea rdx, [rbx + 0x58]
lea rcx, [rsp + 0x58]
call fcn.180020ef0
mov r11d, dword [rbx + 0x60]
mov dword [rsp + 0x60], r11d
mov eax, dword [rbx + 0x64]
mov dword [rsp + 0x64], eax
mov eax, dword [rbx + 0x68]
mov dword [rsp + 0x68], eax
mov eax, dword [rbx + 0x6c]
mov dword [rsp + 0x6c], eax
mov eax, dword [rbx + 0x70]
mov dword [rsp + 0x70], eax
mov eax, dword [rbx + 0x74]
mov dword [rsp + 0x74], eax
mov eax, dword [rbx + 0x78]
mov dword [rsp + 0x78], eax
lea rdx, [rbx + 0x80]
lea rcx, [rbp - 0x80]
call fcn.180020ef0
lea rdx, [rbx + 0x88]
lea rcx, [rbp - 0x78]
call fcn.180020ef0
lea rdx, [rbx + 0x90]
lea rcx, [rbp - 0x70]
call fcn.180020ef0
mov r11, qword [rbx + 0x98]
mov qword [rbp - 0x68], r11
mov rcx, rdi
call fcn.1800063e0
test eax, eax
jne 0x180005c01
lea rcx, [rbp - 0x70]
call fcn.180020de0
nop
lea rcx, [rbp - 0x78]
call fcn.180020de0
nop
lea rcx, [rbp - 0x80]
call fcn.180020de0
nop
lea rcx, [rsp + 0x58]
call fcn.180020de0
nop
lea rcx, [rsp + 0x50]
call fcn.180020de0
nop
lea rcx, [rsp + 0x48]
call fcn.180020de0
nop
lea rcx, [rsp + 0x40]
call fcn.180020de0
nop
lea rcx, [rsp + 0x38]
call fcn.180020de0
nop
lea rcx, [rsp + 0x30]
call fcn.180020de0
nop
jmp 0x180005e4f
mov rcx, rdi
call fcn.180005860
test eax, eax
je 0x180005c72
lea rcx, [rbp - 0x70]
call fcn.180020de0
nop
lea rcx, [rbp - 0x78]
call fcn.180020de0
nop
lea rcx, [rbp - 0x80]
call fcn.180020de0
nop
lea rcx, [rsp + 0x58]
call fcn.180020de0
nop
lea rcx, [rsp + 0x50]
call fcn.180020de0
nop
lea rcx, [rsp + 0x48]
call fcn.180020de0
nop
lea rcx, [rsp + 0x40]
call fcn.180020de0
nop
lea rcx, [rsp + 0x38]
call fcn.180020de0
nop
lea rcx, [rsp + 0x30]
call fcn.180020de0
nop
jmp 0x180005e4f
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x180005ced
mov rax, qword [rcx]
call qword [rax]
mov ebx, eax
test eax, eax
jne 0x180005ced
lea rcx, [rbp - 0x70]
call fcn.180020de0
nop
lea rcx, [rbp - 0x78]
call fcn.180020de0
nop
lea rcx, [rbp - 0x80]
call fcn.180020de0
nop
lea rcx, [rsp + 0x58]
call fcn.180020de0
nop
lea rcx, [rsp + 0x50]
call fcn.180020de0
nop
lea rcx, [rsp + 0x48]
call fcn.180020de0
nop
lea rcx, [rsp + 0x40]
call fcn.180020de0
nop
lea rcx, [rsp + 0x38]
call fcn.180020de0
nop
lea rcx, [rsp + 0x30]
call fcn.180020de0
nop
mov eax, ebx
jmp 0x180005e52
cmp dword [rsp + 0x68], 2
jne 0x180005d88
mov word [rbp - 0x30], r12w
xor edx, edx
mov r8d, 0x7fe
lea rcx, [rbp - 0x2e]
call fcn.180031f40
lea rdx, [rbp - 0x30]
mov ecx, 0x3ff
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rdx, qword [rsp + 0x38]
lea rcx, [rbp - 0x60]
call fcn.180022a00
nop
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov rbx, rax
test rax, rax
je 0x180005d69
lea rdx, str.DllRegisterServer
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
test rax, rax
je 0x180005d5f
call rax
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
nop
lea rcx, [rbp - 0x60]
call fcn.180021f20
test rsi, rsi
je 0x180005d7d
mov dword [rsi], 1
lea rcx, [rbp - 0x30]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
nop
lea rcx, [rbp - 0x70]
call fcn.180020de0
nop
lea rcx, [rbp - 0x78]
call fcn.180020de0
nop
lea rcx, [rbp - 0x80]
call fcn.180020de0
nop
lea rcx, [rsp + 0x58]
call fcn.180020de0
nop
lea rcx, [rsp + 0x50]
call fcn.180020de0
nop
lea rcx, [rsp + 0x48]
call fcn.180020de0
nop
lea rcx, [rsp + 0x40]
call fcn.180020de0
nop
lea rcx, [rsp + 0x38]
call fcn.180020de0
nop
lea rcx, [rsp + 0x30]
call fcn.180020de0
nop
mov eax, 1
jmp 0x180005e52
lea rcx, [rbp - 0x70]
call fcn.180020de0
nop
lea rcx, [rbp - 0x78]
call fcn.180020de0
nop
lea rcx, [rbp - 0x80]
call fcn.180020de0
nop
lea rcx, [rsp + 0x58]
call fcn.180020de0
nop
lea rcx, [rsp + 0x50]
call fcn.180020de0
nop
lea rcx, [rsp + 0x48]
call fcn.180020de0
nop
lea rcx, [rsp + 0x40]
call fcn.180020de0
nop
lea rcx, [rsp + 0x38]
call fcn.180020de0
nop
lea rcx, [rsp + 0x30]
call fcn.180020de0
nop
mov eax, r12d
mov rcx, qword [rbp + 0x7d0]
xor rcx, rsp
call fcn.1800300f0
lea r11, [rsp + 0x8e0]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r12
pop rdi
pop rbp
ret