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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, ecx
push edi
cmp byte [esi + 4], 0
jne 0x404095
push 0x421a64
lea ecx, [ebp - 0x34]
call fcn.0040d68c
lea eax, [ebp - 0x34]
push 0x41fbd0
push eax
call fcn.0040d736
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x4040b2
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call fcn.004039da
jmp 0x4042e9
push 4
cdq
pop ecx
idiv ecx
mov edi, eax
sub eax, ecx
xor ecx, ecx
cmp edi, 6
setne cl
inc ecx
neg eax
sbb eax, eax
and eax, ecx
shl eax, 5
test edi, edi
mov ecx, dword [eax + 0x41bc00]
mov dword [ebp - 0x18], ecx
mov ecx, dword [eax + 0x41bc08]
mov eax, dword [eax + 0x41bc10]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x1c], eax
lea eax, [esi + 0x454]
jle 0x404133
lea ecx, [esi + 8]
mov dword [ebp - 0xc], edi
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 8]
movzx edx, byte [ecx]
shl edx, 0x18
inc ecx
mov dword [eax], edx
movzx edx, byte [ecx]
shl edx, 0x10
or dword [eax], edx
inc ecx
xor edx, edx
mov dh, byte [ecx]
or dword [eax], edx
inc ecx
mov edx, eax
movzx ebx, byte [ecx]
or dword [eax], ebx
mov ebx, dword [ebp - 4]
add dword [ebp - 4], 4
inc ecx
mov ebx, dword [ebx]
add eax, 4
xor dword [edx], ebx
dec dword [ebp - 0xc]
jne 0x4040ff
push 1
pop eax
cmp dword [esi + 0x3d0], eax
mov dword [ebp - 0xc], eax
jle 0x404220
lea eax, [esi + 0x28]
mov dword [ebp - 8], eax
test edi, edi
jle 0x4041ee
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
sub eax, edx
mov dword [ebp + 8], edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
sub eax, edx
lea ecx, [esi + 0x434]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x10], edi
mov eax, dword [ebp - 0x20]
mov ebx, dword [ebp + 8]
add eax, ebx
cdq
idiv edi
mov eax, edx
xor edx, edx
mov dl, byte [esi + eax*4 + 0x455]
mov eax, dword [ebp - 0x24]
add eax, ebx
mov dword [ebp - 0x28], edx
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
mov edx, dword [ebp - 0x28]
and eax, 0xff
mov ebx, dword [edx*4 + 0x4193d8]
xor ebx, dword [eax*4 + 0x4197d8]
mov eax, dword [ebp + 8]
cdq
idiv edi
xor eax, eax
mov al, byte [esi + edx*4 + 0x456]
xor ebx, dword [eax*4 + 0x418fd8]
xor eax, eax
mov al, byte [ecx + 0x23]
xor ebx, dword [eax*4 + 0x418bd8]
mov eax, dword [ebp - 4]
add dword [ebp - 4], 4
xor ebx, dword [eax]
mov dword [ecx], ebx
add ecx, 4
inc dword [ebp + 8]
dec dword [ebp - 0x10]
jne 0x404178
mov eax, edi
shl eax, 2
push eax
lea eax, [esi + 0x434]
push eax
lea eax, [esi + 0x454]
push eax
call fcn.0040c8c0
add dword [ebp - 8], 0x20
add esp, 0xc
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [esi + 0x3d0]
jl 0x40414b
and dword [ebp - 4], 0
test edi, edi
jle 0x4042e9
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x14]
lea eax, [esi + 0x454]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp - 0x18]
sub eax, ebx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x1c]
sub eax, ebx
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x3d0]
mov edx, dword [ebp - 4]
lea eax, [edx + eax*8]
mov edx, dword [ebp + 0xc]
add dword [ebp + 0xc], 4
mov eax, dword [esi + eax*4 + 8]
mov dword [ebp + 8], eax
xor eax, eax
mov al, byte [edx + 3]
mov edx, dword [ebp + 8]
sar edx, 0x18
mov al, byte [eax + str.cw]
xor al, dl
mov byte [ecx], al
mov eax, dword [ebp - 0x28]
add eax, ebx
inc ecx
cdq
idiv edi
xor eax, eax
mov al, byte [esi + edx*4 + 0x456]
mov edx, dword [ebp + 8]
sar edx, 0x10
mov al, byte [eax + str.cw]
xor al, dl
mov byte [ecx], al
mov eax, ebx
cdq
idiv edi
xor eax, eax
inc ecx
mov al, byte [esi + edx*4 + 0x455]
mov edx, dword [ebp + 8]
sar edx, 8
mov al, byte [eax + str.cw]
xor al, dl
mov byte [ecx], al
mov eax, dword [ebp - 0x24]
add eax, ebx
inc ecx
cdq
idiv edi
mov eax, dword [esi + edx*4 + 0x454]
and eax, 0xff
mov al, byte [eax + str.cw]
xor al, byte [ebp + 8]
mov byte [ecx], al
inc ecx
inc dword [ebp - 4]
inc ebx
cmp dword [ebp - 4], edi
jl 0x40424b
pop edi
pop esi
pop ebx
leave
ret 8