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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa4
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov dword [ebp - 0x14], eax
mov eax, edx
sub eax, 0x80
je 0x51f3cd
sub eax, 0x40
je 0x51f3d6
sub eax, 0x40
je 0x51f3df
jmp 0x51f3e8
mov dword [ebp - 4], 4
jmp 0x51f3f0
mov dword [ebp - 4], 6
jmp 0x51f3f0
mov dword [ebp - 4], 8
jmp 0x51f3f0
or eax, 0xffffffff
jmp 0x51f697
mov eax, ecx
sub eax, 0x80
je 0x51f405
sub eax, 0x40
je 0x51f40e
sub eax, 0x40
je 0x51f417
jmp 0x51f420
mov dword [ebp - 8], 4
jmp 0x51f42a
mov dword [ebp - 8], 6
jmp 0x51f42a
mov dword [ebp - 8], 8
jmp 0x51f42a
mov eax, 0xfffffffe
jmp 0x51f697
cmp ecx, edx
setle al
call fcn.0051f074
sub eax, 0x80
je 0x51f447
sub eax, 0x40
je 0x51f450
sub eax, 0x40
je 0x51f459
jmp 0x51f462
mov dword [ebp - 0xc], 0xa
jmp 0x51f46c
mov dword [ebp - 0xc], 0xc
jmp 0x51f46c
mov dword [ebp - 0xc], 0xe
jmp 0x51f46c
mov eax, 0xfffffffd
jmp 0x51f697
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jl 0x51f4a0
inc eax
mov dword [ebp - 0x18], eax
mov esi, ebx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x1c], eax
mov ecx, 4
mov eax, esi
mov edx, dword [ebp - 0x1c]
mov bl, byte [eax]
mov byte [edx], bl
add edx, 8
add eax, 8
dec ecx
jne 0x51f48a
inc dword [ebp - 0x1c]
inc esi
dec dword [ebp - 0x18]
jne 0x51f480
xor eax, eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
jmp 0x51f4e0
mov ecx, 4
lea esi, [ebp - 0x58]
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
shl eax, 2
lea eax, [edi + eax*8]
push eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
pop eax
add eax, edx
push eax
mov al, byte [esi + ebx]
pop edx
mov byte [edx], al
add edi, 8
add esi, 8
dec ecx
jne 0x51f4b4
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x51f685
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f4a9
jmp 0x51f685
xor ecx, ecx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x20], eax
lea eax, [ecx + 1]
and eax, 0x80000003
jns 0x51f511
dec eax
or eax, 0xfffffffc
inc eax
lea eax, [ebp + eax*8 - 0x58]
mov edx, dword [ebp - 4]
movzx eax, byte [eax + edx - 1]
mov al, byte [eax + 0x5c5c14]
mov edx, dword [ebp - 0x20]
xor byte [edx], al
inc ecx
add dword [ebp - 0x20], 8
cmp ecx, 4
jne 0x51f502
mov eax, dword [ebp - 0x14]
mov al, byte [eax*4 + 0x5c5e14]
xor byte [ebp - 0x58], al
inc dword [ebp - 0x14]
cmp dword [ebp - 4], 8
je 0x51f587
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jle 0x51f633
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x58]
mov dword [ebp - 0x24], eax
mov ecx, 4
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x28]
mov al, byte [eax]
mov edx, dword [ebp - 0x28]
xor byte [edx + 1], al
add dword [ebp - 0x28], 8
dec ecx
jne 0x51f568
inc dword [ebp - 0x24]
dec dword [ebp - 0x18]
jne 0x51f55d
jmp 0x51f633
mov ebx, 1
jmp 0x51f5ae
mov ecx, 4
lea eax, [ebp - 0x58]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov al, byte [eax + ebx - 1]
mov edx, dword [ebp - 0x2c]
xor byte [edx + ebx], al
add dword [ebp - 0x2c], 8
dec ecx
jne 0x51f599
inc ebx
mov dword [ebp - 0x5c], ebx
fild dword [ebp - 0x5c]
fild dword [ebp - 4]
fdiv dword [0x51f6a0]
fcompp
fnstsw ax
sahf
ja 0x51f58e
mov ecx, 4
lea eax, [ebp - 0x58]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
sar eax, 1
jns 0x51f5d9
adc eax, 0
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx + eax - 1]
mov al, byte [eax + 0x5c5c14]
mov edx, dword [ebp - 4]
sar edx, 1
jns 0x51f5f1
adc edx, 0
mov ebx, dword [ebp - 0x30]
xor byte [ebx + edx], al
add dword [ebp - 0x30], 8
dec ecx
jne 0x51f5cf
mov ebx, dword [ebp - 4]
sar ebx, 1
jns 0x51f608
adc ebx, 0
inc ebx
cmp ebx, dword [ebp - 4]
jge 0x51f633
mov ecx, 4
lea eax, [ebp - 0x58]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov al, byte [eax + ebx - 1]
mov edx, dword [ebp - 0x34]
xor byte [edx + ebx], al
add dword [ebp - 0x34], 8
dec ecx
jne 0x51f619
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x51f60e
xor ebx, ebx
jmp 0x51f674
mov ecx, 4
lea esi, [ebp - 0x58]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
shl eax, 2
mov edx, dword [ebp - 0x38]
lea eax, [edx + eax*8]
push eax
mov eax, dword [ebp - 0x10]
cdq
idiv dword [ebp - 8]
pop eax
lea edx, [eax + edx]
mov al, byte [esi + ebx]
mov byte [edx], al
add dword [ebp - 0x38], 8
add esi, 8
dec ecx
jne 0x51f645
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x51f685
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f637
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f4fa
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4