Function at 0x543120
Capabilities:
Encode data using xor

Disassembly:
mov eax, 4
call fcn.0049d300
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [eax]
push edi
mov edi, dword [esp + 0x28]
je 0x543245
test esi, esi
mov ebx, dword [esp + 0x20]
je 0x54317f
jmp 0x543150
test ebx, ebx
je 0x54317f
mov edx, dword [esp + 0x18]
mov cl, byte [edx]
xor byte [esi + edi], cl
mov al, byte [esi + edi]
mov ecx, dword [esp + 0x1c]
mov byte [ecx], al
add ecx, 1
add edx, 1
add esi, 1
sub ebx, 1
and esi, 0xf
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
jne 0x543150
cmp ebx, 0x10
jb 0x5431fd
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov eax, edx
sub eax, edi
mov dword [esp + 0x30], eax
mov eax, ebx
shr eax, 4
mov ebp, ecx
mov dword [esp + 0x10], eax
shl eax, 4
add ecx, eax
sub ebp, edi
add edx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
push edx
push edi
push edi
call dword [esp + 0x40]
add esp, 0xc
cmp esi, 0x10
jae 0x5431e9
mov ecx, 0xf
sub ecx, esi
shr ecx, 2
lea eax, [esi + edi]
add ecx, 1
mov edx, dword [esp + 0x30]
mov edx, dword [edx + eax]
xor dword [eax], edx
mov edx, dword [eax]
mov dword [eax + ebp], edx
add eax, 4
sub ecx, 1
jne 0x5431d3
add dword [esp + 0x30], 0x10
sub ebx, 0x10
add ebp, 0x10
xor esi, esi
sub dword [esp + 0x10], 1
jne 0x5431b0
test ebx, ebx
je 0x54334c
mov eax, dword [esp + 0x24]
push eax
push edi
push edi
call dword [esp + 0x40]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
add esp, 0xc
lea eax, [esi + edi]
sub ebp, edi
sub ecx, edi
add esi, ebx
movzx edx, byte [eax + ebp]
xor byte [eax], dl
mov dl, byte [eax]
sub ebx, 1
mov byte [eax + ecx], dl
add eax, 1
test ebx, ebx
jne 0x543224
mov eax, dword [esp + 0x2c]
pop edi
mov dword [eax], esi
pop esi
pop ebp
pop ebx
pop ecx
ret
test esi, esi
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
je 0x543282
test ebp, ebp
je 0x54327a
mov dl, byte [esi + edi]
mov al, byte [ebx]
mov ecx, dword [esp + 0x1c]
xor dl, al
mov byte [ecx], dl
mov byte [esi + edi], al
add ecx, 1
add esi, 1
add ebx, 1
sub ebp, 1
and esi, 0xf
mov dword [esp + 0x1c], ecx
jne 0x543251
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], ebp
cmp ebp, 0x10
jb 0x54330a
mov eax, dword [esp + 0x1c]
sub eax, edi
mov dword [esp + 0x30], eax
mov eax, ebp
shr eax, 4
mov dword [esp + 0x10], eax
mov edi, edi
mov eax, dword [esp + 0x24]
push eax
push edi
push edi
call dword [esp + 0x40]
add esp, 0xc
cmp esi, 0x10
jae 0x5432e8
sub ebx, dword [esp + 0x1c]
mov ecx, 0xf
sub ecx, esi
shr ecx, 2
lea eax, [esi + edi]
add ecx, 1
mov edx, dword [esp + 0x30]
mov ebp, dword [eax]
add edx, eax
mov esi, dword [edx + ebx]
xor ebp, esi
mov dword [edx], ebp
mov dword [eax], esi
add eax, 4
sub ecx, 1
jne 0x5432c7
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov eax, 0x10
add dword [esp + 0x1c], eax
add dword [esp + 0x30], eax
sub ebp, eax
add ebx, eax
xor esi, esi
sub dword [esp + 0x10], 1
mov dword [esp + 0x20], ebp
mov dword [esp + 0x18], ebx
jne 0x5432a0
test ebp, ebp
je 0x54334c
mov eax, dword [esp + 0x24]
push eax
push edi
push edi
call dword [esp + 0x40]
mov ecx, dword [esp + 0x28]
sub ebx, ecx
sub ecx, edi
add esp, 0xc
lea eax, [esi + edi]
mov dword [esp + 0x30], ecx
add esi, ebp
jmp 0x543334
mov ecx, dword [esp + 0x30]
mov dl, byte [eax]
lea edi, [eax + ecx]
mov cl, byte [edi + ebx]
xor dl, cl
mov byte [edi], dl
sub ebp, 1
mov byte [eax], cl
add eax, 1
test ebp, ebp
jne 0x543330
mov eax, dword [esp + 0x2c]
pop edi
mov dword [eax], esi
pop esi
pop ebp
pop ebx
pop ecx
ret