Function at 0x402b90
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x34], 8
mov dword [ebp - 0x38], edi
mov ecx, dword [edi + 0x24]
mov edx, dword [edi + 0x1c]
mov eax, dword [edi + 0x20]
mov ebx, dword [edi + 0x28]
mov esi, dword [edi + 0x2c]
mov dword [ebp - 0x10], ecx
mov ecx, dword [edi + 0x3c]
mov dword [ebp - 0x1c], edx
and edx, 0x7fff
mov dword [ebp - 0x14], ecx
mov ecx, dword [edi + 0x38]
mov dword [ebp - 4], eax
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x24], edx
nop dword [eax + eax]
mov edx, dword [edi + 0x88]
test edx, edx
jne 0x402bfe
cmp dword [edi + 0x80], edx
je 0x402cc9
test eax, eax
je 0x402cc9
mov ebx, dword [ebp - 0x1c]
mov ecx, edx
add ebx, eax
mov eax, 0x1000
sub eax, dword [ebp - 4]
and ebx, 0x7fff
cmp edx, eax
cmovae ecx, eax
sub edx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [edi + 0x88], edx
mov edx, dword [ebp - 4]
add edx, ecx
mov dword [ebp - 4], edx
test ecx, ecx
je 0x402c9e
nop
mov esi, 0x8000
lea eax, [ebx + 0x90]
sub esi, ebx
cmp esi, ecx
cmovae esi, ecx
add eax, edi
push esi
push dword [edi + 0x84]
push eax
call fcn.00447fa0
add esp, 0xc
cmp ebx, 0x101
jae 0x402c80
mov eax, 0x101
sub eax, ebx
cmp esi, eax
cmovb eax, esi
push eax
push dword [edi + 0x84]
lea eax, [edi + 0x8090]
add eax, ebx
push eax
call fcn.00447fa0
add esp, 0xc
mov ecx, dword [ebp - 0x2c]
add ebx, esi
add dword [edi + 0x84], esi
and ebx, 0x7fff
sub ecx, esi
mov dword [ebp - 0x2c], ecx
jne 0x402c30
mov esi, dword [ebp - 0x18]
mov edx, dword [ebp - 4]
mov eax, 0x8000
sub eax, edx
cmp eax, dword [ebp - 0x10]
cmovae eax, dword [ebp - 0x10]
cmp dword [edi + 0x80], 0
mov dword [ebp - 0x10], eax
jne 0x402cf3
cmp edx, 0x1000
jae 0x402cff
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x3c], eax
mov eax, 1
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], esi
mov dword [edi + 0x1c], edx
mov dword [edi + 0x38], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x10], eax
cmp edx, 4
jb 0x402f59
mov dword [ebp - 0x10], eax
lea eax, [edi + 0x1926a]
mov dword [ebp - 0x3c], eax
nop dword [eax + eax]
mov eax, dword [ebp - 0x24]
mov ebx, 1
add eax, 0x90
add eax, edi
mov dword [ebp - 0x30], eax
mov eax, dword [eax]
and eax, 0xffffff
mov ecx, eax
mov dword [ebp - 0x2c], eax
shr ecx, 0x11
xor ecx, eax
mov eax, dword [ebp - 0x1c]
and ecx, 0xfff
movzx eax, ax
movzx edx, word [edi + ecx*2 + 0x29272]
mov word [edi + ecx*2 + 0x29272], ax
sub eax, edx
movzx eax, ax
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0x10]
ja 0x402e86
and edx, 0x7fff
lea esi, [edx + 0x90]
add esi, edi
mov eax, dword [esi]
and eax, 0xffffff
cmp eax, dword [ebp - 0x2c]
jne 0x402e86
mov eax, dword [ebp - 0x30]
lea edi, [ebx + 0x1f]
movzx ebx, word [eax + 2]
add eax, 2
movzx edx, word [esi + 2]
cmp bx, dx
jne 0x402de3
movzx edx, word [eax + 2]
add eax, 2
movzx ecx, word [esi + 4]
mov bl, dl
mov byte [ebp - 0x28], cl
cmp dx, cx
jne 0x402de0
movzx edx, word [eax + 2]
add eax, 2
movzx ecx, word [esi + 6]
mov bl, dl
mov byte [ebp - 0x28], cl
cmp dx, cx
jne 0x402de0
movzx ecx, word [eax + 2]
add eax, 2
movzx edx, word [esi + 8]
add esi, 8
mov dword [ebp - 0x40], edx
mov bl, cl
cmp cx, dx
jne 0x402de3
movzx edx, word [esi]
sub edi, 1
jne 0x402d84
jmp 0x402de3
mov edx, dword [ebp - 0x28]
sub eax, dword [ebp - 0x30]
xor ecx, ecx
mov esi, dword [ebp - 0x20]
sar eax, 1
cmp bl, dl
sete cl
test edi, edi
mov edi, dword [ebp - 0x38]
lea eax, [ecx + eax*2]
jne 0x402e07
mov eax, esi
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x402e81
jne 0x402e1a
cmp esi, 0x2000
jae 0x402e81
mov ebx, dword [ebp - 4]
cmp eax, ebx
mov edx, dword [ebp - 0xc]
cmovb ebx, eax
dec esi
mov dword [ebp - 0x20], esi
mov dword [edx + 1], esi
mov esi, dword [ebp - 0x18]
lea eax, [ebx - 3]
mov byte [edx], al
mov al, byte [esi]
shr al, 1
or al, 0x80
mov byte [esi], al
mov eax, dword [ebp - 0x20]
and eax, 0x1ff
movzx ecx, byte [eax + 0x4826c0]
mov eax, dword [ebp - 0x20]
shr eax, 8
cmp dword [ebp - 0x20], 0x200
movzx eax, byte [eax + 0x4820b8]
cmovb eax, ecx
inc word [edi + eax*2 + 0x83d2]
movzx eax, word [ebx*2 + 0x4824ba]
inc word [edi + eax*2 + 0x8192]
mov eax, 3
jmp 0x402ea0
mov ebx, 1
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x18]
mov byte [edx], al
movzx eax, al
shr byte [esi], 1
inc word [edi + eax*2 + 0x8192]
mov eax, ebx
add edx, eax
mov eax, dword [ebp - 8]
sub eax, 1
mov ecx, eax
cmove eax, dword [ebp - 0x34]
test ecx, ecx
mov dword [ebp - 8], eax
mov eax, edx
cmovne eax, esi
mov esi, eax
lea eax, [edx + 1]
mov dword [ebp - 0xc], eax
mov ecx, eax
mov eax, dword [ebp - 0x10]
cmovne ecx, edx
add dword [ebp - 0x14], ebx
add eax, ebx
add dword [ebp - 0x1c], ebx
mov edx, 0x8000
cmp eax, edx
mov dword [ebp - 0x18], esi
mov dword [ebp - 0xc], ecx
cmovb edx, eax
mov eax, dword [ebp - 0x24]
add eax, ebx
mov dword [ebp - 0x10], edx
and eax, 0x7fff
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
sub eax, ebx
lea ebx, [edi + 0x1926a]
mov dword [ebp - 4], eax
cmp ecx, ebx
jbe 0x402f4e
mov ebx, dword [ebp - 0x1c]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x24], edx
xor edx, edx
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x28], ecx
mov ecx, edi
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x2c], esi
mov dword [edi + 0x38], eax
call fcn.00402640
mov ecx, eax
test ecx, ecx
jne 0x403041
mov eax, dword [edi + 0x3c]
mov esi, dword [edi + 0x2c]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x28]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x38]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x18], esi
cmp eax, 4
jae 0x402d10
jmp 0x402f65
lea eax, [edi + 0x1926a]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
test eax, eax
je 0x402be0
mov eax, dword [ebp - 0x24]
inc dword [ebp - 0x14]
mov dl, byte [eax + edi + 0x90]
lea eax, [ebx + 1]
mov byte [ebx], dl
shr byte [esi], 1
sub ecx, 1
mov edi, ecx
mov dword [ebp - 8], ecx
cmove edi, dword [ebp - 0x34]
test ecx, ecx
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x38]
cmovne eax, esi
mov esi, eax
neg ecx
movzx eax, dl
mov edx, dword [ebp - 0x1c]
sbb ecx, ecx
add ecx, 2
mov dword [ebp - 0x18], esi
add ebx, ecx
inc edx
inc word [edi + eax*2 + 0x8192]
mov ecx, 0x8000
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0xc], ebx
cmp eax, ecx
mov dword [ebp - 0x1c], edx
cmovb ecx, eax
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x10], ecx
and eax, 0x7fff
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 0x3c]
jbe 0x403031
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1c], edx
xor edx, edx
mov dword [edi + 0x24], ecx
mov ecx, edi
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 8]
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], esi
mov dword [edi + 0x38], eax
call fcn.00402640
mov ecx, eax
test ecx, ecx
jne 0x403041
mov eax, dword [edi + 0x3c]
mov ebx, dword [edi + 0x28]
mov esi, dword [edi + 0x2c]
mov ecx, dword [edi + 0x38]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x18], esi
mov dword [ebp - 8], ecx
jmp 0x403034
mov ecx, dword [ebp - 8]
test eax, eax
jne 0x402f73
jmp 0x402be0
xor eax, eax
test ecx, ecx
pop edi
pop esi
setns al
pop ebx
mov esp, ebp
pop ebp
ret