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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov edx, dword [ebp + 8]
push ebx
xor eax, eax
push esi
mov ebx, dword [edx + 0x1c]
push edi
sub ebx, 6
mov dword [ebp - 4], eax
cmp ebx, eax
mov dword [ebp - 0xc], ebx
jle 0x5200b8
mov esi, dword [ebp + 0xc]
mov ecx, ebx
lea edi, [ebp - 0x2c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
mov esi, 4
test ebx, ebx
jle 0x52011a
mov dword [ebp - 8], 8
mov edi, dword [ebp - 4]
cmp edi, dword [edx + 0x1c]
ja 0x52011a
cmp ecx, ebx
jge 0x520101
lea edi, [ebp + ecx*4 - 0x2c]
mov dword [ebp + 0xc], edi
cmp eax, esi
jge 0x520103
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 0xc]
add esi, eax
inc ecx
mov edi, dword [edi]
mov dword [edx + esi*4], edi
mov edi, dword [ebp + 0xc]
mov esi, 4
add edi, esi
inc eax
cmp ecx, ebx
mov dword [ebp + 0xc], edi
jl 0x5200dd
cmp eax, esi
jne 0x520116
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 4]
add eax, esi
inc edi
mov dword [ebp - 8], eax
mov dword [ebp - 4], edi
xor eax, eax
cmp ecx, ebx
jl 0x5200ca
mov ecx, dword [ebp - 4]
mov esi, dword [edx + 0x1c]
cmp ecx, esi
ja 0x52029f
mov esi, 0x8df2f8
jmp 0x520132
mov esi, dword [ebp - 8]
mov cl, byte [ebp - 0x2c]
xor edx, edx
mov dl, byte [ebp + ebx*4 - 0x2f]
add esi, 4
mov dword [ebp - 8], esi
xor cl, byte [edx + 0x8dc0f8]
xor edx, edx
mov byte [ebp - 0x2c], cl
mov dl, byte [ebp + ebx*4 - 0x2e]
mov dl, byte [edx + 0x8dc0f8]
xor byte [ebp - 0x2b], dl
xor edx, edx
mov dl, byte [ebp + ebx*4 - 0x2d]
mov dl, byte [edx + 0x8dc0f8]
xor byte [ebp - 0x2a], dl
xor edx, edx
mov dl, byte [ebp + ebx*4 - 0x30]
mov dl, byte [edx + 0x8dc0f8]
xor byte [ebp - 0x29], dl
mov dl, byte [esi - 4]
xor cl, dl
cmp ebx, 8
mov byte [ebp - 0x2c], cl
je 0x5201a7
cmp ebx, 1
jle 0x520231
lea ecx, [ebp - 0x28]
lea edx, [ebx - 1]
mov esi, dword [ecx - 4]
mov edi, dword [ecx]
xor edi, esi
mov dword [ecx], edi
add ecx, 4
dec edx
jne 0x520193
jmp 0x520231
lea ecx, [ebp - 0x28]
mov edx, 3
mov esi, dword [ecx - 4]
mov edi, dword [ecx]
xor edi, esi
mov dword [ecx], edi
add ecx, 4
dec edx
jne 0x5201af
mov ecx, dword [ebp - 0x20]
and ecx, 0xff
mov dl, byte [ecx + 0x8dc0f8]
mov cl, byte [ebp - 0x1c]
xor cl, dl
mov byte [ebp - 0x1c], cl
mov ecx, dword [ebp - 0x1f]
and ecx, 0xff
mov dl, byte [ecx + 0x8dc0f8]
mov cl, byte [ebp - 0x1b]
xor cl, dl
mov byte [ebp - 0x1b], cl
mov ecx, dword [ebp - 0x1e]
and ecx, 0xff
mov dl, byte [ecx + 0x8dc0f8]
mov cl, byte [ebp - 0x1a]
xor cl, dl
mov byte [ebp - 0x1a], cl
mov ecx, dword [ebp - 0x1d]
and ecx, 0xff
mov dl, byte [ecx + 0x8dc0f8]
mov cl, byte [ebp - 0x19]
xor cl, dl
mov edx, 3
mov byte [ebp - 0x19], cl
lea ecx, [ebp - 0x18]
mov esi, dword [ecx - 4]
mov edi, dword [ecx]
xor edi, esi
mov dword [ecx], edi
add ecx, 4
dec edx
jne 0x520222
xor ecx, ecx
test ebx, ebx
jle 0x520290
mov edx, dword [ebp - 4]
lea edx, [edx*4 + 8]
mov dword [ebp + 0xc], edx
mov edx, dword [ebp + 8]
mov esi, dword [ebp - 4]
cmp esi, dword [edx + 0x1c]
ja 0x520290
cmp ecx, ebx
jge 0x520275
lea edx, [ebp + ecx*4 - 0x2c]
cmp eax, 4
jge 0x520278
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov edi, dword [edx]
add esi, eax
inc ecx
add edx, 4
mov dword [ebx + esi*4], edi
mov ebx, dword [ebp - 0xc]
inc eax
cmp ecx, ebx
jl 0x520257
cmp eax, 4
jne 0x52028c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 4]
add eax, 4
inc edx
mov dword [ebp + 0xc], eax
mov dword [ebp - 4], edx
xor eax, eax
cmp ecx, ebx
jl 0x520244
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 4]
cmp ecx, dword [edx + 0x1c]
jbe 0x52012f
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret