Function at 0x404710
Capabilities:
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0x80
je 0x40473c
cmp dword [ebp - 0x50], 0xc0
je 0x40474b
cmp dword [ebp - 0x50], 0x100
je 0x40475a
jmp 0x404769
mov eax, dword [ebp + 8]
mov dword [eax + 0x200], 0xa
jmp 0x404773
mov eax, dword [ebp + 8]
mov dword [eax + 0x200], 0xc
jmp 0x404773
mov eax, dword [ebp + 8]
mov dword [eax + 0x200], 0xe
jmp 0x404773
mov eax, 1
jmp 0x40506e
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0
jmp 0x40478b
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
sar eax, 5
cmp dword [ebp - 4], eax
jge 0x4047db
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + eax*4]
shl edx, 0x18
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
movzx eax, byte [ecx + eax*4 + 1]
shl eax, 0x10
or edx, eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + ecx*4 + 2]
shl ecx, 8
or edx, ecx
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
movzx eax, byte [ecx + eax*4 + 3]
or edx, eax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov dword [eax + ecx*4], edx
jmp 0x404782
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 0x80
je 0x404809
cmp dword [ebp - 0x50], 0xc0
je 0x404951
cmp dword [ebp - 0x50], 0x100
je 0x404aed
jmp 0x404d3e
mov dword [ebp - 4], 0
jmp 0x404824
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
add ecx, 0x10
mov dword [ebp - 8], ecx
cmp dword [ebp - 4], 0xa
jge 0x40494c
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + ecx]
xor ecx, dword [eax*4 + 0x438860]
mov edx, 4
imul eax, edx, 3
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 0x10
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x18
xor ecx, eax
mov edx, 4
imul eax, edx, 3
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 8
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x10
xor ecx, eax
mov edx, 4
imul eax, edx, 3
mov edx, dword [ebp - 8]
movzx eax, byte [edx + eax]
mov edx, dword [eax*4 + str.cwko0]
shl edx, 8
xor ecx, edx
mov eax, 4
imul edx, eax, 3
mov eax, dword [ebp - 8]
mov edx, dword [eax + edx]
shr edx, 0x18
movzx eax, dl
xor ecx, dword [eax*4 + str.cwko0]
mov edx, 4
shl edx, 2
mov eax, dword [ebp - 8]
mov dword [eax + edx], ecx
mov eax, 4
shl eax, 0
mov ecx, 4
shl ecx, 2
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [edx + eax]
xor eax, dword [esi + ecx]
mov ecx, 4
imul edx, ecx, 5
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
shl eax, 1
mov ecx, 4
imul edx, ecx, 5
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor eax, dword [esi + edx]
mov ecx, 4
imul edx, ecx, 6
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
imul ecx, eax, 3
mov edx, 4
imul eax, edx, 6
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 7
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
jmp 0x404812
jmp 0x404d3e
mov dword [ebp - 4], 0
jmp 0x40496c
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
add ecx, 0x18
mov dword [ebp - 8], ecx
cmp dword [ebp - 4], 8
jge 0x404ae8
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + ecx]
xor ecx, dword [eax*4 + 0x438860]
mov edx, 4
imul eax, edx, 5
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 0x10
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x18
xor ecx, eax
mov edx, 4
imul eax, edx, 5
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 8
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x10
xor ecx, eax
mov edx, 4
imul eax, edx, 5
mov edx, dword [ebp - 8]
movzx eax, byte [edx + eax]
mov edx, dword [eax*4 + str.cwko0]
shl edx, 8
xor ecx, edx
mov eax, 4
imul edx, eax, 5
mov eax, dword [ebp - 8]
mov edx, dword [eax + edx]
shr edx, 0x18
movzx eax, dl
xor ecx, dword [eax*4 + str.cwko0]
mov edx, 4
imul eax, edx, 6
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
mov eax, 4
shl eax, 0
mov ecx, 4
imul edx, ecx, 6
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor eax, dword [esi + edx]
mov ecx, 4
imul edx, ecx, 7
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
shl eax, 1
mov ecx, 4
imul edx, ecx, 7
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor eax, dword [esi + edx]
mov ecx, 4
shl ecx, 3
mov edx, dword [ebp - 8]
mov dword [edx + ecx], eax
mov eax, 4
imul ecx, eax, 3
mov edx, 4
shl edx, 3
mov eax, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [eax + ecx]
xor ecx, dword [esi + edx]
mov edx, 4
imul eax, edx, 9
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
mov eax, 4
shl eax, 2
mov ecx, 4
imul edx, ecx, 9
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor eax, dword [esi + edx]
mov ecx, 4
imul edx, ecx, 0xa
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
imul ecx, eax, 5
mov edx, 4
imul eax, edx, 0xa
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 0xb
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
jmp 0x40495a
jmp 0x404d3e
mov dword [ebp - 4], 0
jmp 0x404b08
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 8]
add ecx, 0x20
mov dword [ebp - 8], ecx
cmp dword [ebp - 4], 7
jge 0x404d3e
mov eax, 4
imul ecx, eax, 0
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + ecx]
xor ecx, dword [eax*4 + 0x438860]
mov edx, 4
imul eax, edx, 7
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 0x10
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x18
xor ecx, eax
mov edx, 4
imul eax, edx, 7
mov edx, dword [ebp - 8]
mov eax, dword [edx + eax]
shr eax, 8
movzx edx, al
mov eax, dword [edx*4 + str.cwko0]
shl eax, 0x10
xor ecx, eax
mov edx, 4
imul eax, edx, 7
mov edx, dword [ebp - 8]
movzx eax, byte [edx + eax]
mov edx, dword [eax*4 + str.cwko0]
shl edx, 8
xor ecx, edx
mov eax, 4
imul edx, eax, 7
mov eax, dword [ebp - 8]
mov edx, dword [eax + edx]
shr edx, 0x18
movzx eax, dl
xor ecx, dword [eax*4 + str.cwko0]
mov edx, 4
shl edx, 3
mov eax, dword [ebp - 8]
mov dword [eax + edx], ecx
mov eax, 4
shl eax, 0
mov ecx, 4
shl ecx, 3
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [edx + eax]
xor eax, dword [esi + ecx]
mov ecx, 4
imul edx, ecx, 9
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
shl eax, 1
mov ecx, 4
imul edx, ecx, 9
mov ecx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov eax, dword [ecx + eax]
xor eax, dword [esi + edx]
mov ecx, 4
imul edx, ecx, 0xa
mov ecx, dword [ebp - 8]
mov dword [ecx + edx], eax
mov eax, 4
imul ecx, eax, 3
mov edx, 4
imul eax, edx, 0xa
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 0xb
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
mov eax, 4
shl eax, 2
mov ecx, 4
imul edx, ecx, 0xb
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + edx]
shr edx, 0x18
movzx ecx, dl
mov edx, dword [ecx*4 + str.cwko0]
shl edx, 0x18
mov ecx, dword [ebp - 8]
xor edx, dword [ecx + eax]
mov eax, 4
imul ecx, eax, 0xb
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx]
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [eax*4 + str.cwko0]
shl ecx, 0x10
xor edx, ecx
mov eax, 4
imul ecx, eax, 0xb
mov eax, dword [ebp - 8]
mov ecx, dword [eax + ecx]
shr ecx, 8
movzx eax, cl
mov ecx, dword [eax*4 + str.cwko0]
shl ecx, 8
xor edx, ecx
mov eax, 4
imul ecx, eax, 0xb
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + ecx]
xor edx, dword [ecx*4 + str.cwko0]
mov eax, 4
imul ecx, eax, 0xc
mov eax, dword [ebp - 8]
mov dword [eax + ecx], edx
mov eax, 4
imul ecx, eax, 5
mov edx, 4
imul eax, edx, 0xc
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 0xd
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
mov eax, 4
imul ecx, eax, 6
mov edx, 4
imul eax, edx, 0xd
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 0xe
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
mov eax, 4
imul ecx, eax, 7
mov edx, 4
imul eax, edx, 0xe
mov edx, dword [ebp - 8]
mov esi, dword [ebp - 8]
mov ecx, dword [edx + ecx]
xor ecx, dword [esi + eax]
mov edx, 4
imul eax, edx, 0xf
mov edx, dword [ebp - 8]
mov dword [edx + eax], ecx
jmp 0x404af6
cmp dword [0x438888], 0
je 0x404dde
mov dword [ebp - 4], 0
jmp 0x404d5d
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x100
jge 0x404dd4
mov eax, dword [ebp - 4]
mov ecx, dword [eax*4 + str.cwko0]
mov edx, dword [ebp - 4]
mov eax, dword [ecx*4 + 0x437860]
mov dword [edx*4 + 0x43a3c8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax*4 + str.cwko0]
mov edx, dword [ebp - 4]
mov eax, dword [ecx*4 + 0x437c60]
mov dword [edx*4 + 0x43a7c8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax*4 + str.cwko0]
mov edx, dword [ebp - 4]
mov eax, dword [ecx*4 + 0x438060]
mov dword [edx*4 + 0x43abc8], eax
mov eax, dword [ebp - 4]
mov ecx, dword [eax*4 + str.cwko0]
mov edx, dword [ebp - 4]
mov eax, dword [ecx*4 + 0x438460]
mov dword [edx*4 + 0x43afc8], eax
jmp 0x404d54
mov dword [0x438888], 0
mov eax, dword [ebp + 8]
add eax, 0x100
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov dword [ebp - 4], 1
jmp 0x404e6b
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 4]
cmp ecx, dword [eax + 0x200]
jge 0x404ff3
mov eax, dword [ebp - 8]
sub eax, 0x20
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x18
movzx edx, cl
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [edx*4 + 0x43a3c8]
xor ecx, dword [eax*4 + 0x43a7c8]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 8
movzx edx, al
xor ecx, dword [edx*4 + 0x43abc8]
mov eax, dword [ebp - 8]
movzx edx, byte [eax]
xor ecx, dword [edx*4 + 0x43afc8]
mov eax, dword [ebp - 0xc]
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x18
movzx edx, cl
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [edx*4 + 0x43a3c8]
xor ecx, dword [eax*4 + 0x43a7c8]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 8
movzx edx, al
xor ecx, dword [edx*4 + 0x43abc8]
mov eax, dword [ebp - 8]
movzx edx, byte [eax]
xor ecx, dword [edx*4 + 0x43afc8]
mov eax, dword [ebp - 0xc]
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x18
movzx edx, cl
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [edx*4 + 0x43a3c8]
xor ecx, dword [eax*4 + 0x43a7c8]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 8
movzx edx, al
xor ecx, dword [edx*4 + 0x43abc8]
mov eax, dword [ebp - 8]
movzx edx, byte [eax]
xor ecx, dword [edx*4 + 0x43afc8]
mov eax, dword [ebp - 0xc]
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x18
movzx edx, cl
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
shr ecx, 0x10
movzx eax, cl
mov ecx, dword [edx*4 + 0x43a3c8]
xor ecx, dword [eax*4 + 0x43a7c8]
mov edx, dword [ebp - 8]
mov eax, dword [edx]
shr eax, 8
movzx edx, al
xor ecx, dword [edx*4 + 0x43abc8]
mov eax, dword [ebp - 8]
movzx edx, byte [eax]
xor ecx, dword [edx*4 + 0x43afc8]
mov eax, dword [ebp - 0xc]
mov dword [eax], ecx
mov ecx, dword [ebp - 0xc]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 8]
add eax, 4
mov dword [ebp - 8], eax
jmp 0x404e62
mov eax, dword [ebp - 8]
sub eax, 0x20
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
mov dword [eax], edx
mov eax, dword [ebp - 0xc]
add eax, 4
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 8]
add ecx, 4
mov dword [ebp - 8], ecx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret