Function at 0x52ac50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a9fab
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x676664]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x14]
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x14c], esi
mov dword [ebp - 0x148], eax
call fcn.00462990
lea ecx, [esi + 0x34]
mov dword [ebp - 4], 0
call fcn.00410b60
test eax, eax
jne 0x52acc3
push 0x10
push eax
lea ecx, [esi + 0x34]
call fcn.00411b50
mov dword [esi + 0x30], 0xc
cmp dword [edi + 0x534], 0
je 0x52acd6
push str.Not_in_IV_mode.
jmp 0x52aee8
mov eax, dword [edi + 0x538]
cmp eax, 0x10
jge 0x52aee3
test eax, eax
js 0x52aee3
mov ecx, dword [esi + 0x30]
add ecx, eax
cmp ecx, 0xc
jbe 0x52acfe
or dword [edi + 0x530], 1
lea ecx, [esi + 0x34]
call fcn.00410b80
xor ebx, ebx
mov dword [ebp - 0x148], eax
cmp dword [edi + 0x538], ebx
jne 0x52ad83
test dword [esi + 0x30], 0xfffffff0
jbe 0x52ad81
lea esi, [edi + 0x4f0]
mov edx, dword [eax + ebx]
xor dword [esi], edx
mov ecx, dword [eax + ebx + 4]
xor dword [esi + 4], ecx
mov edx, dword [eax + ebx + 8]
xor dword [edi + 0x4f8], edx
mov eax, dword [eax + ebx + 0xc]
xor dword [edi + 0x4fc], eax
lea ecx, [ebp - 0x144]
push ecx
push edi
call fcn.00528730
mov edx, dword [ebp - 0x14c]
add esp, 8
add dword [edi + 0x540], 0x80
adc dword [edi + 0x544], 0
mov eax, dword [edx + 0x30]
and eax, 0xfffffff0
add ebx, 0x10
cmp ebx, eax
mov eax, dword [ebp - 0x148]
jb 0x52ad25
mov esi, edx
add eax, ebx
cmp ebx, dword [esi + 0x30]
jae 0x52aecd
lea esp, [esp]
mov dl, byte [eax]
mov ecx, dword [edi + 0x538]
mov byte [ecx + edi + 0x520], dl
inc dword [edi + 0x538]
inc eax
cmp dword [edi + 0x538], 0x10
mov dword [ebp - 0x148], eax
jne 0x52aec3
movzx ecx, byte [edi + 0x521]
movzx eax, byte [edi + 0x520]
xor byte [edi + 0x4f1], cl
xor byte [edi + 0x4f0], al
movzx ecx, byte [edi + 0x524]
movzx edx, byte [edi + 0x522]
movzx eax, byte [edi + 0x523]
xor byte [edi + 0x4f4], cl
xor byte [edi + 0x4f2], dl
xor byte [edi + 0x4f3], al
movzx ecx, byte [edi + 0x527]
movzx edx, byte [edi + 0x525]
movzx eax, byte [edi + 0x526]
xor byte [edi + 0x4f7], cl
xor byte [edi + 0x4f5], dl
xor byte [edi + 0x4f6], al
movzx ecx, byte [edi + 0x52a]
movzx edx, byte [edi + 0x528]
movzx eax, byte [edi + 0x529]
xor byte [edi + 0x4fa], cl
xor byte [edi + 0x4f8], dl
xor byte [edi + 0x4f9], al
movzx ecx, byte [edi + 0x52d]
movzx edx, byte [edi + 0x52b]
movzx eax, byte [edi + 0x52c]
xor byte [edi + 0x4fd], cl
xor byte [edi + 0x4fb], dl
xor byte [edi + 0x4fc], al
movzx edx, byte [edi + 0x52e]
movzx eax, byte [edi + 0x52f]
xor byte [edi + 0x4fe], dl
xor byte [edi + 0x4ff], al
lea esi, [edi + 0x4f0]
lea ecx, [ebp - 0x144]
push ecx
push edi
call fcn.00528730
mov esi, dword [ebp - 0x14c]
xor eax, eax
add esp, 8
add dword [edi + 0x540], 0x80
mov dword [edi + 0x538], eax
adc dword [edi + 0x544], eax
mov eax, dword [ebp - 0x148]
inc ebx
cmp ebx, dword [esi + 0x30]
jb 0x52ad90
lea ecx, [ebp - 0x144]
mov dword [ebp - 4], 0xffffffff
call fcn.004629b0
mov al, 1
jmp 0x52af09
push str.buflen_error.
mov ecx, dword [ebp - 0x148]
mov edx, dword [ecx]
mov eax, dword [edx + 0x14]
call eax
lea ecx, [ebp - 0x144]
mov dword [ebp - 4], 0xffffffff
call fcn.004629b0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0059af98
mov esp, ebp
pop ebp
ret 0x10