Function at 0x18028d970
Capabilities:
Encrypt data using rc4 ksa
Resolve function by parsing pe exports

Disassembly:
mov word [rsp + 0x10], dx
mov qword [rsp + 8], rcx
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xb0
mov rax, qword [rcx]
movzx edi, dx
xor edx, edx
mov qword [rsp + 0x88], rax
mov r14, rcx
mov dword [rsp + 0x58], edx
movzx ecx, byte [rcx + 0x40]
mov r13d, 1
mov r8, qword [rax]
movzx esi, dx
mov qword [rsp + 0x90], r8
movzx r12d, dx
mov qword [rsp + 0x80], rdx
mov dword [rsp + 0x100], ecx
cmp ecx, r13d
jg 0x18028d9d8
mov ebx, r13d
jmp 0x18028d9e8
cmp ecx, 2
mov ebx, 0xa
mov eax, 5
cmove ebx, eax
mov rax, qword [r14 + 0x10]
mov dword [rsp + 0x54], ebx
test rax, rax
je 0x18028da04
test di, di
je 0x18028da04
mov r15d, dword [rax]
mov dword [rsp + 0x50], r15d
jmp 0x18028da0b
mov r15d, edx
mov dword [rsp + 0x50], edx
lea eax, [rcx + 4]
imul eax, ebx
lea ecx, [r15 + rax*8]
add ecx, ecx
movsxd rdx, ecx
mov rcx, r8
call fcn.18023cbb0
mov qword [rsp + 0x60], rax
mov rdx, rax
test rax, rax
jne 0x18028da37
lea eax, [rdx + 7]
jmp 0x18028e53c
movsxd r8, dword [rsp + 0x100]
xor ecx, ecx
mov eax, ebx
shl rax, 5
lea r9, [rax + rdx]
mov qword [rsp + 0xa8], rbp
mov qword [r9], rcx
mov rbp, rdx
mov qword [r9 + 8], rcx
mov qword [r9 + 0x10], rcx
mov qword [r9 + 0x18], rcx
lea rcx, [rax + r9]
shl r8, 3
lea eax, [rbx + rbx]
mov qword [rsp + 0x40], rdx
add rdx, 0x18
mov qword [rsp + 0x70], r9
nop
mov qword [rdx], rcx
lea rdx, [rdx + 0x20]
add rcx, r8
dec eax
test eax, eax
jg 0x18028da80
test r15d, r15d
je 0x18028daaf
movsxd r8, r15d
xor edx, edx
add r8, r8
mov qword [rsp + 0x80], rcx
call fcn.1802c7550
mov r9, qword [rsp + 0x70]
mov rax, qword [rsp + 0x88]
mov ecx, gethostbyname
mov edx, r13d
mov dword [rsp + 0x6c], edx
mov eax, dword [rax + 0xc4]
cmp eax, ecx
cmovb ecx, eax
mov word [r9 + 0x10], cx
test r15d, r15d
je 0x18028daf3
movzx eax, r15b
or ecx, 0xffffffff
mov r15d, dword [rsp + 0x100]
test r15d, r15d
cmovg eax, ecx
mov byte [r9 + 0x16], al
jmp 0x18028dafb
mov r15d, dword [rsp + 0x100]
xor r8d, r8d
mov r10d, 0x100
mov ecx, r8d
mov dword [rsp + 0x108], ecx
test r15d, r15d
jle 0x18028e20b
mov r10d, 0x4000
nop dword [rax]
mov qword [rsp + 0x48], r9
mov eax, r8d
mov dword [rsp + 0x68], eax
mov r13d, r8d
mov rdi, r9
test edx, edx
jle 0x18028e0bc
nop word [rax + rax]
mov r15, qword [r14 + 0x58]
test r15, r15
je 0x18028e091
nop dword [rax]
mov r9, qword [rdi]
movzx r11d, byte [rdi + 0x16]
mov rax, r9
not rax
mov qword [rsp + 0x78], r8
test qword [r15], rax
jne 0x18028e074
mov rbp, qword [r15 + 8]
test r9, rbp
jne 0x18028e06f
test dword [r15 + 0x28], r10d
je 0x18028db8a
cmp word [rdi + 0x10], 3
jl 0x18028e06f
movzx r10d, word [rdi + 0x10]
lea r14, [0x180000000]
movzx ecx, word [r15 + 0x14]
movzx ebx, word [r15 + 0x12]
add cx, r10w
movsx edx, cx
cmp bx, cx
jl 0x18028dbd5
movsx ecx, bx
lea eax, [rdx + 0x31]
cmp ecx, eax
jg 0x18028dc05
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x18028dbc2
inc bx
jmp 0x18028dc05
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x686f8]
add bx, ax
jmp 0x18028dc05
movsx r8d, bx
lea eax, [r8 + 0x31]
cmp edx, eax
jle 0x18028dbe6
movzx ebx, cx
jmp 0x18028dc05
lea eax, [r8 + 0x1f]
cmp edx, eax
jle 0x18028dbf3
lea ebx, [rcx + 1]
jmp 0x18028dc05
sub edx, r8d
movsxd rax, edx
movzx ebx, byte [rax + r14 + 0x686f8]
add bx, cx
movzx ecx, word [rdi + 0x14]
movsx edx, cx
cmp bx, cx
jl 0x18028dc3a
movsx ecx, bx
lea eax, [rdx + 0x31]
cmp ecx, eax
jg 0x18028dc6a
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x18028dc27
inc bx
jmp 0x18028dc6a
sub ecx, edx
movsxd rax, ecx
movzx eax, byte [rax + r14 + 0x686f8]
add bx, ax
jmp 0x18028dc6a
movsx r8d, bx
lea eax, [r8 + 0x31]
cmp edx, eax
jle 0x18028dc4b
movzx ebx, cx
jmp 0x18028dc6a
lea eax, [r8 + 0x1f]
cmp edx, eax
jle 0x18028dc58
lea ebx, [rcx + 1]
jmp 0x18028dc6a
sub edx, r8d
movsxd rax, edx
movzx ebx, byte [rax + r14 + 0x686f8]
add bx, cx
movzx r14d, word [r15 + 0x16]
or rbp, r9
add r14w, r10w
test r11b, r11b
jns 0x18028dcc0
lea rax, [rsp + 0x78]
mov r8, rdi
mov qword [rsp + 0x30], rax
mov eax, dword [rsp + 0x108]
mov qword [rsp + 0x28], r15
mov word [rsp + 0x20], ax
mov rax, qword [rsp + 0xf0]
mov rcx, rax
mov rdi, rax
movzx r9d, word [rax + 0x3c]
mov rdx, qword [rax + 0x10]
call fcn.18028cff0
mov r10, qword [rsp + 0x78]
movzx r11d, al
jmp 0x18028dccc
mov r10, qword [rdi + 8]
mov rdi, qword [rsp + 0xf0]
test r11b, r11b
js 0x18028df1a
movsx edx, r11b
cmp edx, dword [rsp + 0x50]
jge 0x18028df1a
mov rcx, qword [rsp + 0x80]
movsx rax, r11b
lea r9, [rcx + rax*2]
movzx ecx, word [rcx + rax*2]
test cx, cx
jne 0x18028de94
mov eax, dword [rsp + 0x50]
movzx r8d, word [rsp + 0xf8]
sub eax, edx
imul eax, eax, 0x64
cdq
idiv dword [rsp + 0x50]
movsxd rcx, eax
mov eax, 0x28
cmp rcx, 8
jae 0x18028dd41
cmp rcx, 2
jae 0x18028dd32
xor eax, eax
movzx edx, ax
jmp 0x18028dd96
add ax, 0xfff6
add rcx, rcx
cmp rcx, 8
jb 0x18028dd32
jmp 0x18028dd7d
cmp rcx, 0xff
jbe 0x18028dd61
nop word [rax + rax]
add ax, 0x28
shr rcx, 4
cmp rcx, 0xff
ja 0x18028dd50
cmp rcx, 0xf
jbe 0x18028dd7d
nop word [rax + rax]
add ax, 0xa
shr rcx, 1
cmp rcx, 0xf
ja 0x18028dd70
and ecx, 7
lea rdx, [0x180000000]
movzx edx, word [rdx + rcx*2 + 0x3fbe28]
sub dx, 0xa
add dx, ax
movzx eax, word [rsp + 0xf8]
movzx ecx, word [rdi + 0x3c]
sub ax, 0x32
add dx, ax
mov eax, 0x4000
test ax, cx
movzx eax, word [rsp + 0xf8]
je 0x18028ddd7
movzx eax, word [rdi + 0x3e]
cmp ax, word [rsp + 0xf8]
jge 0x18028ddcf
movzx r8d, ax
jmp 0x18028ddeb
movzx eax, word [rsp + 0xf8]
mov edi, 0x100
test di, cx
je 0x18028ddeb
cmp ax, 0xa
jle 0x18028ddf2
lea r8d, [rax - 0xa]
cmp r8w, 0xa
jg 0x18028ddfb
xor eax, eax
mov ecx, eax
jmp 0x18028de8d
movsx rax, r8w
mov ecx, 0x28
cmp rax, 8
jae 0x18028de2f
cmp rax, 2
jae 0x18028de20
xor eax, eax
jmp 0x18028de87
add cx, 0xfff6
add rax, rax
cmp rax, 8
jb 0x18028de20
jmp 0x18028de6d
cmp rax, 0xff
jbe 0x18028de50
nop word [rax + rax]
add cx, 0x28
shr rax, 4
cmp rax, 0xff
ja 0x18028de40
cmp rax, 0xf
jbe 0x18028de6d
nop word [rax + rax]
add cx, 0xa
shr rax, 1
cmp rax, 0xf
ja 0x18028de60
and eax, 7
lea r8, [0x180000000]
movzx eax, word [r8 + rax*2 + 0x3fbe28]
sub ax, 0xa
add ax, cx
movsx ecx, ax
sub ecx, 0x21
add cx, dx
mov word [r9], cx
movsx edx, cx
cmp bx, cx
jl 0x18028dedc
movsx ecx, bx
lea eax, [rdx + 0x31]
cmp ecx, eax
jle 0x18028deaf
movzx ecx, bx
add cx, 5
jmp 0x18028df21
lea eax, [rdx + 0x1f]
cmp ecx, eax
jle 0x18028debf
lea ecx, [rbx + 1]
add cx, 5
jmp 0x18028df21
sub ecx, edx
movsxd rax, ecx
lea rcx, [0x180000000]
movzx ecx, byte [rax + rcx + 0x686f8]
add cx, bx
add cx, 5
jmp 0x18028df21
movsx r8d, bx
lea eax, [r8 + 0x31]
cmp edx, eax
jg 0x18028df14
lea eax, [r8 + 0x1f]
cmp edx, eax
jle 0x18028def9
inc cx
add cx, 5
jmp 0x18028df21
sub edx, r8d
movsxd rax, edx
lea rdx, [0x180000000]
movzx eax, byte [rax + rdx + 0x686f8]
add ax, cx
movzx ecx, ax
add cx, 5
jmp 0x18028df21
movzx ecx, bx
add bx, 0xfffe
mov rdi, qword [rsp + 0x40]
xor r8d, r8d
mov edx, r8d
test r13d, r13d
jle 0x18028df4a
cmp qword [rdi], rbp
jne 0x18028df3f
movzx eax, byte [rdi + 0x16]
xor al, r11b
jge 0x18028df6c
inc edx
add rdi, 0x20
cmp edx, r13d
jl 0x18028df31
cmp r13d, dword [rsp + 0x54]
jl 0x18028dfa1
cmp cx, si
jg 0x18028e064
jne 0x18028df66
cmp bx, r12w
jge 0x18028e064
mov eax, dword [rsp + 0x58]
jmp 0x18028dfa7
cmp edx, r13d
jge 0x18028df4a
movzx eax, word [rdi + 0x12]
cmp ax, cx
jl 0x18028e064
mov rbp, qword [rsp + 0x40]
jne 0x18028dfb6
movzx eax, word [rdi + 0x10]
cmp ax, r14w
jl 0x18028e057
jne 0x18028dfb6
cmp word [rdi + 0x14], bx
jle 0x18028e057
jmp 0x18028dfb6
mov eax, r13d
inc r13d
mov rbp, qword [rsp + 0x40]
movsxd rdi, eax
shl rdi, 5
add rdi, rbp
mov rax, qword [r15 + 8]
mov rdx, qword [rsp + 0x48]
or rax, qword [rdx]
mov qword [rdi], rax
movsxd rax, dword [rsp + 0x108]
mov word [rdi + 0x14], bx
mov word [rdi + 0x12], cx
mov rcx, qword [rdi + 0x18]
lea rbx, [rax*8]
mov qword [rdi + 8], r10
mov word [rdi + 0x10], r14w
mov r8, rbx
mov byte [rdi + 0x16], r11b
mov rdx, qword [rdx + 0x18]
call fcn.1802c7100
mov rax, qword [rdi + 0x18]
xor r8d, r8d
mov qword [rbx + rax], r15
mov ebx, dword [rsp + 0x54]
cmp r13d, ebx
jl 0x18028e057
movzx esi, word [rbp + 0x12]
mov edx, 1
movzx r12d, word [rbp + 0x10]
mov dword [rsp + 0x58], r8d
cmp ebx, edx
jbe 0x18028e057
lea rax, [rbp + 0x32]
nop dword [rax]
movzx ecx, word [rax]
cmp cx, si
jg 0x18028e041
jne 0x18028e04d
cmp word [rax + 2], r12w
jle 0x18028e04d
movzx r12d, word [rax + 2]
movzx esi, cx
mov dword [rsp + 0x58], edx
inc edx
add rax, 0x20
cmp edx, ebx
jl 0x18028e030
mov rdi, qword [rsp + 0x48]
mov r10d, 0x4000
jmp 0x18028e074
mov rdi, qword [rsp + 0x48]
mov r10d, 0x4000
mov rbp, qword [rsp + 0x40]
mov r15, qword [r15 + 0x40]
test r15, r15
jne 0x18028db50
mov r14, qword [rsp + 0xf0]
mov eax, dword [rsp + 0x68]
mov edx, dword [rsp + 0x6c]
inc eax
add rdi, 0x20
mov dword [rsp + 0x68], eax
mov qword [rsp + 0x48], rdi
cmp eax, edx
jl 0x18028db40
mov ecx, dword [rsp + 0x108]
mov r9, qword [rsp + 0x70]
mov r15d, dword [rsp + 0x100]
mov rax, rbp
mov qword [rsp + 0x40], r9
inc ecx
mov qword [rsp + 0x70], rax
mov dword [rsp + 0x108], ecx
mov edx, r13d
mov dword [rsp + 0x6c], edx
mov rbp, r9
mov r9, rax
cmp ecx, r15d
jl 0x18028db20
test r13d, r13d
jne 0x18028e1f7
mov rcx, qword [rsp + 0x88]
lea rdx, [0x1800723d8]
call fcn.18023f590
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x18028e185
cmp qword [rcx + 0x2d8], 0
je 0x18028e12f
mov rdx, qword [rsp + 0x60]
call fcn.18021f5c0
lea eax, [r13 + 1]
jmp 0x18028e534
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [rcx + 0x1c8]
jae 0x18028e18a
cmp rbx, qword [rcx + 0x1b8]
jb 0x18028e161
mov rax, qword [rcx + 0x1b0]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1b0], rbx
jmp 0x18028e534
cmp rbx, qword [rcx + 0x1c0]
jb 0x18028e18a
mov rax, qword [rcx + 0x1a0]
mov qword [rbx], rax
mov eax, 1
mov qword [rcx + 0x1a0], rbx
jmp 0x18028e534
mov rbx, qword [rsp + 0x60]
cmp dword [0x1803fa7e0], 0
je 0x18028e1e4
mov rcx, qword [0x180412fb8]
test rcx, rcx
je 0x18028e1a5
call qword [0x1803fa860]
mov rcx, rbx
call qword [0x1803fa818]
dec qword [0x180413428]
movsxd rcx, eax
sub qword [0x1804133e0], rcx
mov rcx, rbx
call qword [0x1803fa808]
mov rcx, qword [0x180412fb8]
test rcx, rcx
je 0x18028e1ed
call qword [0x1803fa870]
mov eax, 1
jmp 0x18028e534
mov rcx, rbx
call qword [0x1803fa808]
mov eax, 1
jmp 0x18028e534
movzx edi, word [rsp + 0xf8]
mov r13d, 1
mov r10d, 0x100
movsxd rdx, edx
mov rbx, r9
cmp rdx, 1
jle 0x18028e240
lea rcx, [r9 + 0x32]
dec rdx
nop
movzx eax, word [rcx]
cmp word [rbx + 0x12], ax
jle 0x18028e233
movsxd rbx, r13d
shl rbx, 5
add rbx, r9
inc r13d
add rcx, 0x20
sub rdx, 1
jne 0x18028e220
test r15d, r15d
jle 0x18028e283
lea rdx, [r14 + 0x394]
mov r9d, r15d
nop
mov rax, qword [rbx + 0x18]
lea rdx, [rdx + 0x60]
mov rcx, qword [r8 + rax]
add r8, 8
mov qword [rdx - 0x44], rcx
movzx eax, byte [rcx + 0x10]
imul rcx, rax, 0x70
mov byte [rdx - 0x60], al
mov rax, qword [r14 + 8]
mov ecx, dword [rcx + rax + 0x4c]
mov dword [rdx - 0x90], ecx
sub r9, 1
jne 0x18028e250
movzx eax, word [r14 + 0x3c]
mov ecx, 0x180
and ax, cx
cmp ax, r10w
jne 0x18028e2f1
cmp byte [r14 + 0x43], 0
jne 0x18028e2f1
test di, di
je 0x18028e2f1
lea eax, [r15 - 1]
mov r9d, 0x80
movsxd rcx, eax
lea r8, [rsp + 0xf0]
mov rax, qword [rbx + 0x18]
lea edx, [r15 - 1]
mov qword [rsp + 0x30], r8
mov r8, rbx
mov rax, qword [rax + rcx*8]
mov rcx, r14
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], dx
mov rdx, qword [r14 + 0x18]
call fcn.18028cff0
movsx ecx, al
mov rax, qword [r14 + 0x18]
cmp ecx, dword [rax]
jne 0x18028e2f1
mov byte [r14 + 0x43], 2
and dword [r14 + 0x44], 0xfffffffb
mov rdx, qword [r14 + 0x10]
test rdx, rdx
je 0x18028e45d
movzx r9d, word [r14 + 0x3c]
test r9b, r9b
jns 0x18028e325
movsx eax, byte [rbx + 0x16]
xor edi, edi
cmp eax, dword [rdx]
jne 0x18028e3e6
mov byte [r14 + 0x43], 2
jmp 0x18028e3e6
movzx r8d, byte [rbx + 0x16]
mov byte [r14 + 0x41], r8b
mov rax, qword [rbx + 8]
mov qword [r14 + 0x68], rax
test r8b, r8b
jg 0x18028e3ce
mov byte [r14 + 0x41], 0
test r15d, r15d
jle 0x18028e3e4
lea eax, [r15 - 1]
movsxd rcx, eax
mov rax, qword [rbx + 0x18]
mov r10, qword [rax + rcx*8]
mov eax, dword [r10 + 0x28]
and eax, 0x104
cmp eax, 0x104
setne cl
bt dword [r10 + 0x28], 0xc
setae al
xor edi, edi
test al, cl
je 0x18028e3e6
lea rcx, [rsp + 0xf0]
mov qword [rsp + 0xf0], rdi
mov qword [rsp + 0x30], rcx
lea eax, [r15 - 1]
mov qword [rsp + 0x28], r10
mov rcx, r14
mov r9d, 0x800
mov word [rsp + 0x20], ax
mov r8, rbx
call fcn.18028cff0
mov rdx, qword [r14 + 0x10]
movsx ecx, al
cmp ecx, dword [rdx]
jne 0x18028e3e6
mov rax, qword [rsp + 0xf0]
or dword [r14 + 0x44], 4
mov qword [r14 + 0x68], rax
jmp 0x18028e3e6
test r15d, r15d
je 0x18028e3e4
cmp r8b, 1
jne 0x18028e3e4
test r9b, 3
je 0x18028e3e4
or dword [r14 + 0x44], 4
xor edi, edi
mov eax, 0x200
test word [r14 + 0x3c], ax
je 0x18028e45d
movsx eax, byte [r14 + 0x41]
cmp eax, dword [rdx]
jne 0x18028e45d
test r15d, r15d
jle 0x18028e45d
lea eax, [r15 - 1]
mov qword [rsp + 0xf0], rdi
movsxd rcx, eax
lea r8, [rsp + 0xf0]
mov rax, qword [rbx + 0x18]
dec r15w
mov qword [rsp + 0x30], r8
xor r9d, r9d
mov r8, rbx
mov rax, qword [rax + rcx*8]
mov rcx, r14
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], r15w
call fcn.18028cff0
movsx ecx, al
mov rax, qword [r14 + 0x10]
cmp ecx, dword [rax]
jne 0x18028e45d
mov rax, qword [rsp + 0xf0]
or dword [r14 + 0x44], 8
mov qword [r14 + 0x68], rax
mov rcx, qword [rsp + 0x90]
movzx eax, word [rbx + 0x10]
mov word [r14 + 0x48], ax
test rcx, rcx
je 0x18028e4d2
cmp qword [rcx + 0x2d8], 0
je 0x18028e48c
mov rdx, qword [rsp + 0x60]
call fcn.18021f5c0
jmp 0x18028e532
mov rbx, qword [rsp + 0x60]
cmp rbx, qword [rcx + 0x1c8]
jae 0x18028e4d7
cmp rbx, qword [rcx + 0x1b8]
jb 0x18028e4b6
mov rax, qword [rcx + 0x1b0]
mov qword [rbx], rax
mov qword [rcx + 0x1b0], rbx
jmp 0x18028e532
cmp rbx, qword [rcx + 0x1c0]
jb 0x18028e4d7
mov rax, qword [rcx + 0x1a0]
mov qword [rbx], rax
mov qword [rcx + 0x1a0], rbx
jmp 0x18028e532
mov rbx, qword [rsp + 0x60]
cmp dword [0x1803fa7e0], 0
je 0x18028e529
mov rcx, qword [0x180412fb8]
test rcx, rcx
je 0x18028e4f2
call qword [0x1803fa860]
mov rcx, rbx
call qword [0x1803fa818]
dec qword [0x180413428]
movsxd rcx, eax
sub qword [0x1804133e0], rcx
mov rcx, rbx
call qword [0x1803fa808]
mov rcx, qword [0x180412fb8]
test rcx, rcx
je 0x18028e532
call qword [0x1803fa870]
jmp 0x18028e532
mov rcx, rbx
call qword [0x1803fa808]
xor eax, eax
mov rbp, qword [rsp + 0xa8]
add rsp, 0xb0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret