Function at 0x4124b0
Capabilities:
Encode data using xor
Encrypt data using aes
Encrypt data using rc4 ksa
Reference aes constants

Disassembly:
push ecx
mov eax, dword [esp + 8]
push ebx
test eax, eax
mov ebx, ecx
je 0x4128f7
mov eax, dword [esp + 0x14]
cmp eax, 0x10
je 0x4124d7
cmp eax, 0x18
je 0x4124d7
cmp eax, 0x20
jne 0x4128f7
mov ecx, dword [esp + 0x18]
cmp ecx, 0x10
je 0x4124ee
cmp ecx, 0x18
je 0x4124ee
cmp ecx, 0x20
jne 0x4128f7
push ebp
mov dword [ebx + 0x3c8], eax
mov eax, dword [esp + 0x14]
mov dword [ebx + 0x3cc], ecx
push esi
mov edx, ecx
push edi
mov esi, eax
lea edi, [ebx + 0x3d4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebx + 0x3cc]
mov esi, eax
mov eax, ecx
lea edi, [ebx + 0x3f4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 0x3c8]
cmp eax, 0x10
je 0x41256a
cmp eax, 0x18
je 0x41254f
mov dword [ebx + 0x3d0], 0xe
jmp 0x41258f
mov ecx, dword [ebx + 0x3cc]
sub ecx, 0x20
neg ecx
sbb ecx, ecx
and ecx, 0xfffffffe
add ecx, 0xe
mov dword [ebx + 0x3d0], ecx
jmp 0x41258f
mov eax, dword [ebx + 0x3cc]
cmp eax, 0x10
jne 0x41257c
mov eax, 0xa
jmp 0x412589
sub eax, 0x18
neg eax
sbb eax, eax
and eax, 2
add eax, 0xc
mov dword [ebx + 0x3d0], eax
mov eax, dword [ebx + 0x3cc]
cdq
and edx, 3
add eax, edx
xor edx, edx
mov ebp, eax
mov eax, dword [ebx + 0x3d0]
sar ebp, 2
test eax, eax
mov dword [esp + 0x20], ebp
jl 0x4125cd
lea esi, [ebx + 8]
test ebp, ebp
jle 0x4125bf
mov ecx, ebp
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x3d0]
inc edx
add esi, 0x20
cmp edx, eax
jle 0x4125b3
mov eax, dword [ebx + 0x3d0]
xor edx, edx
test eax, eax
jl 0x4125f9
lea esi, [ebx + 0x1e8]
test ebp, ebp
jle 0x4125eb
mov ecx, ebp
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebx + 0x3d0]
inc edx
add esi, 0x20
cmp edx, eax
jle 0x4125df
mov ecx, dword [ebx + 0x3d0]
mov eax, dword [ebx + 0x3c8]
inc ecx
lea esi, [ebx + 0x414]
cdq
imul ecx, ebp
and edx, 3
mov dword [esp + 0x24], ecx
add eax, edx
mov edi, eax
mov eax, dword [esp + 0x18]
sar edi, 2
test edi, edi
mov dword [esp + 0x10], edi
jle 0x412662
mov dword [esp + 0x18], edi
xor edx, edx
add esi, 4
mov dl, byte [eax]
shl edx, 0x18
mov dword [esi - 4], edx
inc eax
xor edx, edx
mov dl, byte [eax]
shl edx, 0x10
or dword [esi - 4], edx
inc eax
xor edx, edx
mov dh, byte [eax]
or dword [esi - 4], edx
inc eax
xor edx, edx
mov dl, byte [eax]
or dword [esi - 4], edx
mov edx, dword [esp + 0x18]
inc eax
dec edx
mov dword [esp + 0x18], edx
jne 0x41262e
xor esi, esi
test edi, edi
jle 0x4126c3
lea eax, [ebx + 0x414]
mov dword [esp + 0x18], eax
cmp esi, ecx
jge 0x412869
mov eax, esi
cdq
idiv ebp
mov ecx, eax
mov eax, esi
cdq
idiv ebp
mov dword [esp + 0x1c], edx
lea eax, [edx + ecx*8]
mov edx, dword [esp + 0x18]
mov edx, dword [edx]
mov dword [ebx + eax*4 + 8], edx
mov eax, dword [ebx + 0x3d0]
sub eax, ecx
mov ecx, dword [esp + 0x1c]
inc esi
lea edx, [ecx + eax*8]
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
add eax, 4
mov dword [ebx + edx*4 + 0x1e8], ecx
mov ecx, dword [esp + 0x24]
cmp esi, edi
mov dword [esp + 0x18], eax
jl 0x412672
cmp esi, ecx
jge 0x412869
mov dword [esp + 0x1c], 0x454a10
mov eax, dword [ebx + edi*4 + 0x410]
xor edx, edx
mov dword [esp + 0x18], eax
xor ecx, ecx
mov dl, byte [esp + 0x1a]
movsx ebp, byte [edx + str.cw]
mov edx, dword [esp + 0x1c]
movsx edx, byte [edx]
xor ebp, edx
xor edx, edx
mov dl, ah
and eax, 0xff
shl ebp, 8
mov cl, byte [edx + str.cw]
xor edx, edx
mov dl, byte [esp + 0x1b]
xor ebp, ecx
xor ecx, ecx
mov cl, byte [eax + str.cw]
xor eax, eax
mov al, byte [edx + str.cw]
mov edx, dword [ebx + 0x414]
shl ebp, 8
xor ebp, ecx
mov ecx, dword [esp + 0x1c]
shl ebp, 8
xor ebp, eax
xor edx, ebp
inc ecx
cmp edi, 8
mov dword [ebx + 0x414], edx
mov dword [esp + 0x1c], ecx
je 0x41276c
cmp edi, 1
jle 0x4127fb
lea eax, [ebx + 0x418]
lea ecx, [edi - 1]
mov edx, dword [eax - 4]
mov ebp, dword [eax]
xor ebp, edx
mov dword [eax], ebp
add eax, 4
dec ecx
jne 0x412758
jmp 0x4127fb
lea eax, [ebx + 0x418]
mov ecx, 3
mov edx, dword [eax - 4]
mov ebp, dword [eax]
xor ebp, edx
mov dword [eax], ebp
add eax, 4
dec ecx
jne 0x412777
mov eax, dword [ebx + 0x420]
xor ecx, ecx
mov dword [esp + 0x18], eax
xor edx, edx
mov cl, byte [esp + 0x1b]
movsx ebp, byte [ecx + str.cw]
xor ecx, ecx
mov cl, byte [esp + 0x1a]
shl ebp, 8
mov dl, byte [ecx + str.cw]
xor ecx, ecx
xor ebp, edx
xor edx, edx
mov dl, ah
and eax, 0xff
shl ebp, 8
mov cl, byte [edx + str.cw]
xor edx, edx
mov dl, byte [eax + str.cw]
mov eax, dword [ebx + 0x424]
xor ebp, ecx
mov ecx, 3
shl ebp, 8
xor ebp, edx
xor eax, ebp
mov dword [ebx + 0x424], eax
lea eax, [ebx + 0x428]
mov edx, dword [eax - 4]
mov ebp, dword [eax]
xor ebp, edx
mov dword [eax], ebp
add eax, 4
dec ecx
jne 0x4127ec
test edi, edi
mov dword [esp + 0x18], 0
jle 0x412859
lea ecx, [ebx + 0x414]
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
cmp esi, eax
jge 0x412869
mov eax, esi
add ecx, 4
cdq
idiv ebp
mov edi, eax
mov eax, esi
cdq
idiv ebp
mov ebp, dword [ecx - 4]
lea eax, [edx + edi*8]
mov dword [ebx + eax*4 + 8], ebp
mov eax, dword [ebx + 0x3d0]
sub eax, edi
mov edi, dword [esp + 0x10]
lea edx, [edx + eax*8]
mov eax, dword [ecx - 4]
mov dword [ebx + edx*4 + 0x1e8], eax
mov eax, dword [esp + 0x18]
inc eax
inc esi
cmp eax, edi
mov dword [esp + 0x18], eax
jl 0x41280d
mov eax, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
cmp esi, eax
jl 0x4126d3
mov ecx, dword [ebx + 0x3d0]
mov eax, 1
cmp ecx, eax
mov dword [esp + 0x20], eax
jle 0x4128f1
lea esi, [ebx + 0x208]
mov dword [esp + 0x24], esi
test ebp, ebp
jle 0x4128ce
mov edi, ebp
mov eax, dword [esi]
xor ecx, ecx
mov dword [esp + 0x18], eax
xor edx, edx
mov cl, byte [esp + 0x1b]
mov dl, byte [esp + 0x1a]
add esi, 4
mov ecx, dword [ecx*4 + 0x453a10]
xor ecx, dword [edx*4 + 0x453e10]
xor edx, edx
mov dl, ah
and eax, 0xff
xor ecx, dword [edx*4 + 0x454210]
mov edx, dword [eax*4 + 0x454610]
xor ecx, edx
dec edi
mov dword [esi - 4], ecx
jne 0x41288c
mov eax, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov ecx, dword [ebx + 0x3d0]
inc eax
add esi, 0x20
cmp eax, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
jl 0x412886
mov eax, 1
pop edi
pop esi
mov dword [ebx + 4], eax
pop ebp
pop ebx
pop ecx
ret 0x10