Function at 0x180357e30
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x178
mov rax, qword [0x18048aea8]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov r12, qword [rcx + 8]
mov rdi, rcx
mov r13d, dword [rcx + 0x34]
mov r11d, edx
sub r11d, r12d
mov qword [rsp + 0x48], rdx
mov eax, r11d
mov dword [rsp + 0xc], r11d
mov r15d, edx
mov qword [rsp + 0x58], r9
mov r9, qword [rcx + 0x70]
sub r15d, r12d
mov ebp, 1
mov qword [rsp + 0x50], r9
mov rbx, r8
mov dword [rsp + 8], r13d
mov r8, qword [rcx + 0x38]
mov r10, rdx
mov ecx, dword [rcx + 0x100]
mov edx, ebp
shl edx, cl
mov esi, 3
mov ecx, dword [rdi + 0x1c]
sub r11d, edx
sub eax, ecx
mov qword [rsp + 0x20], rbx
cmp eax, edx
mov qword [rsp + 0x30], r8
mov eax, dword [rdi + 0x10c]
cmovbe r11d, ecx
mov qword [rsp + 0x28], r12
cmp dword [rdi + 0x28], 0
mov dword [rsp + 4], r15d
cmovne r11d, ecx
mov dword [rsp + 0x14], 0x1f
mov ecx, 5
mov dword [rsp + 0x1c], r11d
cmp eax, ecx
cmovb ecx, eax
mov rax, qword [rdi + 0x60]
shl ebp, cl
xor r11d, r11d
lea ecx, [rsi + 0x35]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x18], ebp
cmp dword [rdi + 0x12c], r11d
jne 0x1803581f5
mov r14d, dword [rdi + 0x2c]
mov eax, r15d
mov rdx, qword [rsp + 0x28]
sub eax, r14d
mov r12, r9
mov r9d, dword [rsp + 8]
mov r13, r8
mov r8, rdx
movabs r15, 0xcf1bbcdcbf9b0000
cmp eax, 0x180
jbe 0x1803580e1
lea r8d, [r14 + 0x60]
mov qword [rsp + 0x40], rdx
cmp r14d, r8d
jae 0x180358022
mov r10, qword [rsp + 0x50]
lea r13, [rdx + 8]
mov rsi, qword [rsp + 0x30]
mov ebx, ecx
sub ebx, r9d
mov r12d, r14d
add r13, r14
mov ebp, r8d
nop dword [rax]
nop dword [rax + rax]
mov rdx, qword [r13]
mov ecx, ebx
imul rdx, r15
xor rdx, qword [rdi + 0x60]
shr rdx, cl
mov eax, edx
shr rax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r10 + rax*4]
prefetcht0 byte [r10 + rax*4 + 0x40]
prefetcht0 byte [rax + rsi]
mov rax, r12
lea r13, [r13 + 1]
and eax, 7
mov r9d, dword [rdi + rax*4 + 0x40]
mov r8d, r9d
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r11d
shr r8, 3
and r8d, 0x1fffffe0
movzx ecx, byte [r8 + rsi]
lea rdx, [r8 + rsi]
dec ecx
and ecx, 0x1f
cmove eax, dword [rsp + 0x14]
inc r12
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rdx + rcx], r9b
mov dword [r10 + rax*4], r14d
inc r14d
cmp r14d, ebp
jb 0x180357f80
mov rax, qword [rdi + 8]
mov esi, 3
mov r10, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x20]
mov ebp, dword [rsp + 0x18]
mov rdx, qword [rsp + 0x28]
lea ecx, [rsi + 0x35]
mov qword [rsp + 0x40], rax
mov r14d, dword [rsp + 4]
lea rax, [r10 + 1]
mov r8d, dword [rdi + 0x34]
add r14d, 0xffffffe0
mov r12, qword [rdi + 0x70]
mov r13, qword [rdi + 0x38]
mov dword [rsp], eax
sub dword [rsp], edx
lea r9, [r14 + rdx]
mov edx, dword [rsp]
sub edx, r14d
mov dword [rsp + 0x10], r8d
inc edx
mov r8d, r14d
cmp r9, rax
mov eax, 8
cmova edx, r11d
cmp edx, eax
cmova edx, eax
lea eax, [r14 + rdx]
cmp r14d, eax
jae 0x1803580d3
sub ecx, dword [rsp + 0x10]
mov ebx, edx
nop word [rax + rax]
mov rdx, qword [r9]
imul rdx, r15
xor rdx, qword [rdi + 0x60]
shr rdx, cl
mov eax, edx
shr rax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [r12 + rax*4 + 0x40]
prefetcht0 byte [rax + r13]
mov rax, r8
lea r9, [r9 + 1]
and eax, 7
inc r8
mov dword [rdi + rax*4 + 0x40], edx
sub rbx, 1
jne 0x180358080
mov r12, qword [rdi + 0x70]
mov r13, qword [rdi + 0x38]
mov r8, qword [rdi + 8]
mov rbx, qword [rsp + 0x20]
jmp 0x1803580d8
mov r8, qword [rsp + 0x40]
mov r9d, dword [rdi + 0x34]
mov ecx, reloc.WS2_32.dll_getservbyport
mov eax, dword [rsp + 4]
cmp r14d, eax
jae 0x180358195
mov ebp, ecx
mov ebx, r14d
sub ebp, r9d
lea rsi, [r14 + 8]
add rsi, r8
mov r10d, eax
mov rdx, qword [rsi]
mov ecx, ebp
imul rdx, r15
xor rdx, qword [rdi + 0x60]
shr rdx, cl
mov eax, edx
shr rax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r12 + rax*4]
prefetcht0 byte [r12 + rax*4 + 0x40]
prefetcht0 byte [rax + r13]
mov rax, rbx
lea rsi, [rsi + 1]
and eax, 7
mov r9d, dword [rdi + rax*4 + 0x40]
mov r8d, r9d
mov dword [rdi + rax*4 + 0x40], edx
mov eax, r11d
shr r8, 3
and r8d, 0x1fffffe0
movzx ecx, byte [r8 + r13]
lea rdx, [r8 + r13]
dec ecx
and ecx, 0x1f
cmove eax, dword [rsp + 0x14]
inc rbx
add ecx, eax
mov byte [rdx], cl
mov eax, ecx
add rax, r8
mov byte [rdx + rcx], r9b
mov dword [r12 + rax*4], r14d
inc r14d
cmp r14d, r10d
jb 0x180358100
mov r10, qword [rsp + 0x48]
mov esi, 3
mov rbx, qword [rsp + 0x20]
mov ebp, dword [rsp + 0x18]
mov eax, dword [rsp + 4]
mov r12, qword [rsp + 0x28]
mov ecx, reloc.WS2_32.dll_getservbyport
sub ecx, dword [rsp + 8]
mov r9, qword [rsp + 0x50]
mov dword [rdi + 0x2c], eax
mov eax, dword [rsp + 0xc]
mov r8d, eax
mov rdx, qword [rax + r12 + 8]
imul rdx, r15
xor rdx, qword [rsp + 0x38]
shr rdx, cl
mov eax, edx
shr rax, 3
and eax, 0x1fffffe0
prefetcht0 byte [r9 + rax*4]
prefetcht0 byte [r9 + rax*4 + 0x40]
mov rcx, qword [rsp + 0x30]
prefetcht0 byte [rax + rcx]
and r8d, 7
mov r14d, dword [rdi + r8*4 + 0x40]
mov dword [rdi + r8*4 + 0x40], edx
mov r8, rcx
jmp 0x180358216
mov r14, qword [r10]
movabs r15, 0xcf1bbcdcbf9b0000
imul r14, r15
sub ecx, r13d
xor r14, rax
mov eax, dword [rsp + 0xc]
shr r14, cl
mov dword [rdi + 0x2c], eax
add dword [rdi + 0x68], r14d
mov eax, r14d
shr rax, 3
and eax, 0x1fffffe0
movdqu xmm0, xmmword [rax + r8]
lea rcx, [rax + r8]
mov qword [rsp + 0x38], rcx
lea r13, [r9 + rax*4]
movzx eax, byte [rcx]
mov r15d, eax
mov dword [rsp + 0x10], eax
movsx eax, r14b
and r15d, 0x1f
mov r9, r11
movd xmm2, eax
punpcklbw xmm2, xmm2
punpcklwd xmm2, xmm2
pshufd xmm2, xmm2, 0
movdqa xmm1, xmm2
pcmpeqb xmm1, xmm0
movdqu xmm0, xmmword [rcx + 0x10]
mov ecx, r15d
neg ecx
pmovmskb eax, xmm1
and ecx, 0x1f
pcmpeqb xmm0, xmm2
pmovmskb edx, xmm0
shl edx, 0x10
or edx, eax
mov r8d, edx
mov eax, edx
shl r8d, cl
mov ecx, r15d
shr rax, cl
or r8, rax
jbe 0x1803582d1
mov edx, dword [rsp + 0x1c]
nop dword [rax]
test ebp, ebp
je 0x1803582d1
bsf rcx, r8
add ecx, r15d
and ecx, 0x1f
je 0x1803582c8
mov ecx, dword [r13 + rcx*4]
cmp ecx, edx
jb 0x1803582d1
prefetcht0 byte [rcx + r12]
mov dword [rsp + r9*4 + 0x60], ecx
inc r9
dec ebp
lea rax, [r8 - 1]
and r8, rax
ja 0x1803582a0
mov ecx, dword [rsp + 0x10]
mov eax, r11d
dec ecx
mov edx, 0x1f
and ecx, 0x1f
cmove eax, edx
add ecx, eax
mov rax, qword [rsp + 0x38]
mov byte [rax], cl
mov byte [rcx + rax], r14b
mov eax, dword [rdi + 0x2c]
mov dword [r13 + rcx*4], eax
inc dword [rdi + 0x2c]
test r9, r9
je 0x1803583da
mov r14, qword [rsp + 0x58]
nop dword [rax + rax]
mov edi, dword [rsp + r11*4 + 0x60]
mov eax, dword [rsi + r10 - 3]
lea rdx, [r12 + rdi]
cmp dword [rdx + rsi - 3], eax
jne 0x1803583ce
lea r8, [rbx - 7]
mov rax, r10
cmp r10, r8
jae 0x18035836c
mov rcx, qword [rdx]
xor rcx, qword [r10]
je 0x180358346
bsf rcx, rcx
shr rcx, 3
jmp 0x1803583b1
add rax, 8
add rdx, 8
cmp rax, r8
jae 0x18035836c
mov rcx, qword [rax]
xor rcx, qword [rdx]
jne 0x180358401
add rax, 8
add rdx, 8
cmp rax, r8
jb 0x180358353
lea rcx, [rbx - 3]
cmp rax, rcx
jae 0x180358383
mov ecx, dword [rax]
cmp dword [rdx], ecx
jne 0x180358383
add rax, 4
add rdx, 4
lea rcx, [rbx - 1]
cmp rax, rcx
jae 0x18035839c
movzx ecx, word [rax]
cmp word [rdx], cx
jne 0x18035839c
add rax, 2
add rdx, 2
cmp rax, rbx
jae 0x1803583ab
movzx ecx, byte [rax]
cmp byte [rdx], cl
jne 0x1803583ab
inc rax
mov rcx, rax
sub rcx, r10
cmp rcx, rsi
jbe 0x1803583ce
mov eax, dword [rsp + 0xc]
mov rsi, rcx
sub eax, edi
add eax, 3
mov qword [r14], rax
lea rax, [rcx + r10]
cmp rax, rbx
je 0x1803583da
inc r11
cmp r11, r9
jb 0x180358310
mov rax, rsi
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.180394080
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
bsf rcx, rcx
shr rcx, 3
sub rcx, r10
add rcx, rax
jmp 0x1803583b1