Function at 0x415840
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov byte [ebp - 9], 0
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x190]
and ecx, 0x80
je 0x415861
jmp 0x415a29
push 3
mov edx, dword [ebp + 8]
push edx
call fcn.00415120
add esp, 8
mov eax, dword [ebp + 8]
movzx ecx, byte [eax + 0x190]
and ecx, 0x20
je 0x415893
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xf8]
sar eax, 1
mov ecx, dword [ebp + 0x18]
sub ecx, eax
mov dword [ebp + 0x18], ecx
jmp 0x4158a2
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x18]
sub eax, dword [edx + 0xe8]
mov dword [ebp + 0x18], eax
mov dword [ebp - 8], 0
jmp 0x4158b4
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
mov ecx, dword [ebp - 8]
cmp ecx, dword [eax + 4]
jge 0x415a29
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x190]
and eax, 0x40
je 0x4158f7
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x16c]
push edx
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 8]
push edx
call fcn.0042cdd6
add esp, 0xc
mov dword [ebp - 0x18], eax
jmp 0x41591d
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x16c]
shl ecx, 1
push ecx
mov edx, dword [ebp - 8]
lea eax, [edx + edx + 1]
push eax
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx + 8]
push edx
call fcn.0042cdd6
add esp, 0xc
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x190]
and eax, 3
je 0x4159bf
mov ecx, dword [ebp - 8]
imul ecx, dword [ebp + 0x10]
add ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4 - 4]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jge 0x41596a
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx + 0x190]
and edx, 1
jne 0x41596a
mov byte [ebp - 0x19], 0
jmp 0x41596e
mov byte [ebp - 0x19], 1
mov al, byte [ebp - 0x19]
mov byte [ebp - 9], al
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x15c]
push edx
movzx eax, byte [ebp - 9]
neg eax
sbb eax, eax
and eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub eax, dword [ecx + 0x150]
push eax
mov edx, dword [ebp + 0x14]
mov eax, dword [edx + 0xc]
push eax
call fcn.0042cdd6
add esp, 0xc
mov ecx, dword [ebp + 0x14]
add eax, dword [ecx + 4]
mov dword [ebp - 0x10], eax
movzx edx, byte [ebp - 9]
xor eax, eax
cmp dword [ebp - 4], 0
setl al
xor edx, eax
mov byte [ebp - 9], dl
jmp 0x4159ed
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 8]
movzx eax, byte [edx + 0x190]
and eax, 0x10
je 0x4159ed
mov ecx, dword [ebp - 8]
not ecx
and ecx, 1
je 0x4159ed
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x50]
mov ecx, dword [ebp - 0x10]
sub ecx, dword [eax + 0x1c]
mov dword [ebp - 0x10], ecx
movzx edx, byte [ebp - 9]
neg edx
sbb edx, edx
and edx, 0xfffffffc
add edx, 6
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x54]
mov edx, dword [ebp - 8]
mov eax, dword [ecx + edx*4]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov eax, dword [ebp + 8]
mov cx, word [eax + 0x1cc]
push ecx
call sub.gnwie.dll_OUTchars
add esp, 0x14
jmp 0x4158ab
mov esp, ebp
pop ebp
ret