Function at 0x5076e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 0x18
push 0x564342
push ebx
call fcn.005059e0
mov esi, dword [ebp + 8]
push 0x10
push dword [esi]
push ebx
call fcn.005059e0
push 0x18
push dword [esi + 4]
push ebx
call fcn.005059e0
mov edi, dword [esi + 4]
mov eax, 1
add esp, 0x24
cmp edi, eax
jle 0x507732
mov edx, dword [esi + 8]
mov cl, byte [edx + eax - 1]
test cl, cl
je 0x507732
cmp byte [edx + eax], cl
jl 0x507732
inc eax
cmp eax, edi
jl 0x507720
push 1
cmp eax, edi
jne 0x5077dd
push 1
push ebx
mov dword [ebp + 8], 0
call fcn.005059e0
mov eax, dword [esi + 8]
push 5
movsx eax, byte [eax]
dec eax
push eax
push ebx
call fcn.005059e0
mov eax, dword [esi + 4]
mov edi, 1
add esp, 0x18
cmp eax, edi
jle 0x5077c1
nop word [eax + eax]
mov eax, dword [esi + 8]
mov cl, byte [edi + eax]
mov al, byte [edi + eax - 1]
cmp cl, al
jle 0x5077b6
movsx ebx, cl
movsx eax, al
cmp eax, ebx
jge 0x5077b6
sub ebx, eax
nop word [eax + eax]
mov eax, dword [esi + 4]
sub eax, dword [ebp + 8]
push eax
call fcn.005061a0
push eax
mov eax, edi
sub eax, dword [ebp + 8]
push eax
push dword [ebp + 0xc]
call fcn.005059e0
add esp, 0x10
mov dword [ebp + 8], edi
sub ebx, 1
jne 0x507790
mov eax, dword [esi + 4]
inc edi
cmp edi, eax
jl 0x507770
mov ebx, dword [ebp + 0xc]
sub eax, dword [ebp + 8]
push eax
call fcn.005061a0
sub edi, dword [ebp + 8]
push eax
push edi
push ebx
call fcn.005059e0
add esp, 0x10
jmp 0x507880
push 0
push ebx
call fcn.005059e0
mov ecx, dword [esi + 4]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x5077ff
mov edx, dword [esi + 8]
cmp byte [edx + eax], 0
je 0x5077ff
inc eax
cmp eax, ecx
jl 0x5077f4
push 1
cmp eax, ecx
jne 0x507833
push 0
push ebx
call fcn.005059e0
xor edi, edi
add esp, 0xc
cmp dword [esi + 4], edi
jle 0x507880
mov eax, dword [esi + 8]
push 5
movsx eax, byte [eax + edi]
dec eax
push eax
push ebx
call fcn.005059e0
inc edi
add esp, 0xc
cmp edi, dword [esi + 4]
jl 0x507817
jmp 0x507880
push 1
push ebx
call fcn.005059e0
xor edi, edi
add esp, 0xc
cmp dword [esi + 4], edi
jle 0x507880
mov eax, dword [esi + 8]
cmp byte [edi + eax], 0
jne 0x507855
xor eax, eax
lea ecx, [eax + 1]
jmp 0x50786f
push 1
push 1
push ebx
call fcn.005059e0
mov eax, dword [esi + 8]
add esp, 0xc
mov ecx, 5
movsx eax, byte [eax + edi]
dec eax
push ecx
push eax
push ebx
call fcn.005059e0
inc edi
add esp, 0xc
cmp edi, dword [esi + 4]
jl 0x507845
push 4
push dword [esi + 0xc]
push ebx
call fcn.005059e0
mov eax, dword [esi + 0xc]
add esp, 0xc
sub eax, 0
je 0x50792e
sub eax, 1
je 0x5078a4
sub eax, 1
jne 0x5078aa
cmp dword [esi + 0x20], 0
jne 0x5078b2
pop edi
pop esi
or eax, 0xffffffff
pop ebx
pop ebp
ret
push 0x20
push dword [esi + 0x10]
push ebx
call fcn.005059e0
push 0x20
push dword [esi + 0x14]
push ebx
call fcn.005059e0
mov eax, dword [esi + 0x18]
push 4
dec eax
push eax
push ebx
call fcn.005059e0
push 1
push dword [esi + 0x1c]
push ebx
call fcn.005059e0
mov eax, dword [esi + 0xc]
add esp, 0x30
sub eax, 1
je 0x5078f8
sub eax, 1
jne 0x50792e
mov eax, dword [esi + 4]
imul eax, dword [esi]
jmp 0x507901
push esi
call fcn.00505bc0
add esp, 4
xor edi, edi
mov dword [ebp + 8], eax
test eax, eax
jle 0x50792e
nop word [eax + eax]
mov eax, dword [esi + 0x20]
push dword [esi + 0x18]
mov eax, dword [eax + edi*4]
cdq
xor eax, edx
sub eax, edx
push eax
push ebx
call fcn.005059e0
inc edi
add esp, 0xc
cmp edi, dword [ebp + 8]
jl 0x507910
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret