Function at 0x4126c0
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
mov eax, dword [edi + 8]
sub esp, 0x1c
push ebx
push ebp
push esi
test eax, eax
jne 0x412729
cmp dword [esp + 0x34], eax
je 0x4126f6
mov eax, dword [edi + 0x10]
mov byte [edi + 4], 6
mov dword [edi + 8], 0x40
mov ecx, dword [eax]
push 0x100
call ecx
add esp, 4
mov dword [edi], eax
test eax, eax
jne 0x4126ff
mov dword [edi + 8], eax
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1c
ret
push 0x100
push 0
push eax
call sub.MSVCRT.dll_memset
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
add esp, 0xc
call fcn.00412690
mov edx, dword [edi + 8]
mov esi, eax
dec edx
and esi, edx
jmp 0x412967
mov ecx, dword [esp + 0x30]
movzx ebp, word [ecx]
mov eax, dword [esp + 0x2c]
mov edx, dword [eax + 0x1f0]
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ebp
test bp, bp
je 0x41276f
movzx eax, bp
lea ebx, [ebx]
mov edx, dword [esp + 0x10]
imul edx, edx, 0xf4243
movzx eax, ax
xor edx, eax
movzx eax, word [ecx + 2]
add ecx, 2
mov dword [esp + 0x10], edx
test ax, ax
jne 0x412750
mov ebx, dword [edi + 8]
mov esi, dword [esp + 0x10]
mov eax, dword [edi]
dec ebx
and esi, ebx
cmp dword [eax + esi*4], 0
mov byte [esp + 0xf], 0
mov dword [esp + 0x14], eax
je 0x41280f
mov edi, edi
mov ecx, dword [eax + esi*4]
mov eax, dword [ecx]
cmp bp, word [eax]
jne 0x4127bb
movzx edx, bp
mov ebp, dword [esp + 0x30]
sub ebp, eax
test dx, dx
je 0x412801
movzx ecx, word [eax + ebp + 2]
add eax, 2
mov edx, ecx
cmp cx, word [eax]
je 0x4127a3
mov ebp, dword [esp + 0x1c]
cmp byte [esp + 0xf], 0
jne 0x4127df
movzx ecx, byte [edi + 4]
mov edx, ebx
not edx
and edx, dword [esp + 0x10]
dec ecx
shr edx, cl
mov eax, ebx
shr eax, 2
and dl, al
or dl, 1
mov byte [esp + 0xf], dl
movzx eax, byte [esp + 0xf]
cmp esi, eax
jae 0x4127f1
mov ecx, dword [edi + 8]
sub ecx, eax
add esi, ecx
jmp 0x4127f3
sub esi, eax
mov edx, dword [edi]
cmp dword [edx + esi*4], 0
je 0x41280f
mov eax, dword [esp + 0x14]
jmp 0x412790
mov eax, dword [esp + 0x14]
mov eax, dword [eax + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
cmp dword [esp + 0x34], 0
je 0x4126f6
mov al, byte [edi + 4]
mov edx, dword [edi + 0xc]
movzx ecx, al
dec ecx
shr edx, cl
test edx, edx
je 0x412967
inc al
movzx ecx, al
mov esi, 1
shl esi, cl
mov byte [esp + 0xf], al
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x10]
mov edx, dword [ecx]
lea eax, [esi*4]
push eax
mov dword [esp + 0x18], esi
lea ebp, [esi - 1]
call edx
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4126f6
lea eax, [esi*4]
push eax
push 0
push ebx
call sub.MSVCRT.dll_memset
xor ecx, ecx
add esp, 0xc
mov dword [esp + 0x18], ecx
cmp dword [edi + 8], ecx
jbe 0x412907
mov eax, dword [edi]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
je 0x4128fd
mov eax, dword [eax]
mov edx, dword [eax]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
call fcn.00412690
mov ecx, eax
mov edx, ecx
and edx, ebp
xor al, al
cmp dword [ebx + edx*4], 0
mov dword [esp + 0x20], ecx
je 0x4128f2
jmp 0x4128bb
mov ecx, dword [esp + 0x20]
test al, al
jne 0x4128d9
mov esi, dword [esp + 0x14]
mov eax, ebp
not eax
and eax, ecx
mov ecx, dword [esp + 0x1c]
dec ecx
shr eax, cl
mov ecx, ebp
shr ecx, 2
and al, cl
or al, 1
movzx ecx, al
cmp edx, ecx
jae 0x4128ea
sub esi, ecx
add edx, esi
mov esi, dword [esp + 0x14]
jmp 0x4128ec
sub edx, ecx
cmp dword [ebx + edx*4], 0
jne 0x4128b7
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x18]
mov dword [ebx + edx*4], eax
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, dword [edi + 8]
jb 0x412887
mov ecx, dword [edi + 0x10]
mov edx, dword [edi]
mov eax, dword [ecx + 8]
push edx
call eax
mov edx, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
mov dword [edi + 8], esi
mov esi, edx
mov byte [edi + 4], cl
and esi, ebp
add esp, 4
mov dword [edi], ebx
xor cl, cl
cmp dword [ebx + esi*4], 0
je 0x412967
test cl, cl
jne 0x41294c
mov ecx, dword [esp + 0x1c]
mov eax, ebp
dec ecx
not eax
and eax, edx
shr eax, cl
mov ecx, ebp
shr ecx, 2
and cl, al
or cl, 1
movzx eax, cl
cmp esi, eax
jae 0x41295d
mov ebx, dword [esp + 0x14]
sub ebx, eax
add esi, ebx
jmp 0x41295f
sub esi, eax
mov eax, dword [edi]
cmp dword [eax + esi*4], 0
jne 0x412931
mov edx, dword [edi + 0x10]
mov ebx, dword [esp + 0x34]
mov eax, dword [edx]
push ebx
call eax
mov ecx, dword [edi]
mov dword [ecx + esi*4], eax
mov edx, dword [edi]
lea eax, [edx + esi*4]
add esp, 4
cmp dword [eax], 0
je 0x4126f6
mov eax, dword [eax]
push ebx
push 0
push eax
call sub.MSVCRT.dll_memset
mov ecx, dword [edi]
mov edx, dword [ecx + esi*4]
mov eax, dword [esp + 0x3c]
add esp, 0xc
mov dword [edx], eax
mov ecx, dword [edi]
inc dword [edi + 0xc]
mov eax, dword [ecx + esi*4]
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret