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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
mov eax, dword [ebp + 8]
cmp byte [eax + 4], 0
jne 0x404853
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0x427f44
push 0x404328
call fcn.0042058c
add esp, 0x24
mov edx, dword [ebp + 8]
cmp dword [edx + 0x3cc], 0x10
jne 0x404875
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00403e4c
add esp, 0xc
jmp 0x404b64
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3cc]
test eax, eax
jns 0x404885
add eax, 3
sar eax, 2
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 4
jne 0x404895
xor edx, edx
jmp 0x4048a1
mov edx, 1
cmp dword [ebp - 4], 6
je 0x4048a1
inc edx
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
shl eax, 5
mov ecx, dword [eax + 0x427eec]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
shl eax, 5
mov edx, dword [eax + 0x427ef4]
mov dword [ebp - 0x10], edx
mov ecx, dword [ebp - 8]
shl ecx, 5
mov eax, dword [ecx + 0x427efc]
mov dword [ebp - 0x14], eax
mov edx, dword [ebp + 8]
add edx, 0x454
mov dword [ebp - 0x20], edx
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 4]
jge 0x404953
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [edx]
shl ecx, 0x18
mov eax, dword [ebp - 0x20]
mov dword [eax], ecx
inc dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [edx]
shl ecx, 0x10
mov eax, dword [ebp - 0x20]
or dword [eax], ecx
inc dword [ebp + 0xc]
mov edx, dword [ebp + 0xc]
xor ecx, ecx
mov cl, byte [edx]
shl ecx, 8
mov eax, dword [ebp - 0x20]
or dword [eax], ecx
inc dword [ebp + 0xc]
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x24], edx
add dword [ebp - 0x20], 4
mov ecx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [ecx]
mov edx, dword [ebp - 0x24]
or dword [edx], eax
inc dword [ebp + 0xc]
mov ecx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov eax, dword [edx + eax*4 + 8]
xor dword [ecx], eax
inc dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 4]
jl 0x4048ea
mov dword [ebp - 0x28], 1
jmp 0x404a4a
xor ecx, ecx
mov dword [ebp - 0x18], ecx
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 4]
jge 0x404a24
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + edx*4 + 0x454]
sar eax, 0x10
and eax, 0xff
mov ecx, dword [eax*4 + 0x4252c4]
mov edx, dword [ebp - 0x18]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*4 + 0x454]
sar edx, 0x18
and edx, 0xff
xor ecx, dword [edx*4 + 0x424ec4]
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*4 + 0x454]
sar edx, 8
and edx, 0xff
xor ecx, dword [edx*4 + 0x4256c4]
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax + edx*4 + 0x454]
and edx, 0xff
xor ecx, dword [edx*4 + 0x425ac4]
mov eax, dword [ebp - 0x28]
shl eax, 5
mov edx, dword [ebp + 8]
lea eax, [edx + eax]
mov edx, dword [ebp - 0x18]
xor ecx, dword [eax + edx*4 + 8]
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov dword [edx + eax*4 + 0x434], ecx
inc dword [ebp - 0x18]
mov ecx, dword [ebp - 0x18]
cmp ecx, dword [ebp - 4]
jl 0x404970
mov eax, dword [ebp - 4]
shl eax, 2
push eax
mov edx, dword [ebp + 8]
add edx, 0x434
push edx
mov ecx, dword [ebp + 8]
add ecx, 0x454
push ecx
call fcn.00416c20
add esp, 0xc
inc dword [ebp - 0x28]
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp + 8]
cmp eax, dword [edx + 0x3d0]
jl 0x40495f
xor ecx, ecx
mov dword [ebp - 0x18], ecx
xor eax, eax
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 4]
jge 0x404b64
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x3d0]
shl eax, 5
mov edx, dword [ebp + 8]
lea ecx, [edx + eax]
mov eax, dword [ebp - 0x18]
mov edx, dword [ecx + eax*4 + 8]
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebp - 0x1c]
sar ecx, 0x18
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
mov eax, dword [edx + eax*4 + 0x454]
sar eax, 0x18
and eax, 0xff
xor cl, byte [eax + str.cw]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x2c]
mov byte [edx + eax], cl
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0xc]
cdq
idiv dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + edx*4 + 0x454]
sar eax, 0x10
and eax, 0xff
mov dl, byte [eax + str.cw]
mov ecx, dword [ebp - 0x1c]
sar ecx, 0x10
xor dl, cl
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x2c]
mov byte [eax + ecx], dl
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + edx*4 + 0x454]
sar eax, 8
and eax, 0xff
mov dl, byte [eax + str.cw]
mov ecx, dword [ebp - 0x1c]
sar ecx, 8
xor dl, cl
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x2c]
mov byte [eax + ecx], dl
inc dword [ebp - 0x2c]
mov eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x14]
cdq
idiv dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + edx*4 + 0x454]
and eax, 0xff
mov dl, byte [eax + str.cw]
xor dl, byte [ebp - 0x1c]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x2c]
mov byte [ecx + eax], dl
inc dword [ebp - 0x2c]
inc dword [ebp - 0x18]
mov edx, dword [ebp - 0x18]
cmp edx, dword [ebp - 4]
jl 0x404a72
mov esp, ebp
pop ebp
ret