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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp dword [ebp + 8], 0
push ebx
mov ebx, ecx
mov dword [ebp - 0x18], ebx
je 0x401bcc
push esi
mov esi, dword [ebp + 0xc]
push edi
push 0x10
pop eax
mov dword [ebx + 0x3cc], eax
lea edi, [ebx + 0x3d4]
mov dword [ebx + 0x3c8], eax
lea eax, [ebx + 0x3f4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebx + 0x3cc]
push dword [ebp + 0xc]
push eax
call fcn.0041dd20
mov eax, dword [ebx + 0x3c8]
add esp, 0xc
cmp eax, 0x10
je 0x401887
push 0xe
cmp eax, 0x18
pop eax
jne 0x4018a3
cmp dword [ebx + 0x3cc], 0x20
push 0xc
pop ecx
cmovne eax, ecx
jmp 0x4018a3
mov ecx, dword [ebx + 0x3cc]
cmp ecx, 0x10
jne 0x401897
push 0xa
pop eax
jmp 0x4018a3
push 0xe
pop eax
push 0xc
cmp ecx, 0x18
pop edx
cmove eax, edx
mov dword [ebx + 0x3d0], eax
xor esi, esi
mov eax, dword [ebx + 0x3cc]
mov ecx, dword [ebx + 0x3d0]
cdq
and edx, 3
lea edi, [edx + eax]
sar edi, 2
mov dword [ebp - 8], edi
test ecx, ecx
js 0x4018e8
lea edx, [ebx + 8]
test edi, edi
jle 0x4018da
mov ecx, edi
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ecx, dword [ebx + 0x3d0]
inc esi
add edx, 0x20
cmp esi, ecx
jle 0x4018cb
xor esi, esi
test ecx, ecx
js 0x401911
lea edx, [ebx + 0x1e8]
test edi, edi
jle 0x401903
mov ecx, edi
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
mov ecx, dword [ebx + 0x3d0]
inc esi
add edx, 0x20
cmp esi, ecx
jle 0x4018f4
mov eax, dword [ebx + 0x3c8]
inc ecx
cdq
and edx, 3
imul ecx, edi
lea esi, [edx + eax]
sar esi, 2
lea edx, [ebx + 0x414]
mov dword [ebp - 4], ecx
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edx
test esi, esi
jle 0x40197f
mov ebx, esi
mov edi, edx
mov esi, dword [ebp + 8]
movzx eax, byte [esi]
lea esi, [esi + 4]
shl eax, 0x18
mov dword [edi], eax
movzx edx, byte [esi - 3]
shl edx, 0x10
or edx, eax
mov dword [edi], edx
movzx ecx, byte [esi - 2]
shl ecx, 8
or ecx, edx
mov dword [edi], ecx
movzx eax, byte [esi - 1]
or eax, ecx
mov dword [edi], eax
lea edi, [edi + 4]
sub ebx, 1
jne 0x40193f
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp + 0xc], eax
test esi, esi
jle 0x4019d0
mov dword [ebp + 8], edx
cmp eax, ecx
jge 0x401b4c
cdq
idiv edi
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx]
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
lea ecx, [edx + ecx*8]
mov edx, dword [ebp + 8]
mov eax, dword [edx]
add edx, 4
mov dword [ebx + ecx*4 + 0x1e8], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 4]
inc eax
mov dword [ebp + 0xc], eax
mov dword [ebp + 8], edx
cmp eax, esi
jl 0x40198b
cmp eax, dword [ebp - 4]
jge 0x401b4c
mov dword [ebp + 8], 0x437888
mov edx, dword [ebx + esi*4 + 0x410]
mov eax, edx
sar eax, 0x10
movzx eax, al
movsx ecx, byte [eax + 0x43a9a8]
mov eax, dword [ebp + 8]
movsx eax, byte [eax]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
movzx eax, dl
shl ecx, 8
sar edx, 0x18
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
movzx eax, dl
shl ecx, 8
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
lea eax, [ebx + 0x414]
xor dword [eax], ecx
inc dword [ebp + 8]
cmp esi, 8
je 0x401a64
cmp esi, 1
jle 0x401ae8
lea ecx, [ebx + 0x418]
lea edx, [esi - 1]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x401a55
jmp 0x401ae2
push 3
lea ecx, [ebx + 0x418]
pop edx
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x401a6d
mov edx, dword [ebx + 0x420]
mov eax, edx
sar eax, 0x18
movzx eax, al
push 3
movsx ecx, byte [eax + 0x43a9a8]
mov eax, edx
sar eax, 0x10
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
mov eax, edx
sar eax, 8
movzx eax, al
shl ecx, 8
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
movzx eax, dl
shl ecx, 8
pop edx
movzx eax, byte [eax + 0x43a9a8]
xor ecx, eax
xor dword [ebx + 0x424], ecx
lea ecx, [ebx + 0x428]
mov eax, dword [ecx - 4]
xor dword [ecx], eax
lea ecx, [ecx + 4]
sub edx, 1
jne 0x401ad5
lea eax, [ebx + 0x414]
and dword [ebp - 0x14], 0
test esi, esi
jle 0x401b40
mov ecx, eax
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
jge 0x401b4c
cdq
idiv edi
mov ecx, dword [ecx]
lea esi, [edx + eax*8]
mov dword [ebx + esi*4 + 8], ecx
mov ecx, dword [ebx + 0x3d0]
mov esi, dword [ebp - 0x10]
sub ecx, eax
mov eax, dword [ebp - 0xc]
lea ecx, [edx + ecx*8]
mov edx, dword [ebp - 0x14]
mov eax, dword [eax]
inc edx
mov dword [ebx + ecx*4 + 0x1e8], eax
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp + 0xc]
add ecx, 4
inc eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0xc], ecx
mov dword [ebp + 0xc], eax
cmp edx, esi
jl 0x401af8
jmp 0x401b43
mov eax, dword [ebp + 0xc]
cmp eax, dword [ebp - 4]
jl 0x4019e0
xor esi, esi
inc esi
cmp dword [ebx + 0x3d0], esi
jle 0x401bc6
lea eax, [ebx + 0x208]
mov dword [ebp + 0xc], eax
test edi, edi
jle 0x401bb7
mov ebx, edi
mov dword [ebp + 8], eax
mov edi, eax
mov edx, dword [edi]
mov eax, edx
sar eax, 0x18
movzx ecx, al
mov eax, edx
sar eax, 0x10
movzx eax, al
mov ecx, dword [ecx*4 + 0x4384a8]
xor ecx, dword [eax*4 + 0x4380a8]
mov eax, edx
sar eax, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x437ca8]
movzx eax, dl
xor ecx, dword [eax*4 + 0x4378a8]
mov dword [edi], ecx
lea edi, [edi + 4]
sub ebx, 1
jne 0x401b6b
mov ebx, dword [ebp - 0x18]
mov edi, dword [ebp - 8]
mov eax, dword [ebp + 0xc]
inc esi
add eax, 0x20
mov dword [ebp + 0xc], eax
cmp esi, dword [ebx + 0x3d0]
jl 0x401b60
pop edi
mov byte [ebx + 4], 1
pop esi
pop ebx
leave
ret 0x10