Function at 0x406030
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push esi
mov esi, ecx
cmp byte [esi + 4], 0
push edi
mov edi, edx
jne 0x40605d
push 0x442098
lea ecx, [ebp - 0x3c]
call fcn.00413299
push 0x43ced4
lea eax, [ebp - 0x3c]
push eax
call fcn.00413452
mov eax, dword [esi + 0x3cc]
cmp eax, 0x10
jne 0x406075
push dword [ebp + 8]
call fcn.00405951
jmp 0x4062c2
cdq
and edx, 3
xor ecx, ecx
push ebx
lea ebx, [edx + eax]
sar ebx, 2
cmp ebx, 6
setne cl
lea eax, [ebx - 4]
inc ecx
neg eax
sbb eax, eax
and eax, ecx
shl eax, 5
mov ecx, dword [eax + 0x437bd0]
mov dword [ebp - 0x20], ecx
mov ecx, dword [eax + 0x437bd8]
mov eax, dword [eax + 0x437be0]
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], ecx
lea eax, [esi + 0x454]
test ebx, ebx
jle 0x4060fb
lea ecx, [esi + 8]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x14], ebx
movzx ecx, byte [edi]
shl ecx, 0x18
mov dword [eax], ecx
movzx ecx, byte [edi + 1]
shl ecx, 0x10
or dword [eax], ecx
movzx ecx, byte [edi + 2]
shl ecx, 8
or dword [eax], ecx
movzx edx, byte [edi + 3]
or dword [eax], edx
mov edx, dword [ebp - 4]
mov edx, dword [edx]
add dword [ebp - 4], 4
mov ecx, eax
xor dword [ecx], edx
add edi, 4
add eax, 4
dec dword [ebp - 0x14]
jne 0x4060c3
xor eax, eax
inc eax
mov dword [ebp - 0x14], eax
mov edi, 0xff
cmp dword [esi + 0x3d0], eax
jle 0x4061f5
lea eax, [esi + 0x28]
mov dword [ebp - 0x10], eax
test ebx, ebx
jle 0x4061c3
mov ecx, dword [ebp - 0x20]
lea eax, [esi + 0x434]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
sub eax, ecx
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x24]
sub eax, ecx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x1c], ebx
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
add eax, ecx
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
mov edx, dword [ebp - 0x2c]
sar eax, 8
and eax, edi
mov dword [ebp - 0x30], eax
lea eax, [edx + ecx]
cdq
idiv ebx
mov ecx, dword [ebp - 0x30]
mov ecx, dword [ecx*4 + 0x4353a8]
mov eax, dword [esi + edx*4 + 0x454]
and eax, edi
xor ecx, dword [eax*4 + 0x4357a8]
mov eax, dword [ebp - 4]
cdq
idiv ebx
movsx eax, word [esi + edx*4 + 0x456]
and eax, edi
xor ecx, dword [eax*4 + 0x434fa8]
mov eax, dword [ebp - 0x18]
movzx edx, byte [eax + 0x23]
xor ecx, dword [edx*4 + 0x434ba8]
mov edx, dword [ebp - 0xc]
xor ecx, dword [edx]
add dword [ebp - 0xc], 4
mov dword [eax], ecx
add eax, 4
inc dword [ebp - 4]
dec dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
jne 0x406148
mov eax, ebx
shl eax, 2
push eax
lea eax, [esi + 0x434]
push eax
lea eax, [esi + 0x454]
push eax
call fcn.00412b40
add dword [ebp - 0x10], 0x20
add esp, 0xc
inc dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
cmp eax, dword [esi + 0x3d0]
jl 0x406118
and dword [ebp - 4], 0
test ebx, ebx
jle 0x4062c1
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
mov dword [ebp + 8], eax
lea eax, [esi + 0x454]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 8]
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x3d0]
mov edx, dword [ebp - 4]
lea eax, [edx + eax*8]
mov eax, dword [esi + eax*4 + 8]
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + 3]
mov dword [ebp - 0x14], eax
sar eax, 0x18
xor al, byte [edx + str.cw]
add dword [ebp - 0x10], 4
mov byte [ecx], al
mov eax, dword [ebp - 0x30]
add eax, dword [ebp + 8]
cdq
idiv ebx
movsx eax, word [esi + edx*4 + 0x456]
mov edx, dword [ebp - 0x14]
and eax, edi
sar edx, 0x10
xor dl, byte [eax + str.cw]
mov eax, dword [ebp + 8]
mov byte [ecx + 1], dl
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
mov edx, dword [ebp - 0x14]
sar eax, 8
and eax, edi
sar edx, 8
xor dl, byte [eax + str.cw]
mov eax, dword [ebp - 0x2c]
add eax, dword [ebp + 8]
mov byte [ecx + 2], dl
cdq
idiv ebx
mov eax, dword [esi + edx*4 + 0x454]
and eax, edi
mov al, byte [eax + str.cw]
xor al, byte [ebp - 0x14]
add ecx, 4
inc dword [ebp - 4]
inc dword [ebp + 8]
mov byte [ecx - 1], al
cmp dword [ebp - 4], ebx
jl 0x406225
pop ebx
pop edi
pop esi
leave
ret 4