Function at 0x4af670
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
push 0x18
push 0x564342
push ebx
call fcn.004c0480
mov esi, dword [ebp + 8]
push 0x10
push dword [esi]
push ebx
call fcn.004c0480
push 0x18
push dword [esi + 4]
push ebx
call fcn.004c0480
mov edi, dword [esi + 4]
mov ecx, 1
add esp, 0x24
cmp edi, ecx
jle 0x4af6c6
mov eax, dword [esi + 8]
lea edx, [eax - 1]
mov al, byte [edx + ecx]
test al, al
je 0x4af6c6
cmp byte [edx + ecx + 1], al
jl 0x4af6c6
inc ecx
cmp ecx, edi
jl 0x4af6b4
push 1
cmp ecx, edi
jne 0x4af76a
push 1
push ebx
mov dword [ebp + 8], 0
call fcn.004c0480
mov eax, dword [esi + 8]
push 5
movsx eax, byte [eax]
dec eax
push eax
push ebx
call fcn.004c0480
mov edi, 1
add esp, 0x18
cmp dword [esi + 4], edi
jle 0x4af74b
nop dword [eax]
mov eax, dword [esi + 8]
mov cl, byte [eax + edi]
mov dl, byte [eax + edi - 1]
cmp cl, dl
jle 0x4af745
movsx eax, cl
movsx ecx, dl
cmp ecx, eax
jge 0x4af745
sub eax, ecx
mov dword [ebp - 4], eax
nop dword [eax]
mov eax, dword [esi + 4]
sub eax, dword [ebp + 8]
push eax
call fcn.004ae860
push eax
mov eax, edi
sub eax, dword [ebp + 8]
push eax
push ebx
call fcn.004c0480
add esp, 0x10
mov dword [ebp + 8], edi
sub dword [ebp - 4], 1
jne 0x4af720
inc edi
cmp edi, dword [esi + 4]
jl 0x4af700
mov eax, dword [esi + 4]
sub eax, dword [ebp + 8]
push eax
call fcn.004ae860
sub edi, dword [ebp + 8]
push eax
push edi
push ebx
call fcn.004c0480
add esp, 0x10
jmp 0x4af80c
push 0
push ebx
call fcn.004c0480
mov ecx, dword [esi + 4]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x4af78c
mov edx, dword [esi + 8]
cmp byte [edx + eax], 0
je 0x4af78c
inc eax
cmp eax, ecx
jl 0x4af781
push 1
cmp eax, ecx
jne 0x4af7c0
push 0
push ebx
call fcn.004c0480
xor edi, edi
add esp, 0xc
cmp dword [esi + 4], edi
jle 0x4af80c
mov eax, dword [esi + 8]
push 5
movsx eax, byte [eax + edi]
dec eax
push eax
push ebx
call fcn.004c0480
inc edi
add esp, 0xc
cmp edi, dword [esi + 4]
jl 0x4af7a4
jmp 0x4af80c
push 1
push ebx
call fcn.004c0480
xor edi, edi
add esp, 0xc
cmp dword [esi + 4], edi
jle 0x4af80c
mov eax, dword [esi + 8]
push 1
cmp byte [edi + eax], 0
jne 0x4af7ea
push 0
push ebx
call fcn.004c0480
add esp, 0xc
jmp 0x4af806
push 1
push ebx
call fcn.004c0480
mov eax, dword [esi + 8]
push 5
movsx eax, byte [eax + edi]
dec eax
push eax
push ebx
call fcn.004c0480
add esp, 0x18
inc edi
cmp edi, dword [esi + 4]
jl 0x4af7d2
push 4
push dword [esi + 0xc]
push ebx
call fcn.004c0480
mov eax, dword [esi + 0xc]
add esp, 0xc
test eax, eax
je 0x4af8c3
dec eax
cmp eax, 1
ja 0x4af831
cmp dword [esi + 0x20], 0
jne 0x4af83b
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
push 0x20
push dword [esi + 0x10]
push ebx
call fcn.004c0480
push 0x20
push dword [esi + 0x14]
push ebx
call fcn.004c0480
mov eax, dword [esi + 0x18]
push 4
dec eax
push eax
push ebx
call fcn.004c0480
push 1
push dword [esi + 0x1c]
push ebx
call fcn.004c0480
mov eax, dword [esi + 0xc]
add esp, 0x30
sub eax, 1
je 0x4af886
sub eax, 1
je 0x4af87e
or edi, 0xffffffff
jmp 0x4af891
mov edi, dword [esi + 4]
imul edi, dword [esi]
jmp 0x4af891
push esi
call fcn.004af3b0
add esp, 4
mov edi, eax
xor ecx, ecx
mov dword [ebp + 8], ecx
test edi, edi
jle 0x4af8c3
nop word [eax + eax]
mov eax, dword [esi + 0x20]
push dword [esi + 0x18]
mov eax, dword [eax + ecx*4]
cdq
xor eax, edx
sub eax, edx
push eax
push ebx
call fcn.004c0480
mov ecx, dword [ebp + 8]
add esp, 0xc
inc ecx
mov dword [ebp + 8], ecx
cmp ecx, edi
jl 0x4af8a0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret