Function at 0x541970
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp + 8]
mov dword [eax + 0x24c], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
mov dword [edx + 0x250], eax
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x248], 0
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x1ec], 0
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x1e8], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x24c]
mov dword [ecx + 0x240], eax
mov ecx, dword [ebp - 0x20]
mov edx, 1
mov ecx, dword [ecx + 0x240]
shl edx, cl
sub edx, 1
mov eax, dword [ebp - 0x20]
mov word [eax + 0x244], dx
mov ecx, 0x1000
mov word [ebp - 0xc], cx
mov ecx, dword [ebp + 8]
sub ecx, 1
mov edx, 1
shl edx, cl
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x254], edx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x254]
add edx, 1
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x258], edx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x254]
add edx, 2
mov eax, dword [ebp - 0x20]
mov word [eax + 0x246], dx
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x25c], 0
mov ecx, dword [ebp - 0x20]
call fcn.005416e0
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], 0x138b
jmp 0x541a61
mov edx, dword [ebp - 0x14]
shl edx, 1
mov dword [ebp - 0x14], edx
cmp dword [ebp - 0x14], 0x10000
jge 0x541a75
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
jmp 0x541a59
mov ecx, 8
sub ecx, dword [ebp - 4]
mov dword [ebp - 4], ecx
push 0x138b
mov ecx, dword [ebp - 0x20]
call fcn.00541eb0
mov edx, dword [ebp - 0x20]
movzx eax, word [edx + 0x254]
push eax
mov ecx, dword [ebp - 0x20]
call fcn.00541c60
mov ecx, dword [ebp - 0x20]
call fcn.005416e0
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0xffffffff
je 0x541c33
mov ecx, dword [ebp - 0x1c]
shl ecx, 0xc
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x14], ecx
movsx edx, word [ebp - 0x1c]
mov ecx, dword [ebp - 4]
shl edx, cl
xor edx, dword [ebp - 0x10]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x238]
mov edx, dword [ebp - 8]
mov eax, dword [ecx + edx*4]
cmp eax, dword [ebp - 0x14]
jne 0x541afb
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x23c]
mov eax, dword [ebp - 8]
movzx ecx, word [edx + eax*2]
mov dword [ebp - 0x10], ecx
jmp 0x541aa0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x238]
mov ecx, dword [ebp - 8]
cmp dword [eax + ecx*4], 0
jge 0x541b11
jmp 0x541b80
mov edx, 0x138b
sub edx, dword [ebp - 8]
mov dword [ebp - 0x18], edx
cmp dword [ebp - 8], 0
jne 0x541b29
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
jns 0x541b40
mov ecx, dword [ebp - 8]
add ecx, 0x138b
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x238]
mov ecx, dword [ebp - 8]
mov edx, dword [eax + ecx*4]
cmp edx, dword [ebp - 0x14]
jne 0x541b6c
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x23c]
mov edx, dword [ebp - 8]
movzx eax, word [ecx + edx*2]
mov dword [ebp - 0x10], eax
jmp 0x541aa0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x238]
mov eax, dword [ebp - 8]
cmp dword [edx + eax*4], 0
jle 0x541b80
jmp 0x541b29
movzx ecx, word [ebp - 0x10]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.00541c60
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0x20]
movsx ecx, word [eax + 0x246]
movsx edx, word [ebp - 0xc]
cmp ecx, edx
jge 0x541beb
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0x23c]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x20]
mov ax, word [eax + 0x246]
mov word [ecx + edx*2], ax
mov ecx, dword [ebp - 0x20]
mov dx, word [ecx + 0x246]
add dx, 1
mov eax, dword [ebp - 0x20]
mov word [eax + 0x246], dx
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x238]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x14]
mov dword [edx + eax*4], ecx
jmp 0x541c2e
push 0x138b
mov ecx, dword [ebp - 0x20]
call fcn.00541eb0
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0x254]
add eax, 2
mov ecx, dword [ebp - 0x20]
mov word [ecx + 0x246], ax
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x248], 1
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax + 0x254]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.00541c60
jmp 0x541aa0
movzx edx, word [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0x20]
call fcn.00541c60
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax + 0x258]
push ecx
mov ecx, dword [ebp - 0x20]
call fcn.00541c60
mov esp, ebp
pop ebp
ret 8