Function at 0x412770
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], eax
mov eax, dword [eax + 0x24]
mov dword [ebp - 0x18], eax
mov esi, esi
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x34]
sub edx, dword [eax + 0x6c]
sub edx, dword [eax + 0x64]
mov dword [ebp - 0x14], edx
test edx, edx
jne 0x4127b6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x64]
test eax, eax
jne 0x4127b6
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x6c]
test eax, eax
jne 0x4127b6
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
jmp 0x4128a1
mov eax, dword [ebp - 0x14]
cmp eax, 0xffffffff
jne 0x4127c6
dec dword [ebp - 0x14]
jmp 0x4128a1
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
mov ecx, eax
add eax, dword [ebp - 0x18]
sub eax, 0x106
cmp eax, dword [edx + 0x64]
ja 0x4128a1
mov eax, dword [edx + 0x30]
mov edx, ecx
lea edx, [eax + edx]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x30]
call fcn.004115d0
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
sub dword [edx + 0x68], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
sub dword [eax + 0x64], edx
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
sub dword [edx + 0x54], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x44]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3c]
mov edx, dword [ebp - 8]
lea eax, [eax + edx*2]
mov dword [ebp - 0x10], eax
lea esi, [esi]
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x18]
jb 0x412845
sub eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov word [edx], ax
jmp 0x41284d
mov eax, dword [ebp - 0x10]
mov word [eax], 0
dec dword [ebp - 8]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x412828
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x38]
mov eax, dword [ebp - 8]
lea eax, [edx + eax*2]
mov dword [ebp - 0x10], eax
sub dword [ebp - 0x10], 2
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 0x18]
jb 0x412889
sub eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov word [edx], ax
jmp 0x412891
mov eax, dword [ebp - 0x10]
mov word [eax], 0
dec dword [ebp - 8]
mov eax, dword [ebp - 8]
test eax, eax
jne 0x41286c
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x14], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
je 0x412937
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x30]
mov edx, eax
mov eax, dword [eax + 0x64]
add eax, dword [edx + 0x6c]
lea edx, [ebx + eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
call fcn.00412da0
mov dword [ebp - 8], eax
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 8]
add dword [eax + 0x6c], edx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x6c]
cmp eax, 3
jb 0x41291a
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x30]
mov eax, dword [eax + 0x64]
movzx eax, byte [edx + eax]
mov edx, dword [ebp - 4]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x40]
mov ecx, dword [eax + 0x50]
shl edx, cl
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x64]
inc eax
movzx ecx, byte [ecx + eax]
xor ecx, edx
mov eax, dword [ebp - 4]
and ecx, dword [eax + 0x4c]
mov dword [eax + 0x40], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x6c]
cmp eax, 0x106
jae 0x412937
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
jne 0x412784
mov ebx, dword [ebp - 0x1c]
leave
ret