Function at 0x598124
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 2
xor ebx, ebx
mov eax, dword [esi + 0x1064]
pop edi
mov dword [esi + 0x109c], eax
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov dword [esi + 0x1068], ebx
mov dword [esi + 0x106c], 0x18
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 2
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 1
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
lea eax, [ebp + 8]
push 4
push eax
push esi
mov byte [ebp + 8], bl
mov byte [ebp + 9], bl
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 0x14
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 3
call fcn.0059688f
add esp, 0x48
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
push edi
push eax
push esi
call fcn.0059688f
lea eax, [ebp + 8]
push 4
push eax
push esi
mov byte [ebp + 8], bl
mov byte [ebp + 9], bl
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 0x1a
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 6
lea eax, [ebp + 0xa]
push edi
push eax
push esi
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
add esp, 0x3c
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 4]
push 1
mov al, byte [esi + eax + 0x11c8]
mov byte [ebp + 0xb], al
lea eax, [ebp + 0xb]
push eax
push esi
call fcn.0059688f
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x598229
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 4
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], 7
mov byte [ebp + 0xb], 0x18
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], 0xc2
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], 1
mov byte [ebp + 0xb], bl
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 7
call fcn.0059688f
add esp, 0x48
lea eax, [ebp + 0xa]
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], 0xc2
push edi
push eax
push esi
call fcn.0059688f
add esp, 0xc
mov dword [ebp - 4], 0x20
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xf000
mov ecx, 0xffff
div ecx
push edi
mov eax, edx
mov byte [ebp + 0xb], dl
sar eax, 8
mov byte [ebp + 0xa], al
lea eax, [ebp + 0xa]
push eax
push esi
call fcn.0059688f
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x5982dd
or byte [ebp + 0xa], 0xff
or byte [ebp + 0xb], 0xff
lea eax, [ebp + 0xa]
push edi
push eax
push esi
call fcn.0059688f
lea eax, [ebp + 0xa]
push edi
push eax
push esi
mov byte [ebp + 0xa], bl
mov byte [ebp + 0xb], bl
call fcn.0059688f
add esp, 0x18
mov dword [ebp - 4], 0x20
mov eax, dword [ebp - 4]
xor edx, edx
add eax, 0xf000
mov ecx, 0xffff
div ecx
push edi
mov eax, edx
mov byte [ebp + 0xb], dl
sar eax, 8
mov byte [ebp + 0xa], al
lea eax, [ebp + 0xa]
push eax
push esi
call fcn.0059688f
add esp, 0xc
inc dword [ebp - 4]
cmp dword [ebp - 4], 0x100
jl 0x598341
push 0xffff
push esi
call fcn.00597c06
pop ecx
pop ecx
push 0x20
pop edi
movzx ax, byte [esi + edi + 0x11c8]
sub eax, edi
add eax, 0x1000
movzx eax, ax
push eax
push esi
call fcn.00597c06
inc edi
pop ecx
cmp edi, 0x100
pop ecx
jl 0x598387
push 1
push esi
call fcn.00597c06
pop ecx
mov edi, 0xe0
pop ecx
push ebx
push esi
call fcn.00597c06
pop ecx
dec edi
pop ecx
jne 0x5983bb
push ebx
push esi
call fcn.00597c06
lea eax, [esi + 0x1094]
push eax
push esi
call fcn.00596e2e
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret