Function at 0x40128f
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x10], eax
xor edx, edx
mov dword [ebp - 0x14], edx
call fcn.0040bdbc
mov ebx, eax
call fcn.0040bdbc
imul ebx, eax
mov dword [ebp - 8], ebx
call fcn.0040bdbc
and eax, 7
inc eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
xor ebx, ebx
cmp ebx, dword [ebp + 0x14]
jge 0x401584
mov edx, dword [ebp + 0x10]
movzx edi, byte [edx + ebx]
mov edx, edi
mov ecx, eax
and cl, 0xff
xor dl, cl
mov ecx, dword [ebp + 0x10]
mov byte [ecx + ebx], dl
mov ecx, dword [ebp - 4]
mov edx, eax
shl edx, cl
and edx, 0xffffffff
mov dword [ebp - 0xc], edx
mov ecx, 0x20
sub ecx, dword [ebp - 4]
shr eax, cl
and eax, 0xffffffff
or eax, dword [ebp - 0xc]
add eax, edi
sar edi, 1
jns 0x40130d
adc edi, 0
lea edx, [edi + edi*2]
add eax, edx
inc ebx
cmp ebx, dword [ebp + 0x14]
jl 0x4012d1
jmp 0x401584
mov eax, dword [ebp - 0x14]
cmp eax, 0x15
ja case.default.0x401329
jmp dword [eax*4 + 0x401330]
call fcn.0040bdbc
test al, 1
je 0x40139a
mov byte [esi], 0x55
inc esi
jmp case.default.0x401329
mov byte [esi], 0x8b
inc esi
mov byte [esi], 0xc5
inc esi
mov byte [esi], 0x50
inc esi
jmp case.default.0x401329
mov byte [esi], 0x8b
inc esi
mov byte [esi], 0xec
inc esi
jmp case.default.0x401329
call fcn.0040bdbc
test al, 1
je 0x4013de
mov byte [esi], 0x83
inc esi
mov byte [esi], 0xec
inc esi
mov byte [esi], 4
inc esi
mov byte [esi], 0x89
inc esi
mov byte [esi], 0x5d
inc esi
mov byte [esi], 0xfc
inc esi
jmp case.default.0x401329
mov byte [esi], 0x53
inc esi
jmp case.default.0x401329
mov byte [esi], 0x51
inc esi
jmp case.default.0x401329
mov byte [esi], 0x52
inc esi
jmp case.default.0x401329
mov byte [esi], 0x8b
inc esi
mov byte [esi], 0x5d
inc esi
mov byte [esi], 8
inc esi
jmp case.default.0x401329
call fcn.0040bdbc
test al, 1
je 0x401424
mov byte [esi], 0xb9
inc esi
mov eax, dword [ebp + 0x14]
mov dword [esi], eax
add esi, 4
jmp case.default.0x401329
mov byte [esi], 0x68
inc esi
mov edx, dword [ebp + 0x14]
mov dword [esi], edx
add esi, 4
mov byte [esi], 0x59
inc esi
jmp case.default.0x401329
call fcn.0040bdbc
test al, 1
je 0x401457
mov byte [esi], 0x68
inc esi
mov ecx, dword [ebp - 8]
mov dword [esi], ecx
add esi, 4
mov byte [esi], 0x5a
inc esi
jmp case.default.0x401329
mov byte [esi], 0xba
inc esi
mov eax, dword [ebp - 8]
mov dword [esi], eax
add esi, 4
jmp case.default.0x401329
mov dword [ebp - 0x18], esi
mov byte [esi], 0xf
inc esi
mov byte [esi], 0xb6
inc esi
mov byte [esi], 3
inc esi
jmp case.default.0x401329
call fcn.0040bdbc
test al, 1
je 0x401496
mov byte [esi], 0x83
inc esi
mov byte [esi], 0xc3
inc esi
mov byte [esi], 1
inc esi
jmp case.default.0x401329
mov byte [esi], 0x43
inc esi
jmp case.default.0x401329
mov byte [esi], 0x32
inc esi
mov byte [esi], 0xc2
inc esi
jmp case.default.0x401329
mov byte [esi], 0xc1
inc esi
mov byte [esi], 0xc2
inc esi
mov dl, byte [ebp - 4]
mov byte [esi], dl
inc esi
jmp case.default.0x401329
mov byte [esi], 3
inc esi
mov byte [esi], 0xd0
inc esi
jmp case.default.0x401329
mov byte [esi], 0x88
inc esi
mov byte [esi], 0x43
inc esi
mov byte [esi], 0xff
inc esi
jmp case.default.0x401329
mov byte [esi], 0xd1
inc esi
mov byte [esi], 0xe8
inc esi
mov byte [esi], 0x6b
inc esi
mov byte [esi], 0xc0
inc esi
mov byte [esi], 3
inc esi
mov byte [esi], 3
inc esi
mov byte [esi], 0xd0
inc esi
jmp case.default.0x401329
mov ebx, esi
sub ebx, dword [ebp - 0x18]
call fcn.0040bdbc
test al, 1
je 0x40151b
mov byte [esi], 0x49
inc esi
mov byte [esi], 0x75
inc esi
add bl, 3
neg bl
mov byte [esi], bl
inc esi
jmp case.default.0x401329
mov byte [esi], 0xe2
inc esi
add bl, 2
neg bl
mov byte [esi], bl
inc esi
jmp case.default.0x401329
mov byte [esi], 0x5a
inc esi
jmp case.default.0x401329
mov byte [esi], 0x59
inc esi
jmp case.default.0x401329
mov byte [esi], 0x5b
inc esi
jmp case.default.0x401329
mov byte [esi], 0x5d
inc esi
jmp case.default.0x401329
call fcn.0040bdbc
test al, 1
je 0x401550
mov byte [esi], 0xc3
inc esi
jmp case.default.0x401329
mov byte [esi], 0x58
inc esi
mov byte [esi], 0xff
inc esi
mov byte [esi], 0xe0
inc esi
jmp case.default.0x401329
mov dword [ebp - 0x10], 1
inc dword [ebp - 0x14]
call fcn.0040bdbc
mov ebx, eax
and ebx, 3
test ebx, ebx
je 0x401584
push esi
call fcn.00401185
pop ecx
mov esi, eax
dec ebx
test ebx, ebx
jne 0x401576
cmp dword [ebp - 0x10], 0
je 0x40131d
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret