Function at 0x2102122b0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
xor eax, eax
mov edi, dword [rdx + 8]
mov rsi, qword [rdx]
mov rbp, qword [rsp + 0x118]
mov r12, qword [rsp + 0x130]
mov rdx, rdi
mov r13, rcx
mov ebx, r8d
mov r15d, r9d
test dh, dh
jns 0x2102122f6
xor edi, 0x8000
mov eax, 0x2d
mov r14d, dword [rsp + 0x120]
mov rdx, qword [rsp + 0x110]
and r14d, 0xffffffdf
mov word [rdx], ax
cmp r14d, 0x41
je 0x2102124d8
cmp r14d, 0x46
jne 0x210212430
mov qword [rsp + 0x20], rbp
lea rdx, [rsp + 0x70]
mov rcx, r13
mov r9d, ebx
lea rax, [rsp + 0x98]
mov r8d, 3
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x78], edi
call sym._ldtoa_r
movsxd rcx, ebx
mov qword [rsp + 0x90], rax
cmp byte [rax], 0x30
fldz
mov rdx, rax
jne 0x21021239c
mov qword [rsp + 0x40], rsi
fld st(0)
mov r8d, 1
mov dword [rsp + 0x48], edi
fld xword [rsp + 0x40]
fucompi st(1)
fstp st(0)
setp al
cmovne eax, r8d
test al, al
jne 0x2102126b0
mov eax, dword [rbp]
cdqe
add rax, rcx
add rdx, rax
mov qword [rsp + 0x40], rsi
mov dword [rsp + 0x48], edi
fld xword [rsp + 0x40]
fucompi st(1)
fstp st(0)
jp 0x2102124b8
jne 0x2102124b8
mov qword [rsp + 0x98], rdx
mov rax, qword [rsp + 0x90]
mov r9, rdx
sub r9, rax
mov rax, qword [rsp + 0x128]
mov rdx, r12
mov rcx, r13
lea r8, [rsp + 0x90]
mov dword [rax], r9d
movsxd rax, dword [rsp + 0x138]
movsxd r9, r9d
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], rax
call sym._mbsnrtowcs_r
mov rax, r12
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp r14d, 0x45
je 0x210212600
mov qword [rsp + 0x20], rbp
lea rdx, [rsp + 0x70]
mov r9d, ebx
mov rcx, r13
lea rax, [rsp + 0x98]
mov r8d, 2
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x78], edi
call sym._ldtoa_r
mov qword [rsp + 0x90], rax
cmp r14d, 0x47
jne 0x210212649
and r15d, 1
jne 0x210212649
mov r9, qword [rsp + 0x98]
jmp 0x2102123d7
lea rax, [r9 + 1]
mov qword [rsp + 0x98], rax
mov byte [r9], 0x30
mov r9, qword [rsp + 0x98]
cmp r9, rdx
jb 0x2102124a8
mov rax, qword [rsp + 0x90]
jmp 0x2102123d7
lea rcx, [rsp + 0x70]
lea rdx, [rsp + 0x60]
mov r8, rbp
mov dword [rsp + 0x68], edi
mov qword [rsp + 0x60], rsi
call sym.msys_2.0.dll_frexpl
fld xword [rsp + 0x70]
fmul dword [0x2102c8700]
fldz
fld st(0)
fxch st(2)
fucomi st(2)
fstp st(2)
jp 0x210212512
jne 0x210212512
mov dword [rbp], 1
fnstcw word [rsp + 0x5e]
fld dword [0x2102c8704]
lea edx, [rbx - 1]
cmp dword [rsp + 0x120], 0x61
lea rax, str.0123456789ABCDEF
lea r9, str.0123456789abcdef
movzx ecx, word [rsp + 0x5e]
cmovne r9, rax
mov rax, r12
or ch, 0xc
mov word [rsp + 0x5c], cx
jmp 0x210212568
fld st(1)
fxch st(1)
sub edx, 1
fucomi st(1)
fstp st(1)
jp 0x210212563
je 0x2102125a8
fxch st(2)
jmp 0x210212568
fxch st(2)
nop dword [rax]
fmul st(2), st(0)
fxch st(2)
mov r8, rax
add rax, 2
mov r10d, edx
fld st(0)
fldcw word [rsp + 0x5c]
fistp dword [rsp + 0x40]
fldcw word [rsp + 0x5e]
movsxd rcx, dword [rsp + 0x40]
fild dword [rsp + 0x40]
movzx ecx, word [r9 + rcx*2]
fsubp st(1)
mov word [rax - 2], cx
cmp edx, 0xffffffff
jne 0x210212550
fstp st(1)
fstp st(1)
jmp 0x2102125ac
fstp st(1)
fstp st(1)
fld dword [0x2102c8708]
fxch st(1)
fcomi st(1)
ja 0x210212660
fucompi st(1)
fstp st(0)
jp 0x2102125cf
jne 0x2102125cf
test byte [rsp + 0x40], 1
jne 0x210212664
test r10d, r10d
js 0x21021269a
lea edx, [r10 + 1]
movsxd rdx, edx
lea rdx, [rax + rdx*2]
nop dword [rax + rax]
add rax, 2
mov ecx, 0x30
mov word [rax - 2], cx
cmp rax, rdx
jne 0x2102125e8
jmp 0x21021269a
mov qword [rsp + 0x20], rbp
add ebx, 1
lea rdx, [rsp + 0x70]
mov rcx, r13
lea rax, [rsp + 0x98]
mov r9d, ebx
mov r8d, 2
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x8c]
mov qword [rsp + 0x28], rax
mov dword [rsp + 0x78], edi
call sym._ldtoa_r
mov qword [rsp + 0x90], rax
movsxd rdx, ebx
fldz
add rdx, rax
jmp 0x2102123a7
fstp st(0)
fstp st(0)
movzx edx, word [r9 + 0x1e]
cmp cx, dx
jne 0x210212688
nop
mov r10d, 0x30
sub r8, 2
mov word [r8 + 2], r10w
movzx ecx, word [r8]
cmp cx, dx
je 0x210212670
lea edx, [rcx + 1]
cmp cx, 0x39
jne 0x210212696
movzx edx, word [r9 + 0x14]
mov word [r8], dx
mov rbx, qword [rsp + 0x128]
sub rax, r12
sar rax, 1
mov dword [rbx], eax
jmp 0x210212411
mov eax, 1
sub eax, ebx
mov dword [rbp], eax
jmp 0x21021239f