Function at 0x408d00
Capabilities:
Encrypt data using rc4 prga

Disassembly:
sub esp, 8
push ebx
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, ebp
push edi
shl esi, 7
add esi, 0x521fc0
xor ebx, ebx
mov eax, dword [esi + 0x50]
mov edi, dword [esi + 0xc]
sub eax, 0x4000
mov ecx, eax
shl ecx, 5
sub ecx, eax
lea ecx, [ecx + ecx*2]
lea edx, [eax + ecx*4]
movsx eax, byte [edx*4 + 0x54b725]
lea ecx, [edx*4 + 0x54b6e0]
shl eax, 0x15
mov edx, eax
mov eax, dword [ecx + 0xc]
sub eax, edx
sub eax, edi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esi + 0x14], eax
mov eax, dword [ecx + 0xf4]
lea edx, [eax + eax*4]
lea eax, [eax + edx*2]
lea eax, [eax + eax*4]
shl eax, 0x10
mov edx, eax
mov eax, dword [ecx + 0x10]
sub eax, edx
mov edx, dword [ecx + 0x7c]
cmp edx, ebx
je 0x408d7c
add eax, 0x280000
mov edx, dword [0x520f20]
shl edx, 4
and edx, 0x3ff
mov edx, dword [edx*4 + 0x573b20]
shl edx, 2
sub eax, edx
mov edx, dword [esi + 0x10]
sub eax, edx
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
mov dword [esi + 0x18], eax
mov eax, dword [ecx + 0x120]
cmp eax, ebx
jle 0x408db7
inc dword [esi + 0x60]
jmp 0x408dba
mov dword [esi + 0x60], ebx
cmp dword [esi + 0x60], 0x118
jl 0x408dcc
mov byte [esi + 0x41], 0x1c
mov dword [esi + 0x58], ebx
jmp 0x408dfa
mov ebx, dword [esi + 0x14]
mov al, byte [ecx + 0x45]
mov ecx, dword [esi + 0x18]
add edi, ebx
mov dword [esi + 0xc], edi
mov edi, dword [esi + 0x10]
add edi, ecx
mov byte [esi + 0x45], al
mov dword [esi + 0x10], edi
mov edx, dword [0x574b44]
mov ecx, edi
lea eax, [edx - 0xc0000]
cmp ecx, eax
jle 0x408dfa
mov dword [esi + 0x10], eax
mov edx, dword [esi + 0x24]
inc edx
mov eax, edx
mov dword [esi + 0x24], edx
cmp eax, 0x8c
jle 0x408f7d
test al, 7
jne 0x408f7d
mov dword [esp + 0x10], 1
mov ebx, 0x522080
jmp 0x408e29
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebx - 0x40]
test eax, eax
je 0x408f10
mov al, byte [ebx]
and al, 0x10
cmp al, 0x10
jne 0x408f10
mov edi, dword [ebx - 0x34]
mov eax, dword [esi + 0xc]
mov ecx, dword [ebx - 0x30]
mov edx, dword [esi + 0x10]
sub edi, eax
sub ecx, edx
cmp word [esi + 0x36], 0x13
jne 0x408ea6
cmp ecx, 0x20000
jle 0x408f10
cmp ecx, 0x960000
jge 0x408f10
test edi, edi
mov ebp, edi
jg 0x408e77
neg ebp
mov eax, ecx
cdq
and edx, 0xffff
add edx, eax
mov eax, ebp
sar edx, 0x10
mov dword [esp + 0x14], edx
mov ebp, dword [esp + 0x14]
cdq
idiv ebp
cmp eax, 0x9c40
jle 0x408f10
cmp eax, 0x13880
jl 0x408f2d
jmp 0x408f10
cmp ecx, 0xfff00000
jle 0x408f10
cmp ecx, 0x400000
jge 0x408f10
mov al, byte [esi + 0x45]
test al, al
jle 0x408ec3
test edi, edi
jg 0x408ec9
test al, al
jge 0x408f10
test edi, edi
jge 0x408f10
push 1
push ebp
call fcn.00422de0
add esp, 8
test eax, eax
jle 0x408ee4
mov ecx, dword [esi + 0x50]
shl eax, 7
mov dword [eax + 0x521ff0], ecx
push 1
push ebp
call fcn.00422de0
add esp, 8
test eax, eax
jle 0x408f09
mov edx, dword [esi + 0x50]
shl eax, 7
mov dword [eax + 0x521ff0], edx
mov dword [eax + 0x521fd8], 0x18000
mov dword [esi + 0x24], 0x69
mov edx, dword [esp + 0x10]
add ebx, 0x80
inc edx
cmp ebx, 0x532000
mov dword [esp + 0x10], edx
jl 0x408e25
jmp 0x408f7d
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
mov edi, eax
mov eax, ecx
cdq
and edx, 0x1f
add eax, edx
sar edi, 5
sar eax, 5
test edi, edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], eax
jge 0x408f55
mov byte [esi + 0x45], 0xff
jmp 0x408f59
mov byte [esi + 0x45], 1
mov edx, dword [esp + 0x10]
xor eax, eax
mov ax, word [esi + 0x36]
mov dword [esi + 0x24], 0
mov byte [esi + 0x41], 0x16
mov cx, word [eax*2 + 0x514a40]
mov dword [esi + 0x58], edx
mov word [esi + 0x34], cx
xor eax, eax
mov ax, word [esi + 0x36]
mov cx, word [eax*2 + 0x514a40]
add cx, 9
mov word [esi + 0x34], cx
mov al, byte [0x520f20]
test al, 7
jne 0x409038
mov al, byte [esi + 0x3c]
xor edx, edx
inc al
mov byte [esi + 0x3c], al
mov cl, al
xor eax, eax
mov ax, word [esi + 0x34]
shl eax, 3
movsx ecx, cl
mov dx, word [eax + 0x520f40]
cmp ecx, edx
jl 0x408fc7
mov byte [esi + 0x3c], 0
mov cl, byte [esi + 0x3c]
mov eax, dword [eax + 0x520f44]
movsx edx, cl
xor edi, edi
cmp cl, 6
mov di, word [eax + edx*2]
mov dword [esi + 0x28], edi
jne 0x409038
mov eax, dword [0x58bbb0]
push 0
mov cl, al
sub al, 0x2c
add cl, 4
and eax, 0xff
and ecx, 0xff
push 0x28
mov eax, dword [eax + 0x58be00]
mov dword [0x58bbb0], ecx
mov edx, dword [ecx + 0x58be00]
xor edx, eax
test al, 1
mov dword [ecx + 0x58be00], edx
je 0x409026
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0xc]
push 0x38
push edx
push eax
jmp 0x409030
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0xc]
push 0x39
push ecx
push edx
call fcn.00452de0
add esp, 0x14
mov eax, dword [esp + 0x1c]
push eax
call fcn.0042e050
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret