Function at 0x489860
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
mov rax, rsp
sub rsp, 0xe8
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov qword [rax - 8], rsi
mov qword [rax - 0x10], rdi
mov qword [rax - 0x18], r12
mov qword [rax - 0x20], r13
mov qword [rax - 0x30], r15
xor eax, eax
mov rbp, rcx
mov qword [rsp + 0x80], rax
mov rax, qword [rcx]
movzx ecx, byte [rcx + 0x39]
mov r15, qword [rax]
mov r12d, 1
xor si, si
xor r13w, r13w
cmp ecx, r12d
movzx edi, dx
mov qword [rsp + 0xa0], r15
mov dword [rsp + 0x54], 0
mov qword [rsp + 0x98], rax
mov dword [rsp + 0x40], ecx
jg 0x4898e2
mov ebx, r12d
mov dword [rsp + 0x58], r12d
jmp 0x4898f6
mov ebx, 0xa
mov eax, 5
cmp ecx, 2
cmove ebx, eax
mov dword [rsp + 0x58], ebx
mov rax, qword [rbp + 0x10]
mov qword [rsp + 0xc0], r14
test rax, rax
je 0x489916
test di, di
je 0x489916
mov r14d, dword [rax]
mov dword [rsp + 0x68], r14d
jmp 0x48991e
xor r14d, r14d
mov dword [rsp + 0x68], r14d
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r14 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r15
call fcn.0043b030
test rax, rax
mov rdx, rax
mov qword [rsp + 0x60], rax
jne 0x48994a
lea eax, [rdx + 7]
jmp 0x48a3cd
xor ecx, ecx
mov r10, rax
mov qword [rsp + 0x78], rax
movsxd rax, ebx
shl rax, 5
lea r9, [rax + rdx]
mov qword [rsp + 0x88], r9
mov qword [r9], rcx
mov qword [r9 + 8], rcx
mov qword [r9 + 0x10], rcx
mov qword [r9 + 0x18], rcx
lea rcx, [rax + r9]
lea eax, [rbx + rbx]
test eax, eax
jle 0x4899a0
movsxd r8, dword [rsp + 0x40]
shl r8, 3
add rdx, 0x18
nop
mov qword [rdx], rcx
dec eax
add rdx, 0x20
add rcx, r8
test eax, eax
jg 0x489990
test r14d, r14d
je 0x4899c7
movsxd r8, r14d
xor edx, edx
mov qword [rsp + 0x80], rcx
add r8, r8
call sub.msvcrt.dll_memset
mov r10, qword [rsp + 0x78]
mov r9, qword [rsp + 0x88]
mov rax, qword [rsp + 0x98]
mov ecx, reloc.WLDAP32.dll_Ordinal_46
mov edx, r12d
mov eax, dword [rax + 0x1d8]
mov dword [rsp + 0x70], r12d
cmp eax, ecx
cmovb ecx, eax
test r14d, r14d
mov word [r9 + 0x10], cx
je 0x489a0b
mov r11d, dword [rsp + 0x40]
movzx eax, r14b
mov ecx, 0xffffffff
test r11d, r11d
cmovg eax, ecx
mov byte [r9 + 0x16], al
jmp 0x489a10
mov r11d, dword [rsp + 0x40]
xor ecx, ecx
test r11d, r11d
mov dword [rsp + 0x50], ecx
jle 0x48a143
nop
xor eax, eax
xor r15d, r15d
test edx, edx
mov rdi, r9
mov qword [rsp + 0x48], r9
mov dword [rsp + 0x6c], eax
jle 0x489fe9
nop
nop
mov r14, qword [rbp + 0x20]
test r14, r14
je 0x489fc1
nop
mov r9, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov qword [rsp + 0x90], 0
mov rax, r9
not rax
test qword [r14], rax
jne 0x489fa4
mov rbp, qword [r14 + 8]
test r9, rbp
jne 0x489fa4
movzx r10d, word [rdi + 0x10]
movzx edx, word [r14 + 0x14]
mov bx, word [r14 + 0x12]
add dx, r10w
cmp bx, dx
jl 0x489ae7
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x489ab3
lea r12, [0x00400000]
jmp 0x489b34
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489ac7
inc bx
lea r12, [0x00400000]
jmp 0x489b34
movsx rcx, bx
movsx rax, dx
lea r12, [0x00400000]
sub rcx, rax
movzx eax, byte [rcx + r12 + 0x29b360]
add bx, ax
jmp 0x489b34
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x489b02
mov bx, dx
lea r12, [0x00400000]
jmp 0x489b34
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489b16
lea ebx, [rdx + 1]
lea r12, [0x00400000]
jmp 0x489b34
movsx rax, bx
movsx rcx, dx
lea r12, [0x00400000]
sub rcx, rax
movzx ebx, byte [rcx + r12 + 0x29b360]
add bx, dx
movzx edx, word [rdi + 0x14]
cmp bx, dx
jl 0x489b72
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x489baa
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489b59
inc bx
jmp 0x489baa
movsx rax, dx
movsx rcx, bx
sub rcx, rax
movzx eax, byte [rcx + r12 + 0x29b360]
add bx, ax
jmp 0x489baa
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x489b86
mov bx, dx
jmp 0x489baa
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489b93
lea ebx, [rdx + 1]
jmp 0x489baa
movsx rax, bx
movsx rcx, dx
sub rcx, rax
movzx ebx, byte [rcx + r12 + 0x29b360]
add bx, dx
movzx r12d, word [r14 + 0x16]
or rbp, r9
add r12w, r10w
test r11b, r11b
jns 0x489bff
lea rax, [rsp + 0x90]
mov r8, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x50]
mov qword [rsp + 0x28], r14
mov word [rsp + 0x20], ax
mov rax, qword [rsp + 0xf0]
movzx r9d, word [rax + 0x32]
mov rdx, qword [rax + 0x10]
mov rcx, rax
call fcn.00488de0
mov r9, qword [rsp + 0x90]
mov r11b, al
jmp 0x489c03
mov r9, qword [rdi + 8]
test r11b, r11b
js 0x489e1e
mov edi, dword [rsp + 0x68]
movsx ecx, r11b
cmp ecx, edi
jge 0x489e1e
mov r10, qword [rsp + 0x80]
movsx r8, r11b
cmp word [r10 + r8*2], 0
jne 0x489d96
mov eax, edi
sub eax, ecx
mov cx, Ordinal_41
imul eax, eax, 0x64
cdq
idiv edi
cdqe
cmp rax, 8
jae 0x489c6f
cmp rax, 2
jae 0x489c60
xor dx, dx
jmp 0x489cc6
add rax, rax
add cx, 0xfff6
cmp rax, 8
jb 0x489c60
jmp 0x489cad
cmp rax, 0xff
jbe 0x489c90
nop
nop
nop
shr rax, 4
add cx, 0x28
cmp rax, 0xff
ja 0x489c80
cmp rax, 0xf
jbe 0x489cad
nop
nop
nop
shr rax, 1
add cx, 0xa
cmp rax, 0xf
ja 0x489ca0
and eax, 7
lea rdx, [0x00400000]
movzx edx, word [rdx + rax*2 + 0x32d468]
add dx, cx
sub dx, 0xa
mov di, word [rsp + 0xf8]
sub dx, 0x42
cmp di, 0xa
jg 0x489cdf
xor eax, eax
jmp 0x489d73
movsx rax, di
mov cx, Ordinal_41
cmp rax, 8
jae 0x489d0f
cmp rax, 2
jae 0x489d00
xor ax, ax
jmp 0x489d6f
add rax, rax
add cx, 0xfff6
cmp rax, 8
jb 0x489d00
jmp 0x489d4d
cmp rax, 0xff
jbe 0x489d30
nop
nop
nop
shr rax, 4
add cx, 0x28
cmp rax, 0xff
ja 0x489d20
cmp rax, 0xf
jbe 0x489d4d
nop
nop
nop
shr rax, 1
add cx, 0xa
cmp rax, 0xf
ja 0x489d40
and eax, 7
lea r10, [0x00400000]
movzx eax, word [r10 + rax*2 + 0x32d468]
mov r10, qword [rsp + 0x80]
add ax, cx
sub ax, 0xa
cwde
sub eax, 0x21
mov rcx, qword [rsp + 0xf0]
add ax, dx
add ax, di
add ax, 0x10
bt word [rcx + 0x32], 0xa
jae 0x489d91
add ax, 0x10
mov word [r10 + r8*2], ax
mov dx, word [r10 + r8*2]
cmp bx, dx
jl 0x489de0
movsx ecx, dx
movsx r8d, bx
lea eax, [rcx + 0x31]
cmp r8d, eax
jle 0x489db4
mov dx, bx
jmp 0x489e21
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489dc1
lea edx, [rbx + 1]
jmp 0x489e21
movsx rax, dx
movsx rcx, bx
sub rcx, rax
lea rax, [0x00400000]
movzx edx, byte [rcx + rax + 0x29b360]
add dx, bx
jmp 0x489e21
movsx ecx, bx
movsx r8d, dx
lea eax, [rcx + 0x31]
cmp r8d, eax
jg 0x489e21
lea eax, [rcx + 0x1f]
cmp r8d, eax
jle 0x489dfc
inc dx
jmp 0x489e21
movsx rcx, dx
movsx rax, bx
sub rcx, rax
lea rax, [0x00400000]
movzx eax, byte [rcx + rax + 0x29b360]
add ax, dx
mov dx, ax
jmp 0x489e21
mov dx, bx
mov r10, qword [rsp + 0x78]
xor ecx, ecx
test r15d, r15d
mov rdi, r10
jle 0x489e50
cmp qword [rdi], rbp
jne 0x489e3e
movzx eax, byte [rdi + 0x16]
xor al, r11b
jns 0x489e4b
inc ecx
add rdi, 0x20
cmp ecx, r15d
jl 0x489e30
jmp 0x489e50
cmp ecx, r15d
jl 0x489e9d
cmp r15d, dword [rsp + 0x58]
jl 0x489e7b
cmp dx, si
jg 0x489f66
cmp dx, si
jne 0x489e8d
cmp bx, r13w
jl 0x489e8d
mov rdi, qword [rsp + 0x48]
mov r12d, 1
jmp 0x489fa4
mov eax, r15d
inc r15d
movsxd rdi, eax
shl rdi, 5
add rdi, r10
jmp 0x489eba
mov eax, dword [rsp + 0x54]
movsxd rdi, eax
shl rdi, 5
add rdi, r10
jmp 0x489eba
movzx eax, word [rdi + 0x12]
cmp ax, dx
jl 0x489f8c
cmp ax, dx
jne 0x489eba
cmp word [rdi + 0x10], r12w
jle 0x489f99
mov rax, qword [r14 + 8]
mov rcx, qword [rsp + 0x48]
or rax, qword [rcx]
mov word [rdi + 0x14], bx
mov qword [rdi + 8], r9
mov qword [rdi], rax
movsxd rax, dword [rsp + 0x50]
mov word [rdi + 0x10], r12w
mov word [rdi + 0x12], dx
mov byte [rdi + 0x16], r11b
mov rdx, qword [rcx + 0x18]
mov rcx, qword [rdi + 0x18]
lea rbx, [rax*8]
mov r8, rbx
call sub.msvcrt.dll_memcpy
mov r11, qword [rdi + 0x18]
mov qword [rbx + r11], r14
mov ebx, dword [rsp + 0x58]
cmp r15d, ebx
jl 0x489f73
mov r10, qword [rsp + 0x78]
mov r12d, 1
mov dword [rsp + 0x54], 0
cmp ebx, r12d
movzx esi, word [r10 + 0x12]
movzx r13d, word [r10 + 0x10]
mov edx, r12d
jle 0x489f85
lea rax, [r10 + 0x32]
movzx ecx, word [rax]
cmp cx, si
jg 0x489f49
cmp cx, si
jne 0x489f55
cmp word [rax + 2], r13w
jle 0x489f55
mov r13w, word [rax + 2]
mov si, cx
mov dword [rsp + 0x54], edx
inc edx
add rax, 0x20
cmp edx, ebx
jl 0x489f35
mov rdi, qword [rsp + 0x48]
jmp 0x489fa4
mov rdi, qword [rsp + 0x48]
mov r12d, 1
jmp 0x489fa4
mov rdi, qword [rsp + 0x48]
mov r10, qword [rsp + 0x78]
mov r12d, 1
jmp 0x489fa4
mov rdi, qword [rsp + 0x48]
jmp 0x489fa4
mov rdi, qword [rsp + 0x48]
mov r12d, 1
jmp 0x489fa4
mov rdi, qword [rsp + 0x48]
mov r12d, 1
mov r14, qword [r14 + 0x38]
test r14, r14
jne 0x489a50
mov rbp, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x6c]
mov edx, dword [rsp + 0x70]
inc eax
add rdi, 0x20
cmp eax, edx
mov dword [rsp + 0x6c], eax
mov qword [rsp + 0x48], rdi
jl 0x489a40
mov ecx, dword [rsp + 0x50]
mov r9, qword [rsp + 0x88]
mov r11d, dword [rsp + 0x40]
mov rax, r10
inc ecx
mov qword [rsp + 0x78], r9
cmp ecx, r11d
mov r10, r9
mov edx, r15d
mov qword [rsp + 0x88], rax
mov dword [rsp + 0x70], r15d
mov dword [rsp + 0x50], ecx
mov r9, rax
jl 0x489a20
test r15d, r15d
jne 0x48a133
mov rcx, qword [rsp + 0x98]
lea rdx, str.no_query_solution
call fcn.00462100
mov r11, qword [rsp + 0xa0]
test r11, r11
je 0x48a096
cmp qword [r11 + 0x320], 0
je 0x48a05f
mov rdx, qword [rsp + 0x60]
mov rcx, r11
call fcn.00425e50
mov eax, r12d
jmp 0x48a3cd
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [r11 + 0x168]
jb 0x48a09b
cmp rbx, qword [r11 + 0x170]
jae 0x48a09b
mov rax, qword [r11 + 0x160]
mov qword [rbx], rax
dec dword [r11 + 0x14c]
mov qword [r11 + 0x160], rbx
mov eax, r12d
jmp 0x48a3cd
mov rbx, qword [rsp + 0x60]
cmp dword [reloc.WS2_32.dll_accept], 0
je 0x48a122
mov rcx, qword [0x00772b88]
test rcx, rcx
je 0x48a0b6
call qword [0x0072d0f8]
mov rcx, rbx
call qword [0x0072d0b0]
mov ecx, dword [0x00772960]
neg eax
add ecx, eax
mov eax, dword [0x00772988]
cmp ecx, eax
mov dword [0x00772960], ecx
cmovg eax, ecx
mov ecx, dword [0x00772984]
dec ecx
mov dword [0x00772988], eax
mov eax, dword [0x007729ac]
cmp ecx, eax
mov dword [0x00772984], ecx
cmovg eax, ecx
mov rcx, rbx
mov dword [0x007729ac], eax
call qword [0x0072d0a0]
mov rcx, qword [0x00772b88]
test rcx, rcx
je 0x48a12b
call qword [0x0072d108]
mov eax, r12d
jmp 0x48a3cd
mov rcx, rbx
call qword [0x0072d0a0]
mov eax, r12d
jmp 0x48a3cd
mov di, word [rsp + 0xf8]
mov r15, qword [rsp + 0xa0]
movsxd rdx, edx
mov rbx, r9
cmp rdx, 1
jle 0x48a175
lea rcx, [r9 + 0x32]
dec rdx
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x48a169
movsxd rbx, r12d
shl rbx, 5
add rbx, r9
inc r12d
add rcx, 0x20
dec rdx
jne 0x48a156
test r11d, r11d
jle 0x48a1c3
xor r8d, r8d
lea rdx, [rbp + 0x364]
mov r9d, r11d
nop
nop
nop
mov rax, qword [rbx + 0x18]
add rdx, 0x50
add r8, 8
mov rcx, qword [r8 + rax - 8]
mov qword [rdx - 0x34], rcx
movzx eax, byte [rcx + 0x10]
mov byte [rdx - 0x50], al
mov rcx, rax
mov rax, qword [rbp + 8]
imul rcx, rcx, 0x78
dec r9
mov ecx, dword [rcx + rax + 0x50]
mov dword [rdx - 0x70], ecx
jne 0x48a190
movzx eax, word [rbp + 0x32]
bt ax, 0xa
jae 0x48a236
bt ax, 9
jb 0x48a236
cmp byte [rbp + 0x38], 0
jne 0x48a236
test di, di
je 0x48a236
mov rax, qword [rbx + 0x18]
movsxd rcx, r11d
lea edx, [r11 - 1]
mov rax, qword [rax + rcx*8 - 8]
lea r8, [rsp + 0xf0]
mov r9w, 0x200
mov qword [rsp + 0x30], r8
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [rbp + 0x18]
mov r8, rbx
mov rcx, rbp
call fcn.00488de0
movsx ecx, al
mov rax, qword [rbp + 0x18]
cmp ecx, dword [rax]
jne 0x48a231
mov r11d, dword [rsp + 0x40]
mov byte [rbp + 0x38], 2
jmp 0x48a236
mov r11d, dword [rsp + 0x40]
mov rdx, qword [rbp + 0x10]
test rdx, rdx
je 0x48a2df
movzx ecx, word [rbp + 0x32]
bt cx, 9
jae 0x48a25c
movsx eax, byte [rbx + 0x16]
cmp eax, dword [rdx]
jne 0x48a273
mov byte [rbp + 0x38], 2
jmp 0x48a273
movzx eax, byte [rbx + 0x16]
test al, al
mov byte [rbp + 0x34], al
jns 0x48a26b
mov byte [rbp + 0x34], 0
mov rax, qword [rbx + 8]
mov qword [rbp + 0x28], rax
bt cx, 0xb
jae 0x48a2df
movsx eax, byte [rbp + 0x34]
cmp eax, dword [rdx]
jne 0x48a2df
mov rax, qword [rbx + 0x18]
movsxd rcx, r11d
lea r8, [rsp + 0xf0]
mov rax, qword [rax + rcx*8 - 8]
mov qword [rsp + 0x30], r8
dec r11w
mov qword [rsp + 0x28], rax
xor r9d, r9d
mov r8, rbx
mov rcx, rbp
mov qword [rsp + 0xf0], 0
mov word [rsp + 0x20], r11w
call fcn.00488de0
movsx ecx, al
mov rax, qword [rbp + 0x10]
cmp ecx, dword [rax]
jne 0x48a2df
mov rax, qword [rsp + 0xf0]
mov byte [rbp + 0x35], 1
mov qword [rbp + 0x28], rax
test r15, r15
movzx eax, word [rbx + 0x10]
mov word [rbp + 0x30], ax
je 0x48a33c
cmp qword [r15 + 0x320], 0
je 0x48a308
mov rdx, qword [rsp + 0x60]
mov rcx, r15
call fcn.00425e50
jmp 0x48a3cb
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [r15 + 0x168]
jb 0x48a341
cmp rbx, qword [r15 + 0x170]
jae 0x48a341
mov rax, qword [r15 + 0x160]
mov qword [rbx], rax
dec dword [r15 + 0x14c]
mov qword [r15 + 0x160], rbx
jmp 0x48a3cb
mov rbx, qword [rsp + 0x60]
cmp dword [reloc.WS2_32.dll_accept], 0
je 0x48a3c2
mov rcx, qword [0x00772b88]
test rcx, rcx
je 0x48a35c
call qword [0x0072d0f8]
mov rcx, rbx
call qword [0x0072d0b0]
mov ecx, dword [0x00772960]
neg eax
add ecx, eax
mov eax, dword [0x00772988]
cmp ecx, eax
mov dword [0x00772960], ecx
cmovg eax, ecx
mov ecx, dword [0x00772984]
dec ecx
mov dword [0x00772988], eax
mov eax, dword [0x007729ac]
cmp ecx, eax
mov dword [0x00772984], ecx
cmovg eax, ecx
mov rcx, rbx
mov dword [0x007729ac], eax
call qword [0x0072d0a0]
mov rcx, qword [0x00772b88]
test rcx, rcx
je 0x48a3cb
call qword [0x0072d108]
jmp 0x48a3cb
mov rcx, rbx
call qword [0x0072d0a0]
xor eax, eax
mov r15, qword [rsp + 0xb8]
mov r14, qword [rsp + 0xc0]
mov r13, qword [rsp + 0xc8]
mov r12, qword [rsp + 0xd0]
mov rdi, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xe0]
mov rbp, qword [rsp + 0x108]
mov rbx, qword [rsp + 0x100]
add rsp, 0xe8
ret