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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00405cd8
xor eax, eax
push ebp
push 0x511c89
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
call fcn.00405998
test eax, eax
jns 0x51178c
add eax, 3
sar eax, 2
mov dword [ebp - 0x10], eax
mov al, byte [ebp - 0x10]
add al, 6
mov byte [ebx + 0x14], al
push 4
mov eax, dword [ebp - 0x10]
push eax
lea eax, [ebp - 0x14]
mov ecx, 2
mov edx, dword [0x50c420]
call fcn.00405b54
add esp, 8
mov eax, dword [ebp - 0x10]
dec eax
test eax, eax
jl 0x5117f3
inc eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 0
xor esi, esi
mov eax, dword [ebp - 8]
shl eax, 2
add eax, esi
mov edx, dword [ebp - 4]
mov al, byte [edx + eax]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
mov edx, dword [edx + ecx*4]
mov byte [edx + esi], al
inc esi
cmp esi, 4
jne 0x5117cb
inc dword [ebp - 8]
dec dword [ebp - 0x20]
jne 0x5117c9
xor eax, eax
mov dword [ebp - 0xc], eax
xor esi, esi
xor edi, edi
push 4
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
push eax
lea eax, [ebx + 0x1c]
mov ecx, 2
mov edx, dword [0x50c468]
call fcn.00405b54
add esp, 8
push 4
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
push eax
lea eax, [ebx + 0x18]
mov ecx, 2
mov edx, dword [0x50c468]
call fcn.00405b54
add esp, 8
jmp 0x511881
mov ecx, edi
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
inc edi
inc esi
cmp edi, dword [ebp - 0x10]
jge 0x511877
cmp esi, 4
jl 0x51183e
cmp esi, 4
jne 0x511881
xor esi, esi
inc dword [ebp - 0xc]
cmp edi, dword [ebp - 0x10]
jge 0x511891
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x51186d
xor eax, eax
mov dword [ebp - 0x1c], eax
jmp 0x511b9c
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 1]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 2]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 1], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax + 3]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 2], al
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp - 0x10]
mov eax, dword [eax + edx*4 - 4]
movzx eax, byte [eax]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx + 3], al
mov eax, dword [ebp - 0x1c]
mov al, byte [eax + 0x595954]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx]
xor byte [edx], al
inc dword [ebp - 0x1c]
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
xor ecx, ecx
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 1
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 2
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov eax, dword [ebp - 0x10]
sub eax, 4
je 0x511b43
sub eax, 2
je 0x511ac7
sub eax, 2
jne 0x511b2d
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 1]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 1], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 2]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 2], al
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xc]
movzx eax, byte [eax + 3]
mov al, byte [eax + 0x595854]
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x10]
xor byte [edx + 3], al
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov ecx, 7
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 6
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 7
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
jmp 0x511b43
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 3
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov edi, eax
mov ecx, 4
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
xor edi, eax
push edi
mov ecx, 5
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.005115d8
jmp 0x511b43
mov ecx, 0x511ca0
mov dl, 1
mov eax, dword [0x407d88]
call fcn.0040da34
call fcn.00403d74
xor edi, edi
jmp 0x511b8c
mov ecx, edi
mov edx, dword [ebp - 0x14]
mov eax, ebx
call fcn.00511578
mov dword [ebp - 0x18], eax
mov eax, dword [ebx + 0x1c]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 0xc]
mov eax, dword [eax + edx*4]
mov edx, dword [ebp - 0x18]
mov dword [eax + esi*4], edx
inc edi
inc esi
cmp edi, dword [ebp - 0x10]
jge 0x511b82
cmp esi, 4
jl 0x511b49
cmp esi, 4
jne 0x511b8c
inc dword [ebp - 0xc]
xor esi, esi
cmp edi, dword [ebp - 0x10]
jge 0x511b9c
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x511b78
xor eax, eax
mov al, byte [ebx + 0x14]
inc eax
cmp eax, dword [ebp - 0xc]
jg 0x51189b
xor eax, eax
mov al, byte [ebx + 0x14]
dec eax
test eax, eax
jle 0x511c5f
mov dword [ebp - 0x20], eax
mov dword [ebp - 8], 1
xor esi, esi
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
mov eax, dword [eax + esi*4]
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.0051172c
and eax, 0xff
mov edi, dword [eax*4 + 0x592654]
mov ecx, 1
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.0051172c
and eax, 0xff
xor edi, dword [eax*4 + 0x592a54]
mov ecx, 2
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.0051172c
and eax, 0xff
xor edi, dword [eax*4 + 0x592e54]
mov ecx, 3
mov edx, dword [ebp - 0x18]
mov eax, ebx
call fcn.0051172c
and eax, 0xff
xor edi, dword [eax*4 + 0x593254]
mov eax, dword [ebx + 0x18]
mov edx, dword [ebp - 8]
mov eax, dword [eax + edx*4]
mov dword [eax + esi*4], edi
inc esi
cmp esi, 4
jne 0x511bc5
inc dword [ebp - 8]
dec dword [ebp - 0x20]
jne 0x511bc3
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x511c90
lea eax, [ebp - 0x14]
mov edx, dword [0x50c420]
call fcn.00405c74
lea eax, [ebp - 4]
mov edx, dword [0x47e9c0]
call fcn.00405c74
ret