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

Disassembly:
sub rsp, 0x58
mov r9, qword [rcx + 0x10]
mov qword [rsp + 0x60], rbx
mov rbx, rcx
cmp byte [r9 + 1], 0x1f
jae 0x10122842
mov rax, qword [rcx]
mov ecx, dword [rax + 8]
test ecx, ecx
je 0x10122842
mov rax, qword [rbx + 0x40]
cmp word [rax + rcx], 1
lea r8, [rax + rcx]
jne 0x101227d9
movzx eax, byte [r8 + 3]
cmp al, 0x20
jae 0x10122842
inc al
mov byte [r8 + 3], al
jmp 0x10122842
mov edx, dword [r8 + 4]
add rdx, rax
movzx eax, byte [r9]
cmp byte [rdx], al
je 0x1012282f
add rdx, 6
cmp byte [rdx], al
jne 0x101227e8
movzx eax, byte [rdx - 5]
cmp byte [rdx + 1], al
jb 0x1012282f
mov eax, dword [rdx]
lea rcx, [rsp + 0x20]
mov dword [rcx], eax
movzx eax, word [rdx + 4]
mov word [rcx + 4], ax
mov eax, dword [rdx - 6]
lea rcx, [rdx - 6]
mov dword [rdx], eax
movzx eax, word [rcx + 4]
mov word [rdx + 4], ax
lea rdx, [rsp + 0x20]
mov eax, dword [rdx]
mov dword [rcx], eax
movzx eax, word [rdx + 4]
mov rdx, rcx
mov word [rcx + 4], ax
movzx eax, byte [rdx + 1]
cmp al, 0x73
jae 0x10122842
add al, 2
mov byte [rdx + 1], al
add word [r8 + 2], 2
cmp dword [rbx + 0x18], 0
jne 0x10122889
mov rcx, rbx
call fcn.10122570
test rax, rax
mov qword [rbx], rax
mov qword [rbx + 8], rax
jne 0x1012286d
mov rcx, rbx
mov rbx, qword [rsp + 0x60]
add rsp, 0x58
jmp fcn.10122390
sub eax, dword [rbx + 0x40]
mov rcx, qword [rbx + 0x10]
mov word [rcx + 2], ax
shr eax, 0x10
mov word [rcx + 4], ax
mov rbx, qword [rsp + 0x60]
add rsp, 0x58
ret
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x48], r13
mov r13, qword [rbx + 0x58]
movzx ecx, byte [rax]
inc r13
mov byte [r13 - 1], cl
cmp r13, qword [rbx + 0x60]
mov qword [rbx + 0x58], r13
jb 0x101228c1
mov rcx, rbx
call fcn.10122390
mov r13, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x60]
add rsp, 0x58
ret
mov rcx, qword [rbx + 0x10]
sub r13d, dword [rbx + 0x40]
movzx edx, word [rcx + 4]
movzx eax, word [rcx + 2]
shl edx, 0x10
or edx, eax
je 0x1012290b
cmp edx, r13d
ja 0x101228f0
mov rcx, rbx
call fcn.10122570
test rax, rax
mov rdx, rax
je 0x101228aa
sub edx, dword [rbx + 0x40]
add dword [rbx + 0x18], 0xffffffff
jne 0x1012291f
mov rax, qword [rbx]
xor ecx, ecx
mov r13d, edx
cmp qword [rbx + 8], rax
setne cl
sub qword [rbx + 0x58], rcx
jmp 0x1012291f
mov word [rcx + 2], r13w
mov eax, r13d
shr eax, 0x10
mov word [rcx + 4], ax
mov edx, dword [rbx]
sub edx, dword [rbx + 0x40]
mov r9, qword [rbx + 0x40]
mov qword [rsp + 0x78], rdi
mov rdi, qword [rbx + 8]
mov qword [rsp + 0x38], r15
mov r15, qword [rbx]
mov ecx, edx
add rcx, r9
cmp rdi, r15
mov qword [rbx], rcx
mov qword [rbx + 8], rcx
je 0x10122c2f
mov rax, qword [rbx + 0x10]
mov qword [rsp + 0x70], rsi
movzx esi, word [r15 + 2]
movzx ecx, byte [rax + 1]
mov qword [rsp + 0x40], r14
movzx r14d, word [r15]
sub esi, ecx
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x50], r12
sub esi, r14d
inc esi
mov dword [rsp + 0x20], esi
nop
nop
movzx ebp, word [rdi]
cmp ebp, 1
je 0x10122ab3
test bpl, 1
jne 0x10122a7a
mov esi, ebp
shr esi, 1
movzx r12d, byte [rsi + rbx + 0xaf]
movzx eax, byte [rsi + rbx + 0xb0]
cmp r12d, eax
je 0x10122a76
lea edx, [r12 + 1]
mov eax, dword [rbx + rdx*4 + 0x130]
test eax, eax
je 0x101229d5
lea r8, [r9 + rax]
mov eax, dword [r9 + rax]
mov dword [rbx + rdx*4 + 0x130], eax
jmp 0x10122a07
movzx eax, byte [rdx + rbx + 0x88]
mov r8, qword [rbx + 0x48]
lea ecx, [rax + rax*2]
mov eax, dword [rbx + 0x50]
sub eax, r8d
shl ecx, 2
cmp eax, ecx
jb 0x101229fc
mov eax, ecx
add rax, r8
mov qword [rbx + 0x48], rax
jmp 0x10122a07
mov rcx, rbx
call fcn.10122220
mov r8, rax
test r8, r8
je 0x10122c13
mov r9d, dword [rdi + 4]
mov r10, r8
mov rdx, r8
add r9, qword [rbx + 0x40]
sub r10, r9
lea rcx, [r9 + 8]
nop
nop
nop
mov eax, dword [rcx - 8]
add rcx, 0xc
add rdx, 0xc
add esi, 0xffffffff
mov dword [rdx - 0xc], eax
mov eax, dword [rcx - 0x10]
mov dword [rdx - 8], eax
mov eax, dword [rcx - 0xc]
mov dword [r10 + rcx - 0xc], eax
jne 0x10122a30
mov eax, dword [rbx + r12*4 + 0x130]
mov esi, dword [rsp + 0x20]
mov dword [r9], eax
sub r9d, dword [rbx + 0x40]
mov dword [rbx + r12*4 + 0x130], r9d
sub r8d, dword [rbx + 0x40]
mov dword [rdi + 4], r8d
jmp 0x10122a7a
mov esi, dword [rsp + 0x20]
movzx r8d, word [rdi + 2]
xor edx, edx
lea eax, [rbp*8]
cmp r8d, eax
lea eax, [rbp*4]
setbe dl
xor ecx, ecx
cmp eax, r14d
setbe cl
lea eax, [rbp + rbp]
and edx, ecx
cmp eax, r14d
adc r8d, 0
lea r9d, [r8 + rdx*2]
jmp 0x10122b52
mov eax, dword [rbx + 0x130]
test eax, eax
je 0x10122acd
lea rdx, [r9 + rax]
mov eax, dword [r9 + rax]
mov dword [rbx + 0x130], eax
jmp 0x10122aff
movzx eax, byte [rbx + 0x88]
mov rdx, qword [rbx + 0x48]
lea ecx, [rax + rax*2]
mov eax, dword [rbx + 0x50]
sub eax, edx
shl ecx, 2
cmp eax, ecx
jb 0x10122af2
mov eax, ecx
add rax, rdx
mov qword [rbx + 0x48], rax
jmp 0x10122aff
xor edx, edx
mov rcx, rbx
call fcn.10122220
mov rdx, rax
test rdx, rdx
je 0x10122c13
movzx ecx, byte [rdi + 2]
movzx r8d, byte [rdi + 3]
mov eax, edx
mov byte [rdx], cl
movzx ecx, word [rdi + 4]
mov word [rdx + 2], cx
movzx ecx, word [rdi + 6]
mov word [rdx + 4], cx
sub eax, dword [rbx + 0x40]
cmp r8d, 0x1e
mov dword [rdi + 4], eax
jae 0x10122b36
add r8d, r8d
jmp 0x10122b3c
mov r8d, 0x78
xor r9d, r9d
cmp r14d, 3
mov byte [rdx + 1], r8b
seta r9b
add r9d, dword [rbx + 0x1c]
add r9d, r8d
mov eax, dword [rdi + 4]
lea rcx, [rbp + rbp*2]
inc bp
lea r11, [rax + rcx*2]
mov rcx, qword [rbx + 0x10]
lea eax, [r9 + 6]
movzx r10d, byte [rcx + 1]
add r11, qword [rbx + 0x40]
lea r8d, [r9 + rsi]
imul r10d, eax
movzx eax, byte [rcx]
add r10d, r10d
mov byte [r11], al
mov word [rdi], bp
mov eax, r13d
shr eax, 0x10
mov word [r11 + 2], r13w
mov word [r11 + 4], ax
lea eax, [r8 + r8*2]
add eax, eax
cmp r10d, eax
jae 0x10122bc3
xor ecx, ecx
lea eax, [r8*4]
cmp r10d, eax
setae cl
xor eax, eax
cmp r10d, r8d
seta al
add r9d, 3
lea edx, [rcx + rax + 1]
jmp 0x10122bf5
xor edx, edx
mov eax, r8d
imul eax, eax, 0xf
cmp r10d, eax
lea eax, [r8 + r8*2]
setae dl
xor ecx, ecx
shl eax, 2
cmp r10d, eax
lea eax, [r8 + r8*8]
setae cl
add edx, ecx
xor ecx, ecx
cmp r10d, eax
setae cl
lea edx, [rdx + rcx + 4]
add r9d, edx
mov word [rdi + 2], r9w
mov byte [r11 + 1], dl
mov r9, qword [rbx + 0x40]
mov edi, dword [rdi + 8]
add rdi, r9
cmp rdi, r15
jne 0x10122980
jmp 0x10122c1b
mov rcx, rbx
call fcn.10122390
mov rbp, qword [rsp + 0x68]
mov r12, qword [rsp + 0x50]
mov r14, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x78]
mov r15, qword [rsp + 0x38]
mov r13, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x60]
add rsp, 0x58
ret