Function at 0x40107e
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov dword [ebp - 0x18], ecx
cmp dword [ebp + 0xc], 0
jbe 0x401244
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
jmp 0x4010aa
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0x12
jae 0x401180
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + edx]
and edx, 0xff
shl edx, 0x18
mov eax, dword [ebp - 4]
and eax, 0xffffff
or eax, edx
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movsx ecx, byte [eax + edx]
and ecx, 0xff
shl ecx, 0x10
mov edx, dword [ebp - 4]
and edx, 0xff00ffff
or edx, ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + edx]
and edx, 0xff
shl edx, 8
mov eax, dword [ebp - 4]
and ah, 0
or eax, edx
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
xor edx, edx
div dword [ebp + 0xc]
mov eax, dword [ebp + 8]
movsx ecx, byte [eax + edx]
and ecx, 0xff
mov edx, dword [ebp - 4]
and dl, 0
or edx, ecx
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx*4]
xor eax, dword [ebp - 4]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov dword [edx + ecx*4], eax
jmp 0x4010a1
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], 0
jmp 0x40119f
mov ecx, dword [ebp - 8]
add ecx, 2
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0x12
jae 0x4011d0
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x18]
call fcn.00404020
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0xc]
mov dword [edx + ecx*4], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
mov dword [edx + ecx*4 + 4], eax
jmp 0x401196
mov dword [ebp - 0x10], 0
jmp 0x4011e2
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
cmp dword [ebp - 0x10], 4
jae 0x401244
mov dword [ebp - 8], 0
jmp 0x4011fa
mov edx, dword [ebp - 8]
add edx, 2
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0x100
jae 0x401242
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0xc]
push ecx
mov ecx, dword [ebp - 0x18]
call fcn.00404020
mov edx, dword [ebp - 0x10]
shl edx, 0xa
mov eax, dword [ebp - 0x18]
lea ecx, [eax + edx + 0x48]
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0xc]
mov dword [ecx + edx*4], eax
mov ecx, dword [ebp - 0x10]
shl ecx, 0xa
mov edx, dword [ebp - 0x18]
lea eax, [edx + ecx + 0x48]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x14]
mov dword [eax + ecx*4 + 4], edx
jmp 0x4011f1
jmp 0x4011d9
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], ecx
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov esp, ebp
pop ebp
ret 8