Function at 0x180076d88
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x1801754c0]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov rax, qword [rcx]
xor edi, edi
mov r14d, dword [rbp + 0xe0]
mov rbx, rcx
mov qword [rbp - 0x68], r9
mov qword [rbp - 0x70], r8
mov dword [rax + 8], edi
mov qword [rbp - 0x78], rdx
cmp r14d, 4
ja 0x18007750c
call fcn.18007abf0
test eax, eax
jne 0x180076df6
mov rdx, qword [rbx]
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18007af7c
jmp 0x18007752f
mov esi, 1
lea edx, [rsi + 2]
test r14d, r14d
jne 0x180076e17
mov rax, qword [rbx]
mov r14d, esi
cmp dword [rax + 8], edx
cmovge r14d, edx
mov dword [rbp + 0xe0], r14d
mov rax, qword [rbx]
mov ecx, dword [rax + 8]
cmp ecx, edx
jne 0x180076e42
cmp dword [rbx + 0x4850], edx
je 0x180076e39
cmp dword [rbx + 0x484c], edi
jne 0x180076e42
cmp dword [rbx + 0x4848], edi
jne 0x180076e42
mov eax, esi
mov qword [rsp + 0x58], rsi
jmp 0x180076e51
mov qword [rsp + 0x58], rdi
mov eax, edi
cmp ecx, edx
jne 0x180076f0a
cmp r14d, edx
jge 0x180076f0a
test eax, eax
jne 0x180076f0a
mov ecx, esi
mov r13d, ecx
xorps xmm0, xmm0
mov qword [rsp + 0x60], r13
xorps xmm1, xmm1
movdqu xmmword [rsp + 0x38], xmm0
movdqu xmmword [rsp + 0x48], xmm1
test ecx, ecx
je 0x180076f6f
mov r12, rdi
lea r15, [rbx + 0x46a4]
lea rdi, [rbp - 0x44]
mov rax, qword [rbx]
mov ecx, dword [rax]
add ecx, edx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov qword [r15 + 0x44], rax
test rax, rax
je 0x180077000
mov eax, dword [rbx + 0x4688]
and dword [rdi + 0xc], 0
cdq
idiv dword [r15]
mov r9d, eax
mov dword [rdi - 4], eax
mov eax, dword [rbx + 0x468c]
cdq
idiv dword [r15 + 4]
xor edx, edx
mov ecx, eax
mov dword [rdi], eax
sar ecx, 1
mov r8d, eax
mov dword [rdi + 8], ecx
mov rcx, qword [rbx]
mov eax, dword [rcx]
mov rcx, qword [r15 + 0x2c]
dec eax
add eax, r9d
mov qword [rdi - 0xc], rcx
div r9d
mov qword [rdi - 0x14], rcx
mov dword [rdi + 4], eax
cmp r9d, esi
jne 0x180076f28
cmp r8d, esi
jne 0x180076f19
lea rax, [0x180077554]
jmp 0x180076f52
test ecx, ecx
jg 0x180076e64
mov edx, ecx
jmp 0x180076de6
cmp r8d, 2
jne 0x180076f28
lea rax, [0x180083c60]
jmp 0x180076f52
cmp r9d, 2
jne 0x180076f4b
cmp r8d, esi
jne 0x180076f3c
lea rax, [0x18008390c]
jmp 0x180076f52
cmp r8d, 2
jne 0x180076f4b
mov rax, qword [rbx + 0x4880]
jmp 0x180076f52
lea rax, [0x1800838d4]
mov qword [rdi - 0x1c], rax
add r12, rsi
add rdi, 0x30
add r15, 0x60
mov edx, 3
cmp r12, r13
jl 0x180076e94
mov rdx, qword [rbx]
mov r9d, esi
mov ecx, r14d
mov r8d, dword [rdx + 4]
mov edx, dword [rdx]
call fcn.18007f09c
mov rdx, qword [rbx]
mov r12, rax
mov qword [rbp - 0x80], rax
test rax, rax
je 0x180077003
xor eax, eax
mov dword [rsp + 0x30], eax
cmp dword [rdx + 4], eax
jbe 0x1800774c9
mov r13, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
imul eax, dword [rdx]
imul eax, r14d
mov edi, eax
add rdi, r12
xor r12d, r12d
cmp qword [rsp + 0x60], r12
jbe 0x1800770c5
mov r14, qword [rsp + 0x60]
lea r13, [rbx + 0x46c0]
lea r15, [rbp - 0x3c]
mov eax, dword [r15 - 8]
lea rcx, [r15 - 0x14]
mov r9d, dword [r15 - 0xc]
lea rdx, [r15 - 0x1c]
sar eax, 1
mov qword [rsp + 0x78], rcx
mov qword [rsp + 0x70], rdx
cmp dword [r15], eax
jl 0x180077030
mov r8, qword [rdx]
mov qword [rsp + 0x68], rcx
jmp 0x180077048
mov rdx, qword [rbx]
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18007af7c
mov edx, dword [0x1801b13a0]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.outofmem
jmp 0x180077526
mov r8, qword [rcx]
mov rax, rcx
mov qword [rsp + 0x68], rcx
mov rcx, rdx
mov qword [rsp + 0x78], rax
mov qword [rsp + 0x70], rdx
mov rdx, qword [rcx]
mov rcx, qword [r13 + 0x28]
mov dword [rsp + 0x20], r9d
mov r9d, dword [r15 - 4]
call qword [r15 - 0x24]
mov qword [rsp + r12*8 + 0x38], rax
mov eax, dword [r15]
inc eax
mov dword [r15], eax
cmp eax, dword [r15 - 8]
jl 0x1800770a0
mov rax, qword [rsp + 0x70]
add dword [r15 + 4], esi
mov rcx, qword [rsp + 0x68]
and dword [r15], 0
mov rcx, qword [rcx]
mov qword [rax], rcx
mov eax, dword [r15 + 4]
cmp eax, dword [r13]
jge 0x1800770a0
movsxd rax, dword [r13 + 4]
add rax, rcx
mov rcx, qword [rsp + 0x78]
mov qword [rcx], rax
add r12, rsi
add r15, 0x30
add r13, 0x60
cmp r12, r14
jl 0x180076fd5
mov r13, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
mov r14d, dword [rbp + 0xe0]
mov rax, qword [rbx]
mov ecx, 3
cmp r14d, ecx
jl 0x1800772bc
cmp dword [rax + 8], ecx
jne 0x18007714b
cmp qword [rsp + 0x58], 0
je 0x180077127
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1800774af
movsxd r10, r14d
mov al, byte [r8 + r15]
xor edx, edx
mov byte [rdi], al
mov rax, qword [rsp + rdx*8 + 0x40]
mov cl, byte [r8 + rax]
mov byte [rdx + rdi + 1], cl
add rdx, rsi
cmp rdx, 2
jl 0x1800770fa
mov byte [rdi + 3], 0xff
add r8d, esi
mov rax, qword [rbx]
add rdi, r10
cmp r8d, dword [rax]
jb 0x1800770f2
jmp 0x1800774af
mov eax, dword [rax]
mov r9, r13
mov r8, qword [rsp + 0x40]
mov rdx, r15
mov dword [rsp + 0x28], r14d
mov rcx, rdi
mov dword [rsp + 0x20], eax
call qword [rbx + 0x4878]
jmp 0x1800774af
cmp dword [rax + 8], 4
jne 0x18007728e
mov ecx, dword [rbx + 0x484c]
test ecx, ecx
jne 0x1800771de
xor r9d, r9d
cmp dword [rax], r9d
jbe 0x1800774af
movsxd r10, r14d
mov r14, qword [rsp + 0x40]
movzx ecx, byte [r9 + r15]
mov rax, qword [rsp + 0x50]
movzx r8d, byte [r9 + rax]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi], al
movzx ecx, byte [r9 + r14]
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi + 1], al
movzx ecx, byte [r9 + r13]
add r9d, esi
mov byte [rdi + 3], 0xff
imul ecx, r8d
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi + 2], al
add rdi, r10
mov rax, qword [rbx]
cmp r9d, dword [rax]
jb 0x180077173
jmp 0x18007741a
mov edx, dword [rax]
cmp ecx, 2
mov rax, qword [rbx + 0x4878]
mov r9, r13
mov r8, qword [rsp + 0x40]
mov rcx, rdi
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], edx
mov rdx, r15
jne 0x180077287
call rax
mov rax, qword [rbx]
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1800774af
mov r13, qword [rsp + 0x50]
movsxd r9, r14d
movzx edx, byte [r8 + r13]
add r8d, esi
mov al, byte [rdi]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi], al
mov al, byte [rdi + 1]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi + 1], al
mov al, byte [rdi + 2]
not al
movzx ecx, al
imul ecx, edx
sub ecx, 0xffffff80
mov eax, ecx
shr eax, 8
add eax, ecx
shr eax, 8
mov byte [rdi + 2], al
add rdi, r9
mov rax, qword [rbx]
cmp r8d, dword [rax]
jb 0x180077220
jmp 0x18007746d
call rax
jmp 0x1800774af
xor edx, edx
cmp dword [rax], edx
jbe 0x1800774af
movsxd r8, r14d
mov cl, byte [rdx + r15]
add edx, esi
mov byte [rdi + 2], cl
mov byte [rdi + 1], cl
mov byte [rdi], cl
mov byte [rdi + 3], 0xff
add rdi, r8
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x18007729b
jmp 0x1800774af
cmp qword [rsp + 0x58], 0
je 0x180077369
mov ecx, dword [rax]
xor r9d, r9d
cmp r14d, esi
jne 0x18007731b
test ecx, ecx
je 0x1800774af
mov r14, qword [rsp + 0x40]
movzx eax, byte [r9 + r14]
imul r8d, eax, 0x96
movzx eax, byte [r9 + r13]
imul ecx, eax, 0x1d
movzx eax, byte [r9 + r15]
add r9d, esi
add r8d, ecx
imul ecx, eax, 0x4d
add r8d, ecx
shr r8d, 8
mov byte [rdi], r8b
add rdi, rsi
mov rax, qword [rbx]
cmp r9d, dword [rax]
jb 0x1800772df
jmp 0x18007741a
test ecx, ecx
je 0x1800774af
mov r14, qword [rsp + 0x40]
movzx eax, byte [r9 + r14]
imul r8d, eax, 0x96
movzx eax, byte [r9 + r13]
imul ecx, eax, 0x1d
movzx eax, byte [r9 + r15]
add r9d, esi
mov byte [rdi + 1], 0xff
add r8d, ecx
imul ecx, eax, 0x4d
add r8d, ecx
shr r8d, 8
mov byte [rdi], r8b
lea rdi, [rdi + 2]
mov rax, qword [rbx]
cmp r9d, dword [rax]
jb 0x180077328
jmp 0x18007741a
cmp dword [rax + 8], 4
jne 0x180077474
mov ecx, dword [rbx + 0x484c]
test ecx, ecx
jne 0x180077426
xor r10d, r10d
cmp dword [rax], r10d
jbe 0x1800774af
movsxd r11, r14d
mov r12d, 0x80
mov r14, qword [rsp + 0x40]
movzx edx, byte [r10 + r14]
movzx r8d, byte [r10 + r13]
movzx r9d, byte [r10 + r15]
mov rcx, qword [rsp + 0x50]
movzx ecx, byte [r10 + rcx]
add r10d, esi
imul edx, ecx
imul r8d, ecx
imul r9d, ecx
mov byte [rdi + 1], 0xff
add edx, r12d
mov eax, edx
add r8d, r12d
shr eax, 8
add r9d, r12d
add eax, edx
shr eax, 8
movzx eax, al
imul edx, eax, 0x96
mov eax, r8d
shr eax, 8
add eax, r8d
shr eax, 8
movzx eax, al
imul ecx, eax, 0x1d
mov eax, r9d
shr eax, 8
add eax, r9d
shr eax, 8
movzx eax, al
add edx, ecx
imul ecx, eax, 0x4d
add edx, ecx
shr edx, 8
mov byte [rdi], dl
add rdi, r11
mov rax, qword [rbx]
cmp r10d, dword [rax]
jb 0x18007739b
mov r14d, dword [rbp + 0xe0]
jmp 0x1800774af
cmp ecx, 2
jne 0x180077474
xor r8d, r8d
cmp dword [rax], r8d
jbe 0x1800774af
mov r13, qword [rsp + 0x50]
movsxd r9, r14d
mov al, byte [r8 + r15]
not al
movzx edx, al
movzx eax, byte [r8 + r13]
add r8d, esi
imul edx, eax
mov byte [rdi + 1], 0xff
sub edx, 0xffffff80
mov eax, edx
shr eax, 8
add eax, edx
shr eax, 8
mov byte [rdi], al
add rdi, r9
mov rax, qword [rbx]
cmp r8d, dword [rax]
jb 0x18007743b
mov r13, qword [rsp + 0x48]
jmp 0x1800774af
mov ecx, dword [rax]
xor edx, edx
cmp r14d, esi
jne 0x180077493
test ecx, ecx
je 0x1800774af
mov al, byte [rdx + r15]
mov byte [rdx + rdi], al
add edx, esi
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x180077481
jmp 0x1800774af
test ecx, ecx
je 0x1800774af
mov cl, byte [rdx + r15]
add edx, esi
mov byte [rdi], cl
add rdi, rsi
mov byte [rdi], 0xff
add rdi, rsi
mov rax, qword [rbx]
cmp edx, dword [rax]
jb 0x180077497
mov eax, dword [rsp + 0x30]
mov rdx, qword [rbx]
add eax, esi
mov r12, qword [rbp - 0x80]
mov dword [rsp + 0x30], eax
cmp eax, dword [rdx + 4]
jb 0x180076fab
mov edx, dword [rdx + 8]
xor r8d, r8d
mov rcx, rbx
call fcn.18007af7c
mov rax, qword [rbx]
mov ecx, dword [rax]
mov rax, qword [rbp - 0x78]
mov dword [rax], ecx
mov rax, qword [rbx]
mov ecx, dword [rax + 4]
mov rax, qword [rbp - 0x70]
mov dword [rax], ecx
mov rcx, qword [rbp - 0x68]
test rcx, rcx
je 0x180077507
mov rax, qword [rbx]
mov edx, 3
cmp dword [rax + 8], edx
cmovge esi, edx
mov dword [rcx], esi
mov rax, r12
jmp 0x180077531
mov edx, dword [0x1801b13a0]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
lea rdx, str.bad_req_comp
mov ecx, 0x20
mov qword [rcx + rax], rdx
xor eax, eax
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1800c3bb0
add rsp, 0x178
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret