Function at 0x5f95a7
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0xc]
push ebx
xor ebx, ebx
mov dword [eax], ebx
mov eax, dword [ebp + 0x10]
mov dword [eax], ebx
mov eax, dword [ebp + 0x1c]
push esi
push edi
and al, 2
mov edi, ecx
cmp al, 2
push 0x76c148
push 0x4b8
mov dword [ebp - 4], edi
mov dword [edi], ebx
sete byte [ebp + 0x1f]
call fcn.00675801
pop ecx
pop ecx
cmp eax, ebx
je 0x5f95ec
mov ecx, eax
call fcn.005f9536
mov esi, eax
jmp 0x5f95ee
xor esi, esi
cmp esi, ebx
jne 0x5f95fd
mov dword [edi], 1
jmp 0x5f98d6
push 0x400
lea eax, [esi + 4]
push ebx
push eax
call fcn.005b8ac0
lea ebx, [esi + 0x438]
push ebx
push dword [ebp + 8]
call fcn.006195cc
add esp, 0x14
test eax, eax
je 0x5f98c2
push ebx
call fcn.006197b4
movzx eax, ax
push ebx
mov dword [esi + 0x42c], eax
call fcn.006197cf
movsx edx, byte [esi + 0x43b]
pop ecx
pop ecx
movzx ecx, ax
movsx eax, byte [esi + 0x479]
imul eax, edx
mov dword [esi + 0x430], ecx
mov dword [esi + 0x404], eax
test eax, eax
je 0x5f98c2
cmp eax, 0x20
jg 0x5f98c2
cmp dword [esi + 0x42c], 0
je 0x5f98c2
test ecx, ecx
je 0x5f98c2
cmp byte [ebp + 0x1f], 0
mov edx, dword [ebp + 0x18]
jne 0x5f96b3
mov eax, dword [edx]
dec eax
je 0x5f96c0
sub eax, 7
je 0x5f96c0
sub eax, 0x10
je 0x5f96c0
mov ecx, esi
call fcn.005f955f
push esi
call fcn.004b70f1
mov dword [edi], 5
jmp 0x5f98d5
mov dword [edx], eax
cmp eax, 4
jne 0x5f96c0
mov dword [edx], 8
mov eax, dword [edx]
mov ecx, dword [esi + 0x404]
mov dword [esi], eax
cmp ecx, dword [edx]
jle 0x5f96e6
mov ecx, esi
call fcn.005f955f
push esi
call fcn.004b70f1
mov dword [edi], 0x1c
jmp 0x5f98d5
xor edi, edi
cmp ecx, 0x18
jl 0x5f96f3
and dword [ebp + 0x18], edi
inc edi
jmp 0x5f96fb
inc edi
mov eax, edi
shl eax, cl
mov dword [ebp + 0x18], eax
mov eax, dword [esi + 0x42c]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
mov eax, dword [esi + 0x430]
mov ecx, dword [ebp + 0x10]
push ebx
mov dword [ecx], eax
call fcn.006197ea
pop ecx
test eax, eax
je 0x5f9730
lea eax, [esi + 4]
push eax
push ebx
push dword [ebp + 8]
call fcn.00619a34
add esp, 0xc
test eax, eax
jne 0x5f9749
xor ecx, ecx
lea eax, [esi + 5]
mov byte [eax + 1], cl
mov byte [eax], cl
mov byte [eax - 1], cl
inc ecx
add eax, 4
cmp ecx, 0x100
jl 0x5f9735
cmp dword [esi + 0x404], 8
jge 0x5f97df
cmp byte [esi + 0x479], 1
jne 0x5f9781
cmp byte [esi + 0x43b], 1
jne 0x5f9781
push 2
mov word [esi + 4], 0
mov byte [esi + 6], 0
mov word [esi + 8], 0xffff
mov byte [esi + 0xa], 0xff
pop edx
jmp 0x5f97bb
mov edi, dword [ebp + 0x18]
xor edx, edx
test edi, edi
jle 0x5f97bb
lea ecx, [esi + 5]
lea eax, [esi + 0x449]
mov dword [ebp + 0x18], edi
mov edx, edi
mov bl, byte [eax + 1]
mov byte [ecx + 1], bl
mov bl, byte [eax]
mov byte [ecx], bl
mov bl, byte [eax - 1]
mov byte [ecx - 1], bl
add eax, 3
add ecx, 4
dec dword [ebp + 0x18]
jne 0x5f9798
cmp edi, 0x100
jge 0x5f97dc
mov edi, 0x100
lea ebx, [esi + edx*4 + 4]
sub edi, edx
push 4
lea eax, [esi + 4]
push eax
push ebx
call dword [0x76bd44]
add esp, 0xc
add ebx, 4
dec edi
jne 0x5f97c6
xor edi, edi
inc edi
cmp dword [esi], 8
ja 0x5f97f9
push 0x400
lea eax, [esi + 4]
push eax
push dword [ebp + 0x14]
call dword [0x76bd44]
add esp, 0xc
mov eax, dword [esi + 0x42c]
imul eax, eax, 3
push eax
lea ecx, [esi + 0x420]
call fcn.005fd4d0
xor ebx, ebx
cmp dword [esi + 0x424], ebx
jne 0x5f982f
mov eax, dword [ebp - 4]
mov ecx, esi
mov dword [eax], edi
call fcn.005f955f
push esi
call fcn.004b70f1
jmp 0x5f98d5
lea eax, [esi + 0x438]
push eax
call fcn.00619a21
pop ecx
push eax
lea ecx, [esi + 0x414]
call fcn.005fd4d0
cmp dword [esi + 0x418], ebx
je 0x5f9818
push dword [ebp + 8]
call fcn.00619819
pop ecx
test eax, eax
je 0x5f9818
mov ecx, dword [esi + 0x404]
push 8
pop eax
cdq
idiv ecx
mov dword [esi + 0x408], edi
mov dword [esi + 0x434], ebx
mov dword [esi + 0x40c], eax
cmp ecx, 0x18
je 0x5f989d
lea eax, [ecx - 1]
xor edx, edx
test eax, eax
jle 0x5f989d
mov eax, edi
inc edx
lea ebx, [ecx - 1]
lea eax, [eax + eax + 1]
mov dword [esi + 0x408], eax
cmp edx, ebx
jl 0x5f988b
cmp ecx, edi
jne 0x5f98b5
mov word [esi + 4], 0
mov byte [esi + 6], 0
mov word [esi + 8], 0xffff
mov byte [esi + 0xa], 0xff
mov eax, dword [ebp + 8]
mov dword [esi + 0x410], eax
mov eax, esi
jmp 0x5f98d8
mov ecx, esi
call fcn.005f955f
push esi
call fcn.004b70f1
mov dword [edi], 0x16
pop ecx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0x18