Function at 0x54bb40
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push ebx
push esi
push edi
lea edi, [ebp - 0x114]
mov ecx, 0x45
mov eax, 0xcccccccc
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x14]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
cmp dword [edx + 4], ecx
jb 0x54bbaa
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
xor ecx, 1
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0xc]
mov dword [ecx], eax
jmp 0x54bbd8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
movzx ecx, word [eax]
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax + 4]
mov dword [ebp - 8], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 8], 0
jne 0x54bd96
mov eax, dword [ebp + 8]
cmp dword [eax + 0x20], 0
jne 0x54bd7c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 8]
and edx, 7
jne 0x54bcd8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
cmp dword [ecx + 0x40], 0
jl 0x54bc48
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [eax + 0x3c]
cmp eax, dword [edx + 0x40]
jl 0x54bc48
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov eax, dword [edx + 8]
or eax, 4
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
mov dword [edx + 8], eax
mov dword [ebp - 0x10c], 0xffffffff
jmp 0x54bcca
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x1c]
sub edx, 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ecx + 0x1c], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
cmp dword [eax + 0x1c], 0
jge 0x54bc82
push 1
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x18]
push edx
call fcn.00509e80
add esp, 8
mov dword [ebp - 0x110], eax
jmp 0x54bcbe
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x3c]
add edx, 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ecx + 0x3c], edx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x18]
mov ecx, dword [eax + 0x18]
movzx edx, byte [ecx]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [ecx + 0x18]
add edx, 1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov dword [ecx + 0x18], edx
mov edx, dword [ebp - 0x110]
mov dword [ebp - 0x10c], edx
mov eax, dword [ebp - 0x10c]
mov dword [ebp - 0x114], eax
jmp 0x54bce2
mov dword [ebp - 0x114], 0xffffffff
mov ecx, dword [ebp - 0x114]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x38], 0xffffffff
jne 0x54bd02
mov eax, dword [ebp + 8]
mov dword [eax + 0x20], 1
mov dword [ebp - 0x38], 0xff
mov eax, dword [ebp + 8]
mov cl, byte [eax + 0x1c]
mov byte [ebp - 0x41], cl
mov eax, dword [ebp + 8]
mov cl, byte [ebp - 0x38]
mov byte [eax + 0x1c], cl
movzx eax, byte [ebp - 0x41]
cmp eax, 0xff
jne 0x54bd60
cmp dword [ebp - 0x38], 0x8f
jle 0x54bd44
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xff00
mov edx, dword [ebp + 8]
mov dword [edx], ecx
mov eax, dword [ebp + 8]
mov dword [eax + 8], 8
jmp 0x54bd5e
mov eax, dword [ebp - 0x38]
shl eax, 9
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [eax + 8], 7
jmp 0x54bd7a
mov eax, dword [ebp - 0x38]
shl eax, 8
mov ecx, dword [ebp + 8]
add eax, dword [ecx]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [eax + 8], 8
jmp 0x54bd96
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
add ecx, 0xff00
mov edx, dword [ebp + 8]
mov dword [edx], ecx
mov eax, dword [ebp + 8]
mov dword [eax + 8], 8
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
shl ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
shl ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
sub ecx, 1
mov edx, dword [ebp + 8]
mov dword [edx + 8], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
and ecx, 0x8000
je 0x54bbd8
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
add esp, 0x114
cmp ebp, esp
call fcn.0055ce6c
mov esp, ebp
pop ebp
ret