Function at 0x40bee0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0xc
call fcn.00474020
push ebp
mov ebp, dword [esp + 0x20]
xor ecx, ecx
push esi
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0x174]
mov dword [esp + 0xc], eax
mov eax, ebp
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x40c13f
jb 0x40bf1c
cmp eax, 0xffffffe0
ja 0x40c13f
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
je 0x40bf45
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.0040c830
add esp, 8
mov dword [esi + 0x16c], 0
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xf]
shl ecx, 8
or ecx, eax
push ebx
mov ebx, dword [esi + 0x168]
mov dword [esp + 0xc], ecx
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x1c], ecx
push edi
mov edi, dword [esp + 0x24]
mov dword [esp + 0x2c], edi
test ebx, ebx
je 0x40bfcb
test ebp, ebp
je 0x40bfaf
mov al, byte [ebx + esi + 0x10]
dec ebp
xor al, byte [edi]
inc edi
mov byte [ecx], al
inc ecx
xor byte [ebx + esi + 0x40], al
inc ebx
and ebx, 0xf
mov dword [esp + 0x20], ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x18], ebx
jne 0x40bf88
jmp 0x40bfb7
test ebx, ebx
jne 0x40c12f
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.0040c830
mov ecx, dword [esp + 0x28]
add esp, 8
cmp ebp, 0xc00
jb 0x40c066
mov ebx, dword [esp + 0x10]
mov eax, 0xaaaaaaab
mul ebp
shr edx, 0xb
mov dword [esp + 0x2c], edx
lea esp, [esp]
push esi
push dword [esp + 0x18]
push 0xc0
push ecx
push edi
call dword [esp + 0x44]
add ebx, 0xc0
mov eax, ebx
mov byte [esi + 0xf], bl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ebx
shr eax, 8
push 0xc00
push dword [esp + 0x38]
mov byte [esi + 0xe], al
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.0040c5f0
mov ecx, dword [esp + 0x44]
add esp, 0x24
add ecx, 0xc00
add edi, 0xc00
sub ebp, 0xc00
mov dword [esp + 0x20], ecx
dec dword [esp + 0x2c]
jne 0x40bff0
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x2c], edi
mov eax, ebp
and eax, 0xfffffff0
mov dword [esp + 0x18], eax
je 0x40c0d3
push esi
push dword [esp + 0x18]
mov edi, eax
shr edi, 4
push edi
push ecx
push dword [esp + 0x3c]
call dword [esp + 0x44]
mov ecx, dword [esp + 0x24]
add ecx, edi
mov edi, dword [esp + 0x40]
mov eax, ecx
mov dword [esp + 0x24], ecx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esp + 0x2c]
add edi, eax
push eax
push dword [esp + 0x38]
sub ebp, eax
mov byte [esi + 0xf], cl
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.0040c5f0
mov eax, dword [esp + 0x3c]
add esp, 0x24
add dword [esp + 0x20], eax
test ebp, ebp
je 0x40c12f
push dword [esp + 0x14]
lea eax, [esi + 0x10]
push eax
mov eax, dword [esi + 0x170]
push esi
call eax
mov ecx, dword [esp + 0x1c]
add esp, 0xc
inc ecx
mov eax, ecx
mov byte [esi + 0xf], cl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [esp + 0x20]
sub edi, eax
lea edx, [ebx + eax]
movzx eax, byte [edi + edx]
lea edx, [edx + 1]
movzx ecx, byte [esi + ebx + 0x10]
xor ecx, eax
lea eax, [esi + ebx]
mov byte [edx - 1], cl
inc ebx
xor byte [eax + 0x40], cl
dec ebp
jne 0x40c114
pop edi
mov dword [esi + 0x168], ebx
xor eax, eax
pop ebx
pop esi
pop ebp
add esp, 0xc
ret
pop esi
or eax, 0xffffffff
pop ebp
add esp, 0xc
ret