Function at 0x51f380
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 0x51f3a5
sub eax, 0x40
je 0x51f3ae
sub eax, 0x40
je 0x51f3b7
jmp 0x51f3c0
mov dword [ebp - 4], 4
jmp 0x51f3c8
mov dword [ebp - 4], 6
jmp 0x51f3c8
mov dword [ebp - 4], 8
jmp 0x51f3c8
or eax, 0xffffffff
jmp 0x51f66f
mov eax, ecx
sub eax, 0x80
je 0x51f3dd
sub eax, 0x40
je 0x51f3e6
sub eax, 0x40
je 0x51f3ef
jmp 0x51f3f8
mov dword [ebp - 8], 4
jmp 0x51f402
mov dword [ebp - 8], 6
jmp 0x51f402
mov dword [ebp - 8], 8
jmp 0x51f402
mov eax, 0xfffffffe
jmp 0x51f66f
cmp ecx, edx
setle al
call fcn.0051f04c
sub eax, 0x80
je 0x51f41f
sub eax, 0x40
je 0x51f428
sub eax, 0x40
je 0x51f431
jmp 0x51f43a
mov dword [ebp - 0xc], 0xa
jmp 0x51f444
mov dword [ebp - 0xc], 0xc
jmp 0x51f444
mov dword [ebp - 0xc], 0xe
jmp 0x51f444
mov eax, 0xfffffffd
jmp 0x51f66f
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jl 0x51f478
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 0x51f462
inc dword [ebp - 0x1c]
inc esi
dec dword [ebp - 0x18]
jne 0x51f458
xor eax, eax
mov dword [ebp - 0x10], eax
xor ebx, ebx
jmp 0x51f4b8
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 0x51f48c
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x51f65d
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f481
jmp 0x51f65d
xor ecx, ecx
lea eax, [ebp - 0x58]
mov dword [ebp - 0x20], eax
lea eax, [ecx + 1]
and eax, 0x80000003
jns 0x51f4e9
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 + 0x5c6c14]
mov edx, dword [ebp - 0x20]
xor byte [edx], al
inc ecx
add dword [ebp - 0x20], 8
cmp ecx, 4
jne 0x51f4da
mov eax, dword [ebp - 0x14]
mov al, byte [eax*4 + 0x5c6e14]
xor byte [ebp - 0x58], al
inc dword [ebp - 0x14]
cmp dword [ebp - 4], 8
je 0x51f55f
mov eax, dword [ebp - 4]
dec eax
test eax, eax
jle 0x51f60b
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 0x51f540
inc dword [ebp - 0x24]
dec dword [ebp - 0x18]
jne 0x51f535
jmp 0x51f60b
mov ebx, 1
jmp 0x51f586
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 0x51f571
inc ebx
mov dword [ebp - 0x5c], ebx
fild dword [ebp - 0x5c]
fild dword [ebp - 4]
fdiv dword [0x51f678]
fcompp
fnstsw ax
sahf
ja 0x51f566
mov ecx, 4
lea eax, [ebp - 0x58]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 4]
sar eax, 1
jns 0x51f5b1
adc eax, 0
mov edx, dword [ebp - 0x30]
movzx eax, byte [edx + eax - 1]
mov al, byte [eax + 0x5c6c14]
mov edx, dword [ebp - 4]
sar edx, 1
jns 0x51f5c9
adc edx, 0
mov ebx, dword [ebp - 0x30]
xor byte [ebx + edx], al
add dword [ebp - 0x30], 8
dec ecx
jne 0x51f5a7
mov ebx, dword [ebp - 4]
sar ebx, 1
jns 0x51f5e0
adc ebx, 0
inc ebx
cmp ebx, dword [ebp - 4]
jge 0x51f60b
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 0x51f5f1
inc ebx
cmp ebx, dword [ebp - 4]
jl 0x51f5e6
xor ebx, ebx
jmp 0x51f64c
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 0x51f61d
inc ebx
inc dword [ebp - 0x10]
cmp ebx, dword [ebp - 4]
jge 0x51f65d
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f60f
mov eax, dword [ebp - 0xc]
inc eax
imul dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jg 0x51f4d2
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4