Function at 0x404bb0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 0x1c]
mov esi, dword [edi + 0x38]
mov ebx, dword [edi + 0x28]
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x20]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x24]
mov dword [ebp - 0x14], eax
mov eax, dword [edi + 0x3c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
and eax, 0x7fff
mov dword [ebp - 4], esi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x20], eax
lea ecx, [ecx]
mov eax, dword [edi + 0x88]
test eax, eax
jne 0x404c0e
cmp dword [edi + 0x80], eax
je 0x404fd0
test edx, edx
je 0x404fd0
mov esi, dword [ebp - 0xc]
mov eax, 0x1000
mov ebx, dword [edi + 0x88]
add esi, edx
sub eax, edx
and esi, 0x7fff
cmp ebx, eax
cmovb eax, ebx
sub ebx, eax
mov dword [ebp - 0x2c], eax
add edx, eax
mov dword [edi + 0x88], ebx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x1c], edx
test eax, eax
je 0x404cbb
mov ebx, eax
mov eax, 0x8000
mov ecx, ebx
sub eax, esi
cmp eax, ebx
cmovb ecx, eax
lea eax, [edi + 0x90]
push ecx
push dword [edi + 0x84]
add eax, esi
mov dword [ebp - 0x24], ecx
push eax
call dword [0x410a7c]
add esp, 0xc
cmp esi, 0x101
jae 0x404c9d
mov eax, 0x101
sub eax, esi
cmp dword [ebp - 0x24], eax
cmovb eax, dword [ebp - 0x24]
push eax
push dword [edi + 0x84]
lea eax, [edi + 0x8090]
add eax, esi
push eax
call dword [0x410a7c]
add esp, 0xc
mov eax, dword [ebp - 0x24]
add esi, eax
add dword [edi + 0x84], eax
and esi, 0x7fff
sub ebx, eax
jne 0x404c44
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x14]
mov eax, 0x8000
sub eax, edx
cmp eax, esi
cmovb esi, eax
cmp dword [edi + 0x80], 0
mov dword [ebp - 0x14], esi
jne 0x404ce2
cmp edx, 0x1000
jb 0x404fcd
mov esi, dword [ebp - 4]
cmp edx, 4
jb 0x404f09
mov edi, edi
mov eax, dword [ebp - 0x20]
mov edx, 1
mov ecx, dword [ebp - 0xc]
add eax, 0x90
add eax, edi
mov dword [ebp - 0x28], eax
mov ebx, dword [eax]
and ebx, 0xffffff
mov eax, ebx
mov dword [ebp - 0x24], ebx
shr eax, 0x11
xor eax, ebx
and eax, 0xfff
movzx ebx, word [edi + eax*2 + 0x29272]
mov word [edi + eax*2 + 0x29272], cx
mov eax, ecx
mov ecx, dword [ebp - 0x10]
sub eax, ebx
movzx eax, ax
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
cmp eax, dword [ebp - 0x14]
ja 0x404e4e
mov eax, dword [ebp - 0x30]
and eax, 0x7fff
add eax, 0x90
add eax, edi
mov ecx, dword [eax]
and ecx, 0xffffff
cmp ecx, dword [ebp - 0x24]
jne 0x404e4b
mov edx, dword [ebp - 0x28]
mov esi, 0x20
mov cx, word [edx + 2]
add edx, 2
add eax, 2
cmp cx, word [eax]
jne 0x404daf
mov cx, word [edx + 2]
add edx, 2
add eax, 2
cmp cx, word [eax]
jne 0x404daf
mov cx, word [edx + 2]
add edx, 2
add eax, 2
cmp cx, word [eax]
jne 0x404daf
mov cx, word [edx + 2]
add edx, 2
add eax, 2
cmp cx, word [eax]
jne 0x404daf
dec esi
jne 0x404d70
mov cl, byte [edx]
mov dword [ebp - 8], esi
mov esi, edx
sub esi, dword [ebp - 0x28]
xor edx, edx
sar esi, 1
cmp cl, byte [eax]
sete dl
cmp dword [ebp - 8], 0
lea eax, [edx + esi*2]
mov esi, dword [ebp - 0x2c]
jne 0x404dd9
mov eax, esi
neg eax
sbb eax, eax
and eax, 0x102
cmp eax, 3
jb 0x404e43
jne 0x404de8
cmp esi, 0x2000
jae 0x404e43
mov edx, dword [ebp - 0x1c]
cmp eax, edx
mov ecx, dword [ebp - 0x10]
cmovb edx, eax
dec esi
mov word [ebx + 1], si
lea eax, [edx - 3]
mov byte [ebx], al
add ebx, 3
mov al, byte [ecx]
shr al, 1
or al, 0x80
mov byte [ecx], al
mov eax, esi
and eax, 0x1ff
movzx ecx, byte [eax + 0x40e230]
mov eax, esi
shr eax, 8
cmp esi, 0x200
mov esi, dword [ebp - 4]
movzx eax, byte [eax + 0x40e1b0]
cmovb eax, ecx
mov ecx, dword [ebp - 0x10]
inc word [edi + eax*2 + 0x83d2]
movzx eax, word [edx*2 + str.h_A]
jmp 0x404e59
mov esi, dword [ebp - 4]
mov edx, 1
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
mov byte [ebx], al
inc ebx
shr byte [ecx], 1
movzx eax, al
inc word [edi + eax*2 + 0x8192]
dec esi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], esi
jne 0x404e7a
mov ecx, ebx
mov dword [ebp - 4], 8
inc ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x14]
mov esi, 0x8000
add dword [ebp - 0x18], edx
add eax, edx
add dword [ebp - 0xc], edx
cmp eax, esi
cmovb esi, eax
mov eax, dword [ebp - 0x20]
add eax, edx
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 4]
and eax, 0x7fff
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
sub eax, edx
lea edx, [edi + 0x1926a]
mov dword [ebp - 0x1c], eax
cmp ebx, edx
jbe 0x404efd
mov edx, dword [ebp - 0xc]
mov dword [edi + 0x20], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1c], edx
xor edx, edx
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x2c], ecx
mov ecx, edi
mov dword [edi + 0x3c], eax
mov dword [edi + 0x28], ebx
mov dword [edi + 0x38], esi
call fcn.00404690
mov ecx, eax
test ecx, ecx
jne 0x404ffa
mov eax, dword [edi + 0x3c]
mov ebx, dword [edi + 0x28]
mov ecx, dword [edi + 0x2c]
mov esi, dword [edi + 0x38]
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], esi
mov edx, dword [ebp - 0x1c]
cmp edx, 4
jae 0x404cf0
test edx, edx
je 0x404bf0
mov eax, dword [ebp - 0x20]
inc dword [ebp - 0x18]
mov al, byte [edi + eax + 0x90]
mov byte [ebx], al
inc ebx
shr byte [ecx], 1
dec esi
mov dword [ebp - 8], ebx
mov dword [ebp - 4], esi
jne 0x404f3c
mov ecx, ebx
mov dword [ebp - 4], 8
inc ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], ebx
inc dword [ebp - 0xc]
mov esi, 0x8000
movzx eax, al
inc word [edi + eax*2 + 0x8192]
mov eax, dword [ebp - 0x14]
inc eax
cmp eax, esi
cmovb esi, eax
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x14], esi
mov esi, dword [ebp - 4]
and eax, 0x7fff
mov dword [ebp - 0x20], eax
dec edx
lea eax, [edi + 0x1926a]
mov dword [ebp - 0x1c], edx
cmp ebx, eax
jbe 0x404fc0
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x20], edx
xor edx, edx
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x2c], ecx
mov ecx, edi
mov dword [edi + 0x3c], eax
mov dword [edi + 0x28], ebx
mov dword [edi + 0x38], esi
call fcn.00404690
mov ecx, eax
test ecx, ecx
jne 0x404ffa
mov eax, dword [edi + 0x3c]
mov ebx, dword [edi + 0x28]
mov ecx, dword [edi + 0x2c]
mov esi, dword [edi + 0x38]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], esi
test edx, edx
jne 0x404f11
jmp 0x404bf0
mov esi, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
mov dword [edi + 0x1c], eax
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x24], eax
mov eax, dword [ebp - 0x18]
mov dword [edi + 0x3c], eax
mov eax, 1
mov dword [edi + 0x28], ebx
mov dword [edi + 0x38], esi
mov dword [edi + 0x20], edx
mov dword [edi + 0x2c], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
test ecx, ecx
pop edi
pop esi
setns al
pop ebx
mov esp, ebp
pop ebp
ret