Function at 0x57d4d5
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov al, byte [edi + 8]
mov esi, dword [edi]
mov dword [ebp - 0xc], esi
test al, al
jne 0x57d744
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x57d4fe
movzx ebx, word [ecx + 8]
jmp 0x57d500
xor ebx, ebx
mov al, byte [edi + 9]
cmp al, 8
jae 0x57d67e
movzx eax, al
sub eax, 1
je 0x57d60f
sub eax, 1
je 0x57d5a0
dec eax
sub eax, 1
jne 0x57d671
mov edx, dword [ebp + 0xc]
and ebx, 0xf
imul eax, ebx, 0x11
push 4
movzx ebx, ax
lea eax, [esi - 1]
mov ecx, eax
mov dword [ebp - 0x10], ebx
shr ecx, 1
and eax, 1
add ecx, edx
shl eax, 2
mov dword [ebp - 0x18], ecx
lea ecx, [edx - 1]
add ecx, esi
mov dword [ebp - 0x14], ecx
pop ecx
sub ecx, eax
mov dword [ebp - 0x1c], ecx
test esi, esi
je 0x57d66e
mov edi, dword [ebp - 0x18]
mov ebx, ecx
mov dl, byte [edi]
mov cl, bl
shr dl, cl
mov ecx, dword [ebp - 0x14]
mov al, dl
and al, 0xf
shl dl, 4
xor al, dl
push 4
mov byte [ecx], al
dec ecx
pop edx
cmp ebx, edx
mov dword [ebp - 0x14], ecx
lea eax, [edi - 1]
cmovne eax, edi
mov edi, eax
xor eax, eax
cmp ebx, edx
cmovne eax, edx
mov ebx, eax
sub esi, 1
jne 0x57d568
jmp 0x57d665
push 3
pop ecx
and ebx, ecx
imul eax, ebx, 0x55
movzx ebx, ax
lea eax, [esi - 1]
mov edx, eax
mov dword [ebp - 0x10], ebx
shr edx, 2
and eax, ecx
mov dword [ebp - 0x14], edx
sub ecx, eax
mov edx, dword [ebp + 0xc]
add ecx, ecx
add dword [ebp - 0x14], edx
dec edx
add edx, esi
mov dword [ebp - 0x20], ecx
test esi, esi
je 0x57d66e
mov edi, dword [ebp - 0x14]
mov ebx, ecx
mov dword [ebp - 0x18], esi
mov esi, edx
mov dl, byte [edi]
mov cl, bl
shr dl, cl
and dl, 3
mov al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
shl al, 2
or al, dl
mov byte [esi], al
cmp ebx, 6
jne 0x57d603
xor ebx, ebx
dec edi
jmp 0x57d606
add ebx, 2
dec esi
sub dword [ebp - 0x18], 1
jne 0x57d5dd
jmp 0x57d665
mov edx, dword [ebp + 0xc]
and ebx, 1
imul eax, ebx, 0xff
push 7
movzx ebx, ax
lea eax, [esi - 1]
mov ecx, eax
mov dword [ebp - 0x10], ebx
shr ecx, 3
and eax, 7
add ecx, edx
mov dword [ebp - 0x20], ecx
lea ecx, [edx - 1]
pop edx
add ecx, esi
sub edx, eax
test esi, esi
je 0x57d66e
mov edi, dword [ebp - 0x20]
mov ebx, esi
mov esi, ecx
mov al, byte [edi]
mov cl, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [esi], al
cmp edx, 7
jne 0x57d65e
xor edx, edx
dec edi
jmp 0x57d65f
inc edx
dec esi
sub ebx, 1
jne 0x57d646
mov ebx, dword [ebp - 0x10]
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x10]
mov byte [edi + 9], 8
mov al, 8
mov byte [edi + 0xb], 8
mov dword [edi + 4], esi
test ecx, ecx
je 0x57d8ba
cmp al, 8
jne 0x57d6c3
mov eax, dword [ebp + 0xc]
lea edx, [eax - 1]
lea eax, [eax + esi*2]
add edx, esi
dec eax
mov dword [ebp - 0x20], eax
test esi, esi
je 0x57d730
mov dword [ebp - 0x1c], esi
mov edi, eax
movzx eax, byte [edx]
sub ax, bx
neg ax
sbb al, al
mov byte [edi], al
lea edi, [edi - 2]
mov al, byte [edx]
dec edx
mov byte [edi + 1], al
sub esi, 1
jne 0x57d6a6
jmp 0x57d72a
cmp al, 0x10
jne 0x57d730
mov ecx, dword [ebp + 0xc]
mov eax, ebx
shr eax, 8
mov dword [ebp - 0x20], eax
mov eax, dword [edi + 4]
lea edx, [ecx - 1]
add edx, eax
lea ecx, [ecx + eax*2]
dec ecx
test esi, esi
je 0x57d730
mov edi, esi
lea eax, [edx - 1]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x10], eax
mov esi, eax
mov eax, dword [ebp - 0x20]
cmp byte [esi], al
jne 0x57d6fe
cmp byte [edx], bl
jne 0x57d6fe
xor al, al
jmp 0x57d700
or al, 0xff
mov esi, dword [ebp - 0x1c]
dec ecx
or dword [ebp - 0x14], 0xffffffff
mov dword [ebp - 0x18], ecx
mov byte [esi], al
mov byte [ecx], al
mov al, byte [edx]
mov edx, dword [ebp - 0x14]
mov byte [edx + ecx], al
add ecx, edx
mov edx, dword [ebp - 0x10]
mov al, byte [edx]
mov byte [ecx - 1], al
sub ecx, 2
dec edx
sub edi, 1
jne 0x57d6e4
mov edi, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
push 4
pop eax
mov byte [edi + 8], al
mov al, byte [edi + 9]
mov byte [edi + 0xa], 2
add al, al
jmp 0x57d89c
cmp al, 2
jne 0x57d8ba
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x57d8ba
mov cl, byte [edi + 9]
cmp cl, 8
jne 0x57d7d3
mov cl, byte [eax + 2]
mov bl, byte [eax + 4]
mov bh, byte [eax + 6]
mov eax, dword [edi + 4]
mov byte [ebp + 0xb], cl
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 1], bl
mov byte [ebp - 2], bh
lea edx, [ecx - 1]
lea ecx, [ecx + esi*4]
add edx, eax
dec ecx
test esi, esi
je 0x57d88e
mov ah, byte [ebp + 0xb]
mov dword [ebp - 0x18], esi
cmp byte [edx - 2], ah
jne 0x57d7a0
cmp byte [edx - 1], bl
jne 0x57d7a0
cmp byte [edx], bh
jne 0x57d7a0
xor al, al
jmp 0x57d7a2
or al, 0xff
mov byte [ecx], al
mov ebx, ecx
mov al, byte [edx]
or ecx, 0xffffffff
mov byte [ecx + ebx], al
add ecx, ebx
mov al, byte [edx - 1]
mov bl, byte [ebp - 1]
mov bh, byte [ebp - 2]
mov byte [ecx - 1], al
mov al, byte [edx - 2]
sub edx, 3
mov byte [ecx - 2], al
sub ecx, 3
sub dword [ebp - 0x18], 1
jne 0x57d78e
jmp 0x57d88e
cmp cl, 0x10
jne 0x57d88e
mov cl, byte [eax + 7]
mov bl, byte [eax + 3]
mov bh, byte [eax + 5]
mov byte [ebp - 2], cl
mov cl, byte [eax + 2]
mov byte [ebp - 1], cl
mov cl, byte [eax + 4]
mov al, byte [eax + 6]
mov byte [ebp - 3], cl
mov ecx, dword [ebp + 0xc]
mov byte [ebp - 4], al
mov eax, dword [edi + 4]
mov byte [ebp - 5], bl
lea edx, [ecx - 1]
mov byte [ebp - 6], bh
lea ecx, [ecx + esi*8]
add edx, eax
dec ecx
test esi, esi
je 0x57d88e
mov ah, byte [ebp - 2]
mov edi, ecx
cmp byte [edx - 5], bl
jne 0x57d842
mov al, byte [ebp - 1]
cmp byte [edx - 4], al
jne 0x57d842
cmp byte [edx - 3], bh
jne 0x57d842
mov al, byte [ebp - 3]
cmp byte [edx - 2], al
jne 0x57d842
cmp byte [edx - 1], ah
jne 0x57d842
mov al, byte [ebp - 4]
cmp byte [edx], al
jne 0x57d842
xor al, al
jmp 0x57d844
or al, 0xff
or dword [ebp - 0x18], 0xffffffff
dec ecx
mov byte [edi], al
mov ebx, ecx
mov byte [ecx], al
mov al, byte [edx]
mov ecx, dword [ebp - 0x18]
mov byte [ecx + ebx], al
add ecx, ebx
mov al, byte [edx - 1]
mov bl, byte [ebp - 5]
mov bh, byte [ebp - 6]
mov byte [ecx - 1], al
mov al, byte [edx - 2]
mov byte [ecx - 2], al
mov al, byte [edx - 3]
mov byte [ecx - 3], al
mov al, byte [edx - 4]
mov byte [ecx - 4], al
mov al, byte [edx - 5]
sub edx, 6
mov byte [ecx - 5], al
sub ecx, 6
sub esi, 1
jne 0x57d816
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp + 8]
mov al, byte [edi + 9]
mov byte [edi + 8], 6
mov byte [edi + 0xa], 4
shl al, 2
mov byte [edi + 0xb], al
movzx ecx, al
cmp al, 8
jb 0x57d8ae
shr ecx, 3
imul ecx, esi
jmp 0x57d8b7
imul ecx, esi
add ecx, 7
shr ecx, 3
mov dword [edi + 4], ecx
pop edi
pop esi
pop ebx
leave
ret