Function at 0x1800041f0
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 [0x180015008]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rbx, r8
mov rdi, rdx
mov edx, dword [rdx + 0x10]
test edx, edx
jne 0x180004239
xor r15d, r15d
xor eax, eax
jmp 0x180004290
mov rcx, qword [rdi + 8]
cmp edx, 4
jge 0x180004246
xor ecx, ecx
jmp 0x180004254
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 0x18000426a
xor eax, eax
jmp 0x180004290
mov rcx, qword [rdi + 8]
cmp edx, 4
jge 0x180004277
xor ecx, ecx
jmp 0x180004285
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 0x1800042dd
movsxd r14, eax
lea rcx, [r14 + rbp]
mov qword [rdi + 8], rcx
sub edx, eax
mov dword [rdi + 0x10], edx
test rbp, rbp
je 0x1800042dd
test eax, eax
je 0x1800042dd
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 0x1800042e7
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x38]
cmp qword [rbx], 0
jne 0x180004326
cmp dword [rbx + 0x14], 0
jne 0x180004326
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 0x180004349
mov rcx, qword [rbx + 8]
mov dword [rcx], eax
add qword [rbx + 8], 4
add dword [rbx + 0x10], 4
lea r12, [0x180012540]
mov qword [rsp + 0x30], r12
mov r8d, 2
lea rdx, [0x1800123b4]
mov rcx, rsi
call qword [sym.imp.msvcrt.dll_strncmp]
mov rbp, 0xffffffffffffffff
test eax, eax
jne 0x180004460
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 0x1800043a4
test rdi, rdi
je 0x1800043d6
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 0x1800043e0
mov rdi, qword [rsp + 0x30]
mov r15, qword [rsp + 0x30]
test rsi, rsi
je 0x18000440f
test r14, r14
je 0x18000440f
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 0x180004460
test rdi, rdi
je 0x180004460
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 0x180004460
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 0x180004460
mov edi, ebp
mov ecx, dword [rbx + 0x14]
mov edx, dword [rbx + 0x10]
mov eax, ecx
sub eax, edx
cmp rdi, rax
ja 0x18000449a
test ebp, ebp
je 0x18000449a
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 0x1800044b5
mov rcx, qword [rbx + 8]
movzx eax, byte [0x1800123b8]
mov byte [rcx], al
inc qword [rbx + 8]
inc dword [rbx + 0x10]
lea rax, [0x180012558]
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.1800052d0
nop
test eax, eax
je 0x180004504
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.1800049b0
mov ebx, 0x1f
jmp 0x180004509
mov ebx, 0x16
mov qword [rsp + 0x30], r12
test rsi, rsi
je 0x18000452e
test r14, r14
je 0x18000452e
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.18000f990
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