Function at 0x180004910
Capabilities:
Get common file path

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x180
mov qword [rsp + 0x58], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x20], rbp
mov rax, qword [0x180017008]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbx, r8
mov rdi, rdx
mov edx, dword [rdx + 0x10]
test edx, edx
jne 0x180004959
xor r15d, r15d
xor eax, eax
jmp 0x1800049b0
mov rcx, qword [rdi + 8]
cmp edx, 4
jge 0x180004966
xor ecx, ecx
jmp 0x180004974
lea rax, [rcx + 4]
mov qword [rdi + 8], rax
lea eax, [rdx - 4]
mov dword [rdi + 0x10], eax
mov ecx, dword [rcx]
call qword [sym.imp.WS2_32.dll_ntohl]
mov r15d, eax
mov edx, dword [rdi + 0x10]
test edx, edx
jne 0x18000498a
xor eax, eax
jmp 0x1800049b0
mov rcx, qword [rdi + 8]
cmp edx, 4
jge 0x180004997
xor ecx, ecx
jmp 0x1800049a5
lea rax, [rcx + 4]
mov qword [rdi + 8], rax
lea eax, [rdx - 4]
mov dword [rdi + 0x10], eax
mov ecx, dword [rcx]
call qword [sym.imp.WS2_32.dll_ntohl]
mov edx, dword [rdi + 0x10]
mov rbp, qword [rdi + 8]
cmp edx, eax
jl 0x1800049fd
movsxd r14, eax
lea rcx, [r14 + rbp]
mov qword [rdi + 8], rcx
sub edx, eax
mov dword [rdi + 0x10], edx
test rbp, rbp
je 0x1800049fd
test eax, eax
je 0x1800049fd
mov qword [rsp + 0x40], r14
lea rcx, [r14 + 1]
call qword [sym.imp.msvcrt.dll_malloc]
mov rsi, rax
mov qword [rsp + 0x38], rax
mov r8, r14
mov rdx, rbp
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov byte [rsi + r14], 0
jmp 0x180004a07
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
cmp qword [rbx], 0
jne 0x180004a46
cmp dword [rbx + 0x14], 0
jne 0x180004a46
mov ecx, 0x200000
call qword [sym.imp.msvcrt.dll_malloc]
mov qword [rbx], rax
mov dword [rbx + 0x14], 0x200000
xor edx, edx
mov r8d, 0x200000
mov rcx, rax
call sub.msvcrt.dll_memset
mov rax, qword [rbx]
mov qword [rbx + 8], rax
mov dword [rbx + 0x10], 0
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_htonl]
mov ecx, dword [rbx + 0x14]
sub ecx, dword [rbx + 0x10]
cmp ecx, 4
jb 0x180004a69
mov rcx, qword [rbx + 8]
mov dword [rcx], eax
add qword [rbx + 8], 4
add dword [rbx + 0x10], 4
lea r12, [0x180013628]
mov qword [rsp + 0x30], r12
mov r8d, 2
lea rdx, [0x1800134cc]
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_strncmp]
mov rbp, 0xffffffffffffffff
test eax, eax
jne 0x180004b80
xor edx, edx
mov r8d, 0x104
lea rcx, [rsp + 0x60]
call sub.msvcrt.dll_memset
lea rdx, [rsp + 0x60]
mov ecx, 0x104
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea rax, [rsp + 0x60]
mov rdi, rbp
inc rdi
cmp byte [rax + rdi], 0
jne 0x180004ac4
test rdi, rdi
je 0x180004af6
lea rcx, [rdi + 1]
call qword [sym.imp.msvcrt.dll_malloc]
mov r15, rax
mov r8, rdi
lea rdx, [rsp + 0x60]
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov byte [r15 + rdi], 0
jmp 0x180004b00
mov rdi, qword [rsp + 0x30]
mov r15, qword [rsp + 0x30]
test rsi, rsi
je 0x180004b2f
test r14, r14
je 0x180004b2f
mov r8, r14
xor edx, edx
mov rcx, rsi
call sub.msvcrt.dll_memset
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
xor esi, esi
mov qword [rsp + 0x38], rsi
xor r14d, r14d
mov qword [rsp + 0x40], r14
test r15, r15
je 0x180004b80
test rdi, rdi
je 0x180004b80
mov r14, rdi
mov qword [rsp + 0x40], rdi
lea rcx, [rdi + 1]
call qword [sym.imp.msvcrt.dll_malloc]
mov rsi, rax
mov qword [rsp + 0x38], rax
mov r8, rdi
mov rdx, r15
mov rcx, rax
call sub.msvcrt.dll_memcpy
mov byte [rdi + rsi], 0
test rdi, rdi
je 0x180004b80
mov r8, rdi
xor edx, edx
mov rcx, r15
call sub.msvcrt.dll_memset
mov rcx, r15
call qword [sym.imp.msvcrt.dll_free]
inc rbp
cmp byte [rsi + rbp], 0
jne 0x180004b80
mov edi, ebp
mov ecx, dword [rbx + 0x14]
mov edx, dword [rbx + 0x10]
mov eax, ecx
sub eax, edx
cmp rdi, rax
ja 0x180004bba
test ebp, ebp
je 0x180004bba
mov r8d, edi
mov rdx, rsi
mov rcx, qword [rbx + 8]
call sub.msvcrt.dll_memcpy
add qword [rbx + 8], rdi
add dword [rbx + 0x10], ebp
mov edx, dword [rbx + 0x10]
mov ecx, dword [rbx + 0x14]
sub ecx, edx
cmp ecx, 1
jb 0x180004bd5
mov rcx, qword [rbx + 8]
movzx eax, byte [0x1800134d0]
mov byte [rcx], al
inc qword [rbx + 8]
inc dword [rbx + 0x10]
lea rax, [0x1800134f0]
mov qword [rsp + 0x48], rax
mov qword [rsp + 0x50], rbx
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.180005a90
nop
test eax, eax
je 0x180004c24
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov qword [rsp + 0x20], rsi
xor r9d, r9d
mov r8d, eax
lea edx, [r9 + 0x34]
mov rcx, rbx
call fcn.180005170
mov ebx, 0x1f
jmp 0x180004c29
mov ebx, 0x16
mov qword [rsp + 0x30], r12
test rsi, rsi
je 0x180004c4e
test r14, r14
je 0x180004c4e
mov r8, r14
xor edx, edx
mov rcx, rsi
call sub.msvcrt.dll_memset
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_free]
mov eax, ebx
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.180010850
lea r11, [rsp + 0x180]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret