Function at 0x5e3a10
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 0x1c
mov eax, dword [esi + 0x28c]
mov ecx, dword [esi + 0x290]
mov edx, dword [esi + 0x284]
push ebx
push edi
mov edi, dword [esi + 0x288]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 0x280]
mov dword [esp + 8], ecx
mov ecx, dword [esi + 0x314]
lea ebx, [esi + 8]
push ebx
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ecx
call fcn.005e2d60
add esp, 4
test eax, eax
jne 0x5e3a68
pop edi
mov eax, 2
pop ebx
add esp, 0x1c
ret
push ebp
cmp edi, dword [esp + 0x2c]
jae 0x5e3bf2
mov ecx, dword [esp + 0xc]
test ecx, ecx
jbe 0x5e3bf2
mov eax, dword [ebx + 0xc]
cmp eax, 2
jb 0x5e3c12
mov eax, dword [ebx + 4]
cmp eax, 0x10
jb 0x5e3ab9
mov ecx, dword [ebx + 8]
movzx ebp, word [ecx]
movzx edx, word [ebx + 2]
xor eax, 0x10
mov dword [ebx + 4], eax
mov eax, dword [ebx + 0xc]
shl ebp, 0x10
or edx, ebp
add eax, 0xfffffffe
add ecx, 2
mov dword [ebx], edx
mov dword [ebx + 0xc], eax
mov dword [ebx + 8], ecx
mov ebp, dword [ebx]
mov ecx, dword [ebx + 4]
mov eax, ebp
shr eax, cl
and eax, dword [0x6d72cc]
movzx ecx, byte [esi + eax*4 + 0x294]
add dword [ebx + 4], ecx
movzx edx, word [esi + eax*4 + 0x296]
mov ecx, dword [ebx + 4]
lea eax, [esi + eax*4 + 0x294]
cmp edx, 0x10
jae 0x5e3b2b
mov dword [esp + 0x10], 0
test edx, edx
je 0x5e3b25
mov eax, dword [esi + edx*4 + 0x8b8]
mov ecx, dword [esp + 0x1c]
mov word [ecx + eax*2], di
mov eax, 0x8000
mov ecx, edx
shr eax, cl
mov dword [esi + edx*4 + 0x8b8], edi
mov dword [esp + 0x18], edx
sub dword [esp + 0xc], eax
inc word [esi + edx*2 + 0x94a]
inc edi
jmp 0x5e3be8
xor eax, eax
cmp edx, 0x10
setne al
shr ebp, cl
mov ecx, dword [eax*4 + 0x6d72c0]
and ecx, ebp
mov ebp, dword [ebx + 4]
add eax, 2
add ebp, eax
xor eax, eax
mov dword [ebx + 4], ebp
mov dword [esp + 0x20], ecx
mov ebp, 3
cmp edx, 0x10
jne 0x5e3b60
mov eax, dword [esp + 0x18]
lea ebp, [edx - 0xe]
cmp dword [esp + 0x14], eax
je 0x5e3b6e
xor edx, edx
mov dword [esp + 0x14], eax
jmp 0x5e3b72
mov edx, dword [esp + 0x10]
mov dword [esp + 0x24], edx
test edx, edx
jbe 0x5e3b89
mov ecx, ebp
add edx, 0xfffffffe
shl edx, cl
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x10], edx
lea eax, [edx + ecx + 3]
mov dword [esp + 0x10], eax
sub eax, dword [esp + 0x24]
lea edx, [eax + edi]
cmp edx, dword [esp + 0x2c]
ja 0x5e3c08
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x5e3be6
mov ecx, dword [esi + ecx*4 + 0x8b8]
add ecx, ecx
nop
mov ebp, dword [esp + 0x1c]
mov word [ecx + ebp], di
mov ebp, edi
lea ecx, [edi + edi]
inc edi
cmp edi, edx
jne 0x5e3bb0
mov edx, dword [esp + 0x14]
mov dword [esi + edx*4 + 0x8b8], ebp
mov ecx, 0xf
sub ecx, edx
mov ebp, eax
shl ebp, cl
sub dword [esp + 0xc], ebp
add word [esi + edx*2 + 0x94a], ax
jmp 0x5e3be8
mov edi, edx
cmp edi, dword [esp + 0x2c]
jb 0x5e3a73
mov eax, dword [esp + 0xc]
pop ebp
pop edi
mov dword [esi + 0x290], eax
mov eax, 1
pop ebx
add esp, 0x1c
ret
mov dword [esp + 0xc], 0xfffff
jmp 0x5e3bf2
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x18]
pop ebp
mov dword [esi + 0x288], edi
mov dword [esi + 0x28c], edx
mov edx, dword [esp + 0x10]
pop edi
mov dword [esi + 0x284], eax
mov dword [esi + 0x280], edx
mov dword [esi + 0x290], ecx
mov eax, 2
pop ebx
add esp, 0x1c
ret