Function at 0x14003f940
Capabilities:
Get common file path

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x848
mov rax, qword [0x1400a2078]
xor rax, rsp
mov qword [rsp + 0x830], rax
mov r14, rcx
movsxd rsi, r8d
movsx ecx, byte [rdx]
lea rdi, [rsp + 0x30]
xor ebx, ebx
mov dword [rsp + 0x2c], esi
mov ebp, r9d
mov r12, rdx
lea eax, [rcx - 0x61]
cmp eax, 0x19
jbe 0x14003f98c
lea eax, [rcx - 0x41]
cmp eax, 0x19
ja 0x14003f99b
cmp byte [rdx + 1], 0x3a
jne 0x14003f99b
movsx ecx, byte [rdx + 2]
cmp ecx, 0x5c
je 0x14003f9d9
cmp ecx, 0x2f
je 0x14003f9d9
lea rdx, [rsp + 0x30]
mov ecx, 0x800
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x14003f9be
mov eax, 2
jmp 0x14003fd21
lea rax, [rsp + 0x30]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [rax + rbx], 0
jne 0x14003f9d0
mov qword [rsp + 0x840], r15
mov r15, rsi
add rsi, 0x11
add rsi, rbx
cmp rsi, 0x800
jbe 0x14003fa1d
mov rcx, rsi
call fcn.14005608c
mov rdi, rax
test rax, rax
je 0x14003fd41
test rbx, rbx
je 0x14003fa29
mov r8, rbx
lea rdx, [rsp + 0x30]
mov rcx, rax
call fcn.140044760
test rbx, rbx
je 0x14003fa29
mov byte [rdi + rbx], 0x5c
inc rbx
lea rcx, [rdi + rbx]
mov qword [rsp + 0x898], r13
mov r8, r15
mov rdx, r12
call fcn.1400579c0
mov esi, ebp
mov dword [rsp + 0x20], 0
and ebp, 1
sar esi, 1
lea r13, [r15 + rdi]
mov dword [rsp + 0x24], ebp
lea r9, [rsp + 0x28]
mov byte [r13 + rbx], 0
lea r8, [rsp + 0x20]
mov rdx, rdi
mov rcx, r14
call fcn.14003f660
mov rbp, rax
test rax, rax
jne 0x14003fb32
mov eax, dword [rsp + 0x24]
test eax, eax
je 0x14003fcfd
cmp dword [rsp + 0x20], ebp
jne 0x14003fad2
lea rcx, str._amplfunc.dll
sub r15, rcx
lea rdx, [rdi + r15]
add rdx, rbx
movzx eax, byte [rcx]
mov byte [rdx + rcx], al
lea rcx, [rcx + 1]
test al, al
jne 0x14003faa1
lea r9, [rsp + 0x28]
mov rdx, rdi
lea r8, [rsp + 0x20]
mov rcx, r14
call fcn.14003f660
mov rbp, rax
test rax, rax
jne 0x14003fb32
cmp dword [rsp + 0x20], eax
je 0x14003fadc
mov esi, 2
jmp 0x14003fcfd
mov eax, dword [rsp + 0x24]
test eax, eax
je 0x14003fcfd
mov rcx, rdi
mov byte [r13 + rbx], 0
call fcn.14003f5f0
cmp eax, 2
jne 0x14003fb17
mov byte [r13 + rbx], 0x5c
lea rdx, str.Cannot_find_library___s_._n
mov rcx, qword [r14]
mov r8, rdi
call qword [r14 + 0x18]
jmp 0x14003fcfd
mov r8d, dword [rsp + 0x2c]
lea rdx, str.Cannot_find_library___.s_._n
mov rcx, qword [r14]
mov r9, r12
call qword [r14 + 0x18]
jmp 0x14003fcfd
lea rdx, [0x140094fe8]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
test rax, rax
jne 0x14003fb8b
lea rdx, str.funcadd
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetProcAddress]
mov r15, rax
test rax, rax
jne 0x14003fb8b
mov rcx, qword [r14]
lea rdx, str.Could_not_find_funcadd_in__s_n
mov r8, rdi
call qword [r14 + 0x18]
test rbp, rbp
je 0x14003fb81
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, 3
jmp 0x14003fcfd
mov rax, qword [0x1400aac58]
mov dword [0x1400aac50], 0
test rax, rax
jne 0x14003fbb4
lea rcx, [fcn.140031310]
call fcn.1400429a8
mov rax, qword [0x1400aac58]
mov r12, qword [0x1400a4e30]
mov rsi, rax
mov rcx, qword [0x1400a4e38]
cmp rcx, r12
jb 0x14003fbf2
mov ecx, 0x78
call fcn.14005608c
mov rcx, rax
test rax, rax
je 0x14003fd51
add rax, 0x78
mov qword [0x1400a4e30], rax
mov rax, qword [0x1400aac58]
mov qword [rcx], rax
lea rax, [rcx + 0x18]
mov qword [0x1400aac58], rcx
mov qword [0x1400a4e38], rax
lea rax, [0x14003f930]
mov qword [rcx + 8], rax
mov qword [rcx + 0x10], rbp
mov rcx, r14
call r15
cmp dword [0x1400aac50], 0
jne 0x14003fc53
mov rbx, qword [0x1400aac58]
cmp rbx, rsi
je 0x14003fc40
mov rcx, qword [rbx + 0x10]
call qword [rbx + htons]
mov rbx, qword [rbx]
cmp rbx, rsi
jne 0x14003fc31
mov qword [0x1400aac58], rbx
mov qword [0x1400a4e30], r12
jmp 0x14003fcfb
mov ebx, dword [0x1400aac54]
mov eax, dword [reloc.WS2_32.dll_connect]
inc ebx
mov dword [0x1400aac54], ebx
cmp ebx, eax
jl 0x14003fcea
add eax, eax
movsxd rbx, eax
shl rbx, 3
mov rcx, rbx
mov dword [reloc.WS2_32.dll_connect], eax
call fcn.14005608c
mov rsi, rax
test rax, rax
jne 0x14003fca7
test rbx, rbx
jne 0x14003fd64
lea ecx, [rax + 8]
call fcn.14005608c
mov rsi, rax
test rax, rax
je 0x14003fd64
movsxd rbx, dword [0x1400aac54]
mov rcx, rsi
mov rbp, qword [0x1400a4e40]
mov r8, rbx
shl r8, 3
mov rdx, rbp
call fcn.140044760
lea rax, [0x1400a9908]
cmp rbp, rax
je 0x14003fce1
mov rcx, rbp
call fcn.1400543f0
mov ebx, dword [0x1400aac54]
mov qword [0x1400a4e40], rsi
jmp 0x14003fcf1
mov rsi, qword [0x1400a4e40]
lea eax, [rbx - 1]
movsxd rdx, eax
mov qword [rsi + rdx*8], r15
xor esi, esi
lea rax, [rsp + 0x30]
cmp rdi, rax
je 0x14003fd0f
mov rcx, rdi
call fcn.1400543f0
mov r13, qword [rsp + 0x898]
mov eax, esi
mov r15, qword [rsp + 0x840]
mov rcx, qword [rsp + 0x830]
xor rcx, rsp
call fcn.140042470
add rsp, 0x848
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov r8, rsi
lea rcx, str.malloc
call fcn.140022f20
int3
mov r8d, 0x78
lea rcx, str.malloc
call fcn.140022f20
int3
mov r8, rbx
lea rcx, str.malloc
call fcn.140022f20
int3