Function at 0x440970
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov eax, dword [edx + 0x10c]
mov dword [ebp - 0x18], eax
mov eax, dword [edx + 0x108]
mov dword [ebp - 8], eax
mov eax, dword [edx + 0x1ac]
mov dword [ebp - 0x20], eax
lea eax, [edx + 0x7e2]
push ebx
mov dword [ebp - 0x14], ecx
lea ebx, [edx + 8]
mov ecx, dword [edx + 0x128]
push esi
mov esi, dword [edx + 0x120]
mov dword [ebp - 0x24], eax
lea eax, [edx + 0x750]
push edi
mov edi, dword [edx + 0x124]
mov dword [ebp - 4], ecx
mov ecx, ebx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x10], eax
call fcn.00445670
test eax, eax
je 0x440b7a
mov ecx, dword [ebp - 4]
cmp esi, dword [ebp - 0x14]
jae 0x440b37
test ecx, ecx
je 0x440b37
cmp dword [ebx + 0xc], 2
jb 0x440b53
cmp dword [ebx + 4], 0x10
jb 0x440a1b
mov edx, dword [ebx + 8]
movzx ecx, word [ebx + 2]
xor dword [ebx + 4], 0x10
mov dword [ebx], ecx
movzx eax, word [edx]
shl eax, 0x10
or eax, ecx
add dword [ebx + 0xc], 0xfffffffe
mov dword [ebx], eax
lea eax, [edx + 2]
mov dword [ebx + 8], eax
mov eax, dword [ebx]
mov ecx, dword [ebx + 4]
mov dword [ebp - 0xc], eax
shr eax, cl
mov ecx, dword [ebp - 0x1c]
and eax, 0x1f
lea ecx, [ecx + eax*4]
movzx eax, byte [ecx + 0x12c]
add dword [ebx + 4], eax
movzx edx, word [ecx + 0x12e]
cmp edx, 0x10
jae 0x440a79
xor edi, edi
test edx, edx
je 0x440a73
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
mov eax, dword [eax + edx*4]
mov word [ecx + eax*2], si
mov ecx, edx
mov eax, dword [ebp - 0x10]
mov dword [eax + edx*4], esi
mov eax, 0x8000
shr eax, cl
sub dword [ebp - 4], eax
mov eax, dword [ebp - 0x24]
inc word [eax + edx*2]
inc esi
jmp 0x440b2b
mov ecx, dword [ebx + 4]
xor eax, eax
cmp edx, 0x10
setne al
shr dword [ebp - 0xc], cl
add eax, 2
add dword [ebx + 4], eax
mov ecx, dword [eax*4 + 0x538968]
xor eax, eax
and ecx, dword [ebp - 0xc]
mov dword [ebp - 0xc], ecx
mov ecx, 3
cmp edx, 0x10
jne 0x440aac
mov eax, dword [ebp - 0x18]
lea ecx, [edx - 0xe]
cmp dword [ebp - 8], eax
je 0x440ab6
xor edi, edi
mov dword [ebp - 8], eax
mov edx, edi
test edi, edi
je 0x440ac1
add edi, 0xfffffffe
shl edi, cl
mov eax, dword [ebp - 0xc]
add eax, 3
add edi, eax
mov eax, edi
sub eax, edx
mov dword [ebp - 0x28], eax
lea ecx, [eax + esi]
cmp ecx, dword [ebp - 0x14]
ja 0x440b4c
mov eax, dword [ebp - 8]
test eax, eax
je 0x440b29
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x20]
lea eax, [edx + eax*4]
mov dword [ebp - 0xc], eax
mov eax, dword [eax]
add eax, eax
nop
mov word [eax + ebx], si
mov edx, esi
lea eax, [esi + esi]
inc esi
cmp esi, ecx
jne 0x440af0
mov eax, dword [ebp - 0xc]
mov ecx, 0xf
sub ecx, dword [ebp - 8]
mov ebx, dword [ebp - 0x24]
mov dword [eax], edx
mov edx, dword [ebp - 0x28]
mov eax, edx
shl eax, cl
mov ecx, dword [ebp - 4]
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
add word [ebx + eax*2], dx
mov ebx, dword [ebp - 0x2c]
jmp 0x440b2e
mov esi, ecx
mov ecx, dword [ebp - 4]
cmp esi, dword [ebp - 0x14]
jb 0x4409e2
mov eax, dword [ebp - 0x1c]
pop edi
pop esi
pop ebx
mov dword [eax + 0x128], ecx
mov eax, 1
mov esp, ebp
pop ebp
ret
mov ecx, 0xfffff
jmp 0x440b37
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x18]
mov dword [eax + 0x10c], edx
mov edx, dword [ebp - 8]
mov dword [eax + 0x120], esi
mov dword [eax + 0x124], edi
mov dword [eax + 0x108], edx
mov dword [eax + 0x128], ecx
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret