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

Disassembly:
push 0xd
pop ecx
push 0
loop 0x402ba4
push esi
mov esi, dword [esp + 0x44]
push edi
xor edi, edi
mov eax, esi
sub eax, 0x80
mov dword [esp + 0x14], edi
mov ecx, 6
je 0x402bc2
mov dword [esp + 8], 4
mov edx, dword [esp + 0x44]
mov eax, edx
sub eax, 0x80
je 0x402bd7
mov dword [esp + 0x48], 4
mov ecx, dword [esp + 0x48]
cmp edx, esi
mov eax, edx
jge 0x402beb
mov eax, esi
sub eax, 0x80
je 0x402bf2
mov dword [esp + 0xc], 0xa
cmp ecx, edi
push ebx
push ebp
jle 0x402c28
mov esi, dword [esp + 0x48]
lea eax, [esp + 0x24]
sub esi, eax
jmp 0x402c0c
lea eax, [esp + edi + 0x24]
mov edx, 4
lea esp, [esp]
mov bl, byte [esi + eax]
mov byte [eax], bl
add eax, 8
dec edx
jne 0x402c18
inc edi
cmp edi, ecx
jl 0x402c0c
mov ebx, dword [esp + 0x54]
xor edi, edi
test ecx, ecx
jle 0x402c92
mov eax, dword [esp + 0x14]
inc eax
imul eax, dword [esp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x402c48
mov eax, dword [esp + 0x18]
mov edi, edi
cmp edi, eax
jge 0x402c92
mov eax, edi
xor edx, edx
idiv dword [esp + 0x10]
mov dword [esp + 0x20], ecx
mov cl, byte [esp + edi + 0x34]
inc edi
lea esi, [eax*4]
lea eax, [edx + esi*8]
lea ebp, [eax + ebx]
mov al, byte [esp + edi + 0x23]
mov byte [ebp], al
mov al, byte [esp + edi + 0x2b]
mov byte [ebp + 8], al
lea eax, [edx + esi*8 + 0x10]
mov byte [eax + ebx], cl
mov al, byte [esp + edi + 0x3b]
mov ecx, dword [esp + 0x20]
cmp edi, ecx
lea edx, [edx + esi*8 + 0x18]
mov byte [edx + ebx], al
jl 0x402c42
mov eax, dword [esp + 0x14]
inc eax
imul eax, dword [esp + 0x10]
cmp edi, eax
mov dword [esp + 0x18], eax
jge 0x402e71
xor eax, eax
jmp 0x402cb8
mov ecx, dword [esp + 0x50]
xor eax, eax
jmp 0x402cb8
mov ecx, dword [esp + 0x50]
lea esi, [eax + 1]
mov edx, esi
and edx, 0x80000003
lea ebp, [esp + eax*8 + 0x24]
jns 0x402cce
dec edx
or edx, 0xfffffffc
inc edx
lea eax, [ecx + edx*8]
movzx ecx, byte [esp + eax + 0x23]
push 0x403875
push ecx
call fcn.00402e7b
add esp, 8
mov dl, byte [ebp]
xor dl, al
mov eax, esi
cmp eax, 4
mov byte [ebp], dl
jl 0x402cb4
mov esi, dword [esp + 0x1c]
mov eax, dword [esi*4 + 0x4036f3]
mov dl, byte [esp + 0x24]
mov ebp, dword [esp + 0x50]
xor dl, al
inc esi
cmp ebp, 8
mov byte [esp + 0x24], dl
mov dword [esp + 0x1c], esi
mov eax, 1
je 0x402d67
cmp ebp, eax
jle 0x402e14
jmp 0x402d25
mov dl, byte [esp + eax + 0x23]
mov cl, byte [esp + eax + 0x24]
xor cl, dl
mov dl, byte [esp + eax + 0x2c]
mov byte [esp + eax + 0x24], cl
mov cl, byte [esp + eax + 0x2b]
xor dl, cl
mov cl, byte [esp + eax + 0x34]
mov byte [esp + eax + 0x2c], dl
mov dl, byte [esp + eax + 0x33]
xor cl, dl
mov dl, byte [esp + eax + 0x3c]
mov byte [esp + eax + 0x34], cl
mov cl, byte [esp + eax + 0x3b]
xor dl, cl
mov byte [esp + eax + 0x3c], dl
inc eax
cmp eax, ebp
jl 0x402d25
jmp 0x402e14
mov dl, byte [esp + eax + 0x23]
mov cl, byte [esp + eax + 0x24]
xor cl, dl
mov dl, byte [esp + eax + 0x2c]
mov byte [esp + eax + 0x24], cl
mov cl, byte [esp + eax + 0x2b]
xor dl, cl
mov cl, byte [esp + eax + 0x34]
mov byte [esp + eax + 0x2c], dl
mov dl, byte [esp + eax + 0x33]
xor cl, dl
mov dl, byte [esp + eax + 0x3c]
mov byte [esp + eax + 0x34], cl
mov cl, byte [esp + eax + 0x3b]
xor dl, cl
mov byte [esp + eax + 0x3c], dl
inc eax
cmp eax, 4
jl 0x402d67
lea esi, [esp + 0x28]
mov ebp, 4
lea esp, [esp]
movzx edx, byte [esi - 1]
push 0x403875
push edx
call fcn.00402e7b
add esp, 8
xor byte [esi], al
add esi, 8
dec ebp
jne 0x402db1
mov eax, 5
lea ebx, [ebx]
mov cl, byte [esp + eax + 0x23]
mov dl, byte [esp + eax + 0x24]
xor dl, cl
mov cl, byte [esp + eax + 0x2c]
mov byte [esp + eax + 0x24], dl
mov dl, byte [esp + eax + 0x2b]
xor cl, dl
mov dl, byte [esp + eax + 0x34]
mov byte [esp + eax + 0x2c], cl
mov cl, byte [esp + eax + 0x33]
xor dl, cl
mov cl, byte [esp + eax + 0x3c]
mov byte [esp + eax + 0x34], dl
mov dl, byte [esp + eax + 0x3b]
xor cl, dl
mov byte [esp + eax + 0x3c], cl
inc eax
cmp eax, 8
jl 0x402dd2
mov ebp, dword [esp + 0x50]
xor esi, esi
test ebp, ebp
jle 0x402e67
cmp edi, dword [esp + 0x18]
jge 0x402e71
mov eax, edi
xor edx, edx
idiv dword [esp + 0x10]
shl eax, 2
lea ecx, [edx + eax*8]
lea ebp, [ecx + ebx]
mov cl, byte [esp + esi + 0x24]
mov byte [ebp], cl
mov cl, byte [esp + esi + 0x2c]
mov byte [ebp + 8], cl
lea ecx, [edx + eax*8 + 0x10]
mov dword [esp + 0x20], eax
mov al, byte [esp + esi + 0x34]
mov byte [ecx + ebx], al
mov eax, dword [esp + 0x20]
lea edx, [edx + eax*8 + 0x18]
mov al, byte [esp + esi + 0x3c]
mov byte [edx + ebx], al
mov eax, dword [esp + 0x50]
inc esi
inc edi
cmp esi, eax
jl 0x402e1a
cmp edi, dword [esp + 0x18]
jl 0x402cac
pop ebp
pop ebx
pop edi
xor eax, eax
pop esi
add esp, 0x34
ret