Function at 0x10023ba0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x18]
sub esp, 0x28
push edi
mov edi, dword [eax + 4]
test edi, edi
jns 0x10023bd5
cmp dword [eax], 0
jg 0x10023bd5
push dword [ebp + 0xc]
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp + 0x10]
add eax, ecx
push eax
push ecx
call fcn.10022760
mov eax, dword [ebp + 8]
add esp, 0xc
mov dword [eax], edx
pop edi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
lea edx, [ebp - 0x14]
mov ecx, dword [ebp + 0x14]
push esi
add ecx, eax
mov dword [ebp - 0x20], eax
push edx
push ecx
push eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.1002e2f0
mov dword [ebp - 0x18], eax
add esp, 0xc
mov eax, dword [ebp - 0x20]
xor esi, esi
mov byte [ebp - 0x10], 0
cmp eax, dword [ebp - 0x1c]
je 0x10023c73
mov dword [ebp - 8], esi
cmp esi, edi
jne 0x10023c1f
test edi, edi
jns 0x10023c73
mov edx, dword [ebp - 0x14]
mov ecx, 1
mov eax, 0x100ad9f0
nop dword [eax]
cmp edx, dword [eax]
jb 0x10023c46
add eax, 4
xor ecx, 3
cmp eax, 0x100ada60
jne 0x10023c30
mov ecx, 1
mov eax, 0x7fffffff
sub eax, ecx
cmp eax, esi
jl 0x10023d1a
add esi, ecx
cmp esi, edi
jle 0x10023c63
test edi, edi
jns 0x10023d12
lea ecx, [ebp - 0x20]
call fcn.1002c7d0
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jne 0x10023c14
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0x10]
xor edi, edi
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 4], eax
mov al, byte [edx + 9]
test al, al
movzx edx, al
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x10], 1
cmove edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
mov edx, dword [eax]
mov dword [ebp - 8], edi
cmp esi, edx
jge 0x10023cdb
mov eax, dword [ebp - 0x10]
movzx eax, al
sub eax, 1
je 0x10023d35
sub eax, 1
je 0x10023d2c
sub eax, 1
jne 0x10023cdb
mov eax, edx
sub eax, esi
cdq
sub eax, edx
mov edx, dword [ebp + 0x18]
sar eax, 1
mov dword [ebp - 4], eax
mov edi, dword [edx]
sub edi, eax
sub edi, esi
mov dword [ebp - 8], edi
mov esi, dword [ebp + 0x18]
lea eax, [esi + 0xf]
mov dword [ebp + 0x18], eax
mov edx, eax
movzx eax, byte [esi + 0xe]
mov esi, dword [ebp - 4]
test esi, esi
jle 0x10023d48
mov edi, edx
add eax, edi
mov dword [ebp - 4], eax
push ecx
push eax
push edi
call fcn.10022760
mov eax, dword [ebp - 4]
dec esi
add esp, 0xc
mov ecx, edx
test esi, esi
jg 0x10023cf8
mov edi, dword [ebp - 8]
jmp 0x10023d4d
mov esi, dword [ebp - 8]
jmp 0x10023c73
test edi, edi
jns 0x10023c73
mov esi, 0x7fffffff
jmp 0x10023c79
mov eax, edx
sub eax, esi
mov dword [ebp - 4], eax
jmp 0x10023cdb
mov edi, edx
sub edi, esi
mov esi, dword [ebp + 0x18]
lea eax, [esi + 0xf]
mov dword [ebp + 0x18], eax
mov edx, eax
movzx eax, byte [esi + 0xe]
add eax, edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0xc]
sub edx, eax
push ecx
add edx, eax
push edx
push eax
call fcn.10022760
add esp, 0xc
test edi, edi
jle 0x10023d82
mov esi, dword [ebp + 0x18]
nop dword [eax]
push edx
push dword [ebp - 4]
push esi
call fcn.10022760
dec edi
add esp, 0xc
test edi, edi
jg 0x10023d70
mov eax, dword [ebp + 8]
pop esi
pop edi
mov dword [eax], edx
mov esp, ebp
pop ebp
ret