Function at 0x5e2110
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x434
mov eax, dword [0x9c48d0]
xor eax, esp
mov dword [esp + 0x430], eax
mov eax, dword [esp + 0x43c]
push ebx
mov ebx, edx
movzx edx, word [ebx + 0xa]
push ebp
mov ebp, dword [esp + 0x440]
push esi
movzx esi, word [ebx + 0x10]
mov dword [esp + 0x18], edx
movzx edx, word [ebx + 8]
mov dword [esp + 0x1c], ecx
xor ecx, ecx
push edi
mov dword [esp + 0x38], ebx
mov dword [esp + 0x30], ebp
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], esi
test esi, esi
jle 0x5e2228
mov al, byte [ebp + 0xf71]
mov bl, byte [ebp + 0xf70]
mov byte [esp + 0x10], al
dec esi
mov eax, esi
cdq
sub eax, edx
mov dl, byte [ebp + 0xf72]
mov byte [esp + 0x11], dl
movzx edx, dl
mov dword [esp + 0x3c], edx
movzx edx, byte [esp + 0x10]
mov dword [esp + 0x2c], edx
sar eax, 1
movzx edx, bl
mov byte [esp + 0x13], bl
mov dword [esp + 0x34], edx
mov dword [esp + 0x18], eax
mov ebp, eax
mov edi, eax
jmp 0x5e21b5
mov bl, byte [esp + 0x13]
mov eax, edi
cdq
idiv esi
add edi, dword [esp + 0x34]
inc ecx
sub bl, al
mov eax, ebp
cdq
idiv esi
mov dl, byte [esp + 0x10]
add ebp, dword [esp + 0x2c]
mov byte [esp + ecx*4 + 0x3c], bl
sub dl, al
mov eax, dword [esp + 0x18]
mov byte [esp + 0x12], dl
mov byte [esp + ecx*4 + 0x3d], dl
cdq
idiv esi
mov dl, byte [esp + 0x11]
sub dl, al
movzx eax, dl
mov byte [esp + ecx*4 + 0x3e], dl
lea edx, [eax + eax*4]
movzx eax, byte [esp + 0x12]
lea eax, [eax + eax*8]
add edx, eax
movzx eax, bl
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x3c]
add dword [esp + 0x18], eax
sar edx, 4
mov byte [esp + ecx*4 + 0x3f], dl
cmp ecx, dword [esp + 0x24]
jl 0x5e21b1
mov ebp, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
mov esi, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
mov eax, esi
cmp esi, 0x100
jge 0x5e225c
jmp 0x5e2240
mov byte [esp + eax*4 + 0x43], 0
mov byte [esp + eax*4 + 0x42], 0
mov byte [esp + eax*4 + 0x41], 0
mov byte [esp + eax*4 + 0x40], 0
inc eax
cmp eax, 0x100
jl 0x5e2240
cmp byte [ebp + 0xf74], 0
je 0x5e22c9
lea esi, [edx - 1]
test esi, esi
js 0x5e232b
cmp dword [ebx + 0x14], 0
jne 0x5e227d
mov ecx, ebx
call fcn.005b90a0
test esi, esi
js 0x5e229b
movzx ecx, word [ebx + 8]
cmp esi, ecx
jge 0x5e229b
movzx ecx, word [ebx + 0xe]
movzx edx, word [ebx + 0xc]
imul ecx, esi
add ecx, edx
add ecx, dword [ebx + 0x14]
jmp 0x5e22a5
movzx ecx, word [ebx + 0xc]
add ecx, dword [0x9c1168]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
push eax
mov eax, ebp
lea edi, [esp + 0x44]
call fcn.005e1e50
mov ecx, dword [esp + 0x24]
add dword [esp + 0x18], ecx
add esp, 4
dec esi
jns 0x5e2270
jmp 0x5e232b
xor esi, esi
test edx, edx
jle 0x5e232b
nop
cmp dword [ebx + 0x14], 0
jne 0x5e22dd
mov ecx, ebx
call fcn.005b90a0
test esi, esi
js 0x5e22fb
movzx edx, word [ebx + 8]
cmp esi, edx
jge 0x5e22fb
movzx ecx, word [ebx + 0xe]
movzx eax, word [ebx + 0xc]
imul ecx, esi
add ecx, eax
add ecx, dword [ebx + 0x14]
jmp 0x5e2305
movzx ecx, word [ebx + 0xc]
add ecx, dword [0x9c1168]
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esp + 0x20]
mov eax, ebp
lea edi, [esp + 0x44]
call fcn.005e1e50
mov eax, dword [esp + 0x24]
add dword [esp + 0x18], eax
inc esi
add esp, 4
cmp esi, dword [esp + 0x28]
jl 0x5e22d0
mov ecx, dword [esp + 0x440]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0065865c
add esp, 0x434
ret