Function at 0x412fb0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov edi, dword [esi + eax + 0x20]
mov ecx, dword [esi + eax + 0x24]
lea edx, [esi + eax]
cmp edi, 1
sbb ecx, 0
jl 0x412fde
cmp edi, ebx
cmovbe edi, ebx
sub edi, ebx
jmp 0x412fe0
xor edi, edi
mov ecx, dword [edx + 0x38]
test ecx, ecx
je 0x412ff4
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [esi]
mov eax, dword [eax + 4]
lea edx, [esi + eax]
cmp dword [edx + 0xc], 0
je 0x413004
mov ebx, 4
jmp 0x413135
mov ecx, dword [edx + 0x3c]
test ecx, ecx
je 0x413020
cmp ecx, esi
je 0x413020
call fcn.004013bc
mov eax, dword [esi]
mov eax, dword [eax + 4]
cmp dword [esi + eax + 0xc], 0
jne 0x412ffa
lea ecx, [esi + eax]
mov edx, 0x1c0
and edx, dword [ecx + 0x14]
cmp edx, 0x40
je 0x413093
test edi, edi
je 0x413091
nop word cs:[eax + eax]
nop
mov ecx, dword [esi + eax + 0x38]
movzx eax, byte [esi + eax + 0x40]
mov edx, dword [ecx + 0x20]
cmp dword [edx], 0
je 0x413070
mov edx, dword [ecx + 0x30]
mov ebx, dword [edx]
test ebx, ebx
jle 0x413070
dec ebx
mov dword [edx], ebx
mov ecx, dword [ecx + 0x20]
mov edx, dword [ecx]
lea ebx, [edx + 1]
mov dword [ecx], ebx
mov byte [edx], al
jmp 0x41307e
mov edx, dword [ecx]
movzx eax, al
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x4130b4
mov eax, dword [esi]
dec edi
mov eax, dword [eax + 4]
jne 0x413040
mov ebx, dword [ebp + 0x10]
add eax, esi
xor edi, edi
mov ecx, eax
jmp 0x413093
xor edi, edi
mov ecx, dword [ecx + 0x38]
mov eax, dword [ecx]
push 0
push ebx
push dword [ebp + 0xc]
call dword [eax + 0x24]
xor eax, ebx
mov ebx, 4
or eax, edx
jne 0x41311b
xor ebx, ebx
test edi, edi
jne 0x4130b9
jmp 0x41311b
mov ebx, 4
mov dword [ebp - 0x10], ebx
nop dword [eax]
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [esi + eax + 0x38]
movzx eax, byte [esi + eax + 0x40]
mov edx, dword [ecx + 0x20]
cmp dword [edx], 0
je 0x413100
mov edx, dword [ecx + 0x30]
mov ebx, dword [edx]
test ebx, ebx
jle 0x413100
dec ebx
mov dword [edx], ebx
mov ecx, dword [ecx + 0x20]
mov edx, dword [ecx]
lea ebx, [edx + 1]
mov dword [ecx], ebx
mov byte [edx], al
dec edi
jne 0x4130c0
jmp 0x413111
mov edx, dword [ecx]
movzx eax, al
push eax
call dword [edx + 0xc]
cmp eax, 0xffffffff
je 0x413116
dec edi
jne 0x4130c0
mov ebx, dword [ebp - 0x10]
jmp 0x41311b
mov ebx, 4
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov dword [esi + eax + 0x24], 0
mov dword [esi + eax + 0x20], 0
mov eax, dword [esi]
mov eax, dword [eax + 4]
or ebx, dword [esi + eax + 0xc]
lea ecx, [esi + eax]
push 0
push ebx
call fcn.00412ef0
mov eax, dword [esi]
mov eax, dword [eax + 4]
cmp dword [esi + eax + 0xc], 0
jne 0x41317c
test byte [esi + eax + 0x14], 2
je 0x41317c
mov ecx, dword [esi + eax + 0x38]
mov eax, dword [ecx]
call dword [eax + 0x34]
cmp eax, 0xffffffff
jne 0x41317c
mov eax, dword [esi]
mov eax, dword [eax + 4]
lea ecx, [esi + eax]
mov eax, dword [esi + eax + 0xc]
or eax, 4
push 0
push eax
call fcn.00412ef0
mov eax, dword [esi]
mov eax, dword [eax + 4]
mov ecx, dword [esi + eax + 0x38]
test ecx, ecx
je 0x41318e
mov eax, dword [ecx]
call dword [eax + 8]
mov eax, esi
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret