Function at 0x541860
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov eax, dword [esp + 0x50]
mov edx, dword [eax + 0xc]
mov eax, 0x8b
mov esi, dword [edx + 0x14]
lea ecx, [esi - 8]
cmp ecx, 8
jbe 0x541890
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
test esi, 7
jne 0x54187e
mov edi, dword [esp + 0x60]
cmp dword [esp + 0x58], edi
mov eax, 0xc8
jb 0x54187e
mov eax, dword [esp + 0x50]
mov ebx, dword [eax + 0x70]
cmp edi, ebx
jbe 0x541b5c
mov eax, dword [edx + 0x24]
test ebx, ebx
mov dword [esp + 0x24], eax
jne 0x5419da
cmp esi, dword [esp + 0x60]
ja 0x541be9
mov eax, dword [esp + 0x50]
sub dword [esp + 0x60], esi
mov dword [esp + 0x18], 0
add eax, 0x40
mov edi, eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x50]
add eax, 0x200
mov dword [esp + 0x20], eax
lea eax, [esi - 4]
shr eax, 2
lea eax, [eax*4 + 4]
mov dword [esp + 0x28], eax
add edi, eax
mov eax, esi
and eax, 3
mov dword [esp + 0x2c], eax
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 8], ebp
mov dword [esp], eax
mov dword [esp + 4], ebp
mov eax, dword [esp + 0x24]
call eax
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x54]
cmp ebx, eax
cmovae eax, ebx
mov ebx, dword [esp + 0x5c]
mov dword [esp + 0x18], eax
mov eax, ebp
add eax, 4
add ebx, 4
mov edx, dword [eax - 4]
xor edx, dword [ebx - 4]
add ecx, 4
cmp eax, edi
mov dword [ecx - 4], edx
jne 0x541941
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov ecx, edi
mov eax, dword [esp + 0x54]
add eax, ebx
add ebx, dword [esp + 0x5c]
test edx, edx
lea ebp, [eax + edx]
je 0x541989
add ecx, 1
add ebx, 1
movzx edx, byte [ecx - 1]
xor dl, byte [ebx - 1]
add eax, 1
cmp eax, ebp
mov byte [eax - 1], dl
jne 0x541972
mov eax, dword [esp + 0x60]
add dword [esp + 0x54], esi
add dword [esp + 0x5c], esi
sub eax, esi
cmp esi, dword [esp + 0x60]
ja 0x5419a6
mov dword [esp + 0x60], eax
jmp 0x541911
mov edx, dword [esp + 0x60]
test edx, edx
jne 0x541aa6
mov edi, dword [esp + 0x18]
xor eax, eax
test edi, edi
je 0x54187e
mov edx, edi
mov dword [esp + 0x18], eax
add edx, 0x10
mov dword [esp], edx
call dbg.__gcry_burn_stack
mov eax, dword [esp + 0x18]
jmp 0x54187e
mov edi, dword [esp + 0x50]
mov eax, esi
sub dword [esp + 0x60], ebx
sub eax, ebx
cmp ebx, 3
lea edx, [edi + eax + 0x40]
jbe 0x541bfc
lea ebp, [ebx - 4]
mov dword [esp + 0x18], esi
xor eax, eax
mov esi, dword [esp + 0x54]
mov edi, ebp
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x5c]
shr edi, 2
lea ebx, [edi*4 + 4]
mov ecx, dword [edx + eax]
xor ecx, dword [ebp + eax]
mov dword [esi + eax], ecx
add eax, 4
cmp eax, ebx
jne 0x541a14
mov ecx, dword [esp + 0x54]
mov ebp, dword [esp + 0x1c]
lea ebx, [edi*4]
add edx, eax
mov esi, dword [esp + 0x18]
add ecx, eax
add eax, dword [esp + 0x5c]
sub ebp, ebx
mov ebx, ebp
test ebx, ebx
lea edi, [ecx + ebx]
je 0x541a67
nop
lea esi, [esi]
add edx, 1
add eax, 1
movzx ebx, byte [edx - 1]
xor bl, byte [eax - 1]
add ecx, 1
cmp ecx, edi
mov byte [ecx - 1], bl
jne 0x541a50
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 0x70]
add dword [esp + 0x54], eax
add dword [esp + 0x5c], eax
mov eax, dword [esp + 0x50]
mov dword [eax + 0x70], 0
jmp 0x5418c5
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], 0
add eax, 0x40
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x50]
add eax, 0x200
mov dword [esp + 0x20], eax
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
mov dword [esp + 8], edi
mov dword [esp], eax
mov ebx, edi
mov dword [esp + 4], edi
mov eax, dword [esp + 0x24]
call eax
mov ecx, dword [esp + 0x18]
cmp ecx, eax
cmovae eax, ecx
sub esi, dword [esp + 0x60]
cmp dword [esp + 0x60], 3
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x50]
mov dword [eax + 0x70], esi
jbe 0x541c13
mov eax, dword [esp + 0x60]
mov ebx, dword [esp + 0x5c]
mov ecx, edi
mov edx, dword [esp + 0x54]
sub eax, 4
shr eax, 2
lea esi, [eax*4 + 4]
mov eax, dword [esp + 0x54]
add eax, esi
add ecx, 4
add ebx, 4
mov edi, dword [ecx - 4]
xor edi, dword [ebx - 4]
add edx, 4
cmp edx, eax
mov dword [edx - 4], edi
jne 0x541b05
mov ebx, dword [esp + 0x1c]
add dword [esp + 0x5c], esi
add ebx, esi
and dword [esp + 0x60], 3
je 0x5419b2
mov ecx, dword [esp + 0x60]
mov esi, dword [esp + 0x5c]
add ecx, eax
lea esi, [esi]
add ebx, 1
add esi, 1
movzx edx, byte [ebx - 1]
xor dl, byte [esi - 1]
add eax, 1
cmp eax, ecx
mov byte [eax - 1], dl
jne 0x541b40
jmp 0x5419b2
sub esi, ebx
cmp edi, 3
lea ecx, [eax + esi + 0x40]
jbe 0x541c09
mov eax, edi
mov esi, dword [esp + 0x5c]
mov edx, dword [esp + 0x54]
sub eax, 4
mov ebx, ecx
shr eax, 2
lea edi, [eax*4 + 4]
mov eax, dword [esp + 0x54]
add eax, edi
lea esi, [esi]
add ebx, 4
add esi, 4
mov ebp, dword [ebx - 4]
xor ebp, dword [esi - 4]
add edx, 4
cmp edx, eax
mov dword [edx - 4], ebp
jne 0x541b90
mov edx, dword [esp + 0x60]
add dword [esp + 0x5c], edi
add ecx, edi
and edx, 3
test edx, edx
lea ebx, [eax + edx]
mov esi, dword [esp + 0x5c]
je 0x541bd7
nop
add ecx, 1
add esi, 1
movzx edx, byte [ecx - 1]
xor dl, byte [esi - 1]
add eax, 1
cmp eax, ebx
mov byte [eax - 1], dl
jne 0x541bc0
mov eax, dword [esp + 0x50]
mov edi, dword [esp + 0x60]
sub dword [eax + 0x70], edi
xor eax, eax
jmp 0x54187e
mov eax, dword [esp + 0x60]
test eax, eax
jne 0x541a86
xor eax, eax
jmp 0x54187e
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x54]
jmp 0x541a44
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x60]
jmp 0x541bb3
mov eax, dword [esp + 0x54]
jmp 0x541b30