Function at 0x40ae30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x82c
mov eax, dword [0x551764]
xor eax, esp
mov dword [esp + 0x828], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, edx
push esi
mov esi, dword [ebp + 0xc]
push edi
xor edi, edi
mov dword [esp + 0x1c], ecx
mov ecx, dword [ebp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ecx
cmp dword [esi + 0x18], edi
jne 0x40ae8a
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret
cmp dword [ebp + 0x14], edi
jne 0x40afcf
lea ecx, [esp + 0x20]
call fcn.00409bc0
mov ecx, dword [esp + 0x18]
xor esi, esi
mov edi, dword [esp + 0xc]
mov eax, dword [ecx]
mov dword [esp + 0x820], eax
mov eax, dword [ecx + 4]
mov dword [esp + 0x824], eax
mov eax, dword [ecx + 8]
mov dword [esp + 0x828], eax
mov bl, byte [edi + esi]
or eax, 3
movzx eax, ax
mov ecx, eax
xor ecx, 1
imul ecx, eax
sar ecx, 8
xor bl, cl
mov byte [esp + 0x82c], cl
mov byte [esp + 0x18], bl
lea ecx, [esp + 0x20]
push dword [esp + 0x18]
call fcn.00409b40
inc esi
cmp esi, 0xc
jae 0x40af00
mov eax, dword [esp + 0x828]
jmp 0x40aec3
mov esi, dword [esp + 0x14]
test byte [esi + 8], 8
je 0x40af29
cmp bl, byte [esi + 0xd]
je 0x40af48
mov eax, 0x56
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret
cmp bl, byte [esi + 0x13]
je 0x40af48
mov eax, 0x56
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x828]
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret
mov ebx, dword [esp + 0x10]
sub ebx, 0xc
push ebx
push 0
push dword [0x576b44]
mov dword [esp + 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40afc9
xor esi, esi
test ebx, ebx
je 0x40afc5
mov edx, dword [esp + 0xc]
add edx, 0xc
mov dword [esp + 0xc], edx
nop dword [eax]
mov eax, dword [esp + 0x828]
mov bl, byte [edx + esi]
or eax, 3
movzx eax, ax
mov ecx, eax
xor ecx, 1
imul ecx, eax
sar ecx, 8
xor bl, cl
mov byte [esp + 0x82c], cl
mov byte [esp + 0x18], bl
lea ecx, [esp + 0x20]
push dword [esp + 0x18]
call fcn.00409b40
mov edx, dword [esp + 0xc]
mov byte [esi + edi], bl
inc esi
mov ebx, dword [esp + 0x10]
cmp esi, ebx
jb 0x40af80
mov esi, dword [esp + 0x14]
mov eax, edi
mov dword [esp + 0xc], edi
test eax, eax
je 0x40b070
test ebx, ebx
je 0x40b070
movzx ecx, word [esi + 0xa]
cmp ecx, 8
jne 0x40b051
push dword [esi + 0x18]
push 0
push dword [0x576b44]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x14], eax
test eax, eax
je 0x40b070
push dword [esi + 0x18]
mov ecx, dword [esp + 0x10]
mov edx, ebx
push eax
call fcn.0040ad90
mov ecx, eax
add esp, 8
mov dword [esp + 0x10], ecx
test ecx, ecx
jne 0x40b038
push dword [esi + 0x18]
mov esi, dword [esp + 0x18]
mov edx, esi
mov ecx, dword [esp + 0x20]
call fcn.0042abf0
add esp, 4
mov dword [esp + 0x10], eax
jmp 0x40b03c
mov esi, dword [esp + 0x14]
push esi
push 0
push dword [0x576b44]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ebx, dword [esp + 0x10]
jmp 0x40b075
test cx, cx
jne 0x40b069
mov ecx, dword [esp + 0x1c]
mov edx, eax
push ebx
call fcn.0042abf0
add esp, 4
mov ebx, eax
jmp 0x40b075
mov ebx, 0xb
jmp 0x40b075
mov ebx, 8
test edi, edi
je 0x40b088
push edi
push 0
push dword [0x576b44]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov ecx, dword [esp + 0x834]
mov eax, ebx
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004c715a
mov esp, ebp
pop ebp
ret