Function at 0x515a60
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x118
call fcn.0055e9c0
sub rsp, rax
mov rax, qword [0x005ca070]
mov qword [rsp + 0xc0], rax
mov qword [rsp + 0x110], rbx
mov qword [rsp + 0x100], rsi
mov rsi, rcx
mov qword [rsp + 0xf8], rdi
mov rcx, r8
mov rbx, r9
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], rdx
mov qword [rsp + 0xf0], r12
xor edi, edi
call fcn.00481aa0
test eax, eax
mov r12d, eax
mov dword [rsp + 0x30], eax
js 0x515e57
mov qword [rsp + 0x108], rbp
mov ebp, dword [rsp + 0x140]
cmp ebp, 0xffffffff
jne 0x515ba0
mov ebp, eax
mov rcx, qword [rsi + 0x18]
mov qword [rsp + 0xe8], r13
mov qword [rsp + 0xe0], r14
mov qword [rsp + 0xd8], r15
call fcn.004882a0
mov rcx, rsi
lea r14d, [rax - 1]
and r14d, 7
call fcn.00479ee0
mov r15d, 0xff
mov edx, r15d
mov ecx, r14d
mov r13d, eax
shl edx, cl
test byte [rbx], dl
je 0x515bd7
mov edx, 0x7e
lea r9, [0x005e6578]
lea r8d, [r15 - 0x7a]
lea ecx, [rdx - 0x7a]
mov dword [rsp + 0x20], WSASetLastError
call fcn.0047c130
mov eax, edi
mov r14, qword [rsp + 0xe0]
mov r13, qword [rsp + 0xe8]
mov r15, qword [rsp + 0xd8]
mov rbp, qword [rsp + 0x108]
mov r12, qword [rsp + 0xf0]
mov rdi, qword [rsp + 0xf8]
mov rsi, qword [rsp + 0x100]
mov rbx, qword [rsp + 0x110]
mov rcx, qword [rsp + 0xc0]
call fcn.0055e990
add rsp, 0x118
ret
cmp ebp, 0xfffffffe
jne 0x515baa
jmp 0x515adf
cmp ebp, 0xfffffffe
jge 0x515adf
mov edx, 0x7e
lea r9, [0x005e6560]
mov dword [rsp + 0x20], 0x61
lea ecx, [rdx - 0x7a]
lea r8d, [rdx + 0xa]
call fcn.0047c130
mov eax, edi
jmp 0x515b63
test r14d, r14d
jne 0x515be2
inc rbx
dec r13d
lea eax, [r12 + rbp + 2]
cmp r13d, eax
jge 0x515c13
mov edx, 0x7e
lea r9, [0x005e6590]
mov dword [rsp + 0x20], reloc.WS2_32.dll_WSAStartup
lea ecx, [rdx - 0x7a]
lea r8d, [rdx - 0x11]
call fcn.0047c130
mov eax, edi
jmp 0x515b4b
movsxd rax, r13d
cmp byte [rax + rbx - 1], 0xbc
je 0x515c44
mov edx, 0x7e
lea r9, [0x005e65a8]
mov dword [rsp + 0x20], 0x78
lea ecx, [rdx - 0x7a]
lea r8d, [rdx + 8]
call fcn.0047c130
mov eax, edi
jmp 0x515b4b
sub r13d, r12d
lea rdx, [0x005e65c0]
mov r8d, 0x7d
dec r13d
movsxd r12, r13d
mov ecx, r13d
lea rax, [r12 + rbx]
mov qword [rsp + 0x38], rax
call fcn.004844e0
test rax, rax
mov rsi, rax
jne 0x515c96
lea r9, [0x005e65d8]
lea edx, [rax + 0x7e]
lea ecx, [rax + 4]
lea r8d, [rax + 0x41]
mov dword [rsp + 0x20], 0x80
call fcn.0047c130
jmp 0x515e3f
mov rax, qword [rsp + 0x40]
mov r9d, dword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
mov edx, r13d
mov rcx, rsi
mov qword [rsp + 0x20], rax
call fcn.004ac9d0
test eax, eax
js 0x515e3f
test r13d, r13d
jle 0x515cdf
mov rcx, rsi
sub rbx, rsi
nop
nop
movzx eax, byte [rbx + rcx]
inc rcx
xor byte [rcx - 1], al
dec r12
jne 0x515cd0
test r14d, r14d
je 0x515cf2
mov ecx, 8
sub ecx, r14d
sar r15d, cl
and byte [rsi], r15b
mov ebx, edi
cmp byte [rsi], bl
jne 0x515d0e
lea ecx, [r13 - 1]
mov rax, rsi
nop
cmp ebx, ecx
jge 0x515d0e
inc rax
inc ebx
cmp byte [rax], dil
je 0x515d00
movsxd rax, ebx
inc ebx
cmp byte [rax + rsi], 1
je 0x515d3e
mov edx, 0x7e
lea r9, [0x005e65f0]
mov dword [rsp + 0x20], 0x8c
lea ecx, [rdx - 0x7a]
lea r8d, [rdx + 9]
call fcn.0047c130
jmp 0x515e3f
test ebp, ebp
js 0x515d70
mov eax, r13d
sub eax, ebx
cmp eax, ebp
je 0x515d70
mov edx, 0x7e
lea r9, [0x005e6608]
mov dword [rsp + 0x20], DllRegisterServer
lea ecx, [rdx - 0x7a]
lea r8d, [rdx + 0xa]
call fcn.0047c130
jmp 0x515e3f
lea rcx, [rsp + 0x50]
call fcn.0049d430
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x50]
xor r8d, r8d
call fcn.0049d4a0
lea rdx, [0x005886a8]
lea rcx, [rsp + 0x50]
mov r8d, 8
call fcn.0049d710
movsxd rbp, dword [rsp + 0x30]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x50]
mov r8, rbp
call fcn.0049d710
sub r13d, ebx
je 0x515dd2
movsxd rdx, ebx
lea rcx, [rsp + 0x50]
movsxd r8, r13d
add rdx, rsi
call fcn.0049d710
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x50]
xor r8d, r8d
call fcn.0049d8e0
lea rcx, [rsp + 0x50]
call fcn.0049d7e0
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x80]
mov r9d, 1
mov r8, rbp
mov dword [rsp + 0x20], 1
call sub.msvcrt.dll_memcmp
test eax, eax
je 0x515e3a
mov edx, 0x7e
lea r9, [0x005e6620]
mov dword [rsp + 0x20], 0x9e
lea ecx, [rdx - 0x7a]
lea r8d, [rdx - 0x16]
call fcn.0047c130
jmp 0x515e3f
mov edi, 1
test rsi, rsi
je 0x515b49
mov rcx, rsi
call fcn.004849b0
mov eax, edi
jmp 0x515b4b
mov eax, edi
jmp 0x515b6b