Function at 0x10162bb0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, dword [esp + 0x34]
mov al, byte [esi + 8]
push edi
lea edi, [esi + 8]
mov ebp, dword [esi]
mov dword [esp + 0x18], ebp
test al, al
jne 0x10162e72
mov edx, dword [esp + 0x40]
test edx, edx
je 0x10162bdd
movzx ecx, word [edx + 8]
jmp 0x10162bdf
xor ecx, ecx
mov al, byte [esi + 9]
mov dword [esp + 0x14], ecx
cmp al, 8
jae 0x10162d4d
movzx eax, al
sub eax, 1
je 0x10162ce5
sub eax, 1
je 0x10162c7d
sub eax, 2
jne 0x10162d3c
mov edx, dword [esp + 0x3c]
and ecx, 0xf
mov eax, ecx
mov ebx, 4
shl ecx, 4
add ecx, eax
lea eax, [ebp - 1]
mov edi, eax
mov dword [esp + 0x14], ecx
and eax, 1
shr edi, 1
shl eax, 2
lea ecx, [edx - 1]
add edi, edx
add ecx, ebp
sub ebx, eax
test ebp, ebp
je 0x10162d38
mov esi, ecx
nop
mov dl, byte [edi]
lea esi, [esi - 1]
mov cl, bl
shr dl, cl
mov ecx, 4
mov al, dl
shl dl, 4
and al, 0xf
xor al, dl
cmp ebx, 4
mov byte [esi + 1], al
lea eax, [edi - 1]
cmovne eax, edi
mov edi, eax
xor eax, eax
cmp ebx, 4
cmovne eax, ecx
mov ebx, eax
sub ebp, 1
jne 0x10162c40
mov ebp, dword [esp + 0x18]
jmp 0x10162d34
and ecx, 3
lea eax, [ebp - 1]
imul ecx, ecx, 0x55
mov edi, eax
shr edi, 2
and eax, 3
mov ebx, 3
sub ebx, eax
add ebx, ebx
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x3c]
add edi, ecx
dec ecx
add ecx, ebp
test ebp, ebp
je 0x10162d3c
mov esi, ecx
nop
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 0x10162cd6
xor ebx, ebx
dec edi
jmp 0x10162cd9
add ebx, 2
dec esi
sub ebp, 1
jne 0x10162cb0
mov ebp, dword [esp + 0x18]
jmp 0x10162d34
and ecx, 1
lea eax, [ebp - 1]
imul ecx, ecx, 0xff
mov edi, eax
shr edi, 3
and eax, 7
mov edx, 7
sub edx, eax
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x3c]
add edi, ecx
lea ebx, [ecx - 1]
add ebx, ebp
test ebp, ebp
je 0x10162d38
mov esi, ebp
mov al, byte [edi]
mov cl, dl
shr al, cl
and al, 1
neg al
sbb al, al
mov byte [ebx], al
cmp edx, 7
jne 0x10162d2d
xor edx, edx
dec edi
jmp 0x10162d2e
inc edx
dec ebx
sub esi, 1
jne 0x10162d15
mov esi, dword [esp + 0x38]
mov edx, dword [esp + 0x40]
lea ebx, [esi + 4]
mov byte [esi + 9], 8
mov byte [esi + 0xb], 8
mov al, 8
mov dword [ebx], ebp
jmp 0x10162d50
lea ebx, [esi + 4]
test edx, edx
je 0x10163032
cmp al, 8
jne 0x10162da4
mov eax, dword [esp + 0x14]
movzx eax, al
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x3c]
lea edx, [eax - 1]
add edx, ebp
lea edi, [eax - 1]
lea edi, [edi + ebp*2]
test ebp, ebp
je 0x10162e38
mov ebx, ebp
movzx eax, byte [edx]
lea edi, [edi - 2]
sub eax, dword [esp + 0x38]
lea edx, [edx - 1]
neg eax
sbb al, al
mov byte [edi + 2], al
mov al, byte [edx + 1]
mov byte [edi + 1], al
sub ebx, 1
jne 0x10162d80
jmp 0x10162e35
cmp al, 0x10
jne 0x10162e38
mov eax, dword [esp + 0x14]
mov ecx, eax
shr ecx, 8
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x3c]
movzx eax, al
mov dword [esp + 0x24], eax
mov eax, dword [ebx]
lea edx, [ecx - 1]
add edx, eax
lea ecx, [ecx + eax*2]
dec ecx
test ebp, ebp
je 0x10162e38
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x20]
nop dword [eax + eax]
movzx eax, byte [edx - 1]
mov dword [esp + 0x20], ecx
cmp eax, ebp
jne 0x10162dfa
movzx eax, byte [edx]
cmp eax, dword [esp + 0x24]
jne 0x10162dfa
dec ecx
xor al, al
jmp 0x10162dfd
dec ecx
or al, 0xff
mov esi, dword [esp + 0x20]
mov ebx, ecx
mov dword [esp + 0x14], 0xffffffff
mov byte [esi], al
mov byte [ecx], al
mov ecx, dword [esp + 0x14]
mov al, byte [edx]
mov byte [ecx + ebx], al
add ecx, ebx
mov al, byte [edx - 1]
sub edx, 2
mov byte [ecx - 1], al
sub ecx, 2
sub dword [esp + 0x1c], 1
jne 0x10162de0
mov esi, dword [esp + 0x38]
mov ebp, dword [esp + 0x18]
lea ebx, [esi + 4]
mov al, byte [esi + 9]
add al, al
mov byte [esi + 8], 4
mov byte [esi + 0xa], 2
mov byte [esi + 0xb], al
movzx ecx, al
cmp al, 8
jb 0x10162e5f
shr ecx, 3
imul ecx, ebp
pop edi
pop esi
pop ebp
mov dword [ebx], ecx
pop ebx
add esp, 0x24
ret
imul ecx, ebp
pop edi
pop esi
pop ebp
add ecx, 7
shr ecx, 3
mov dword [ebx], ecx
pop ebx
add esp, 0x24
ret
cmp al, 2
jne 0x10163032
mov eax, dword [esp + 0x40]
test eax, eax
je 0x10163032
mov cl, byte [esi + 9]
lea ebx, [esi + 9]
cmp cl, 8
jne 0x10162f19
mov cl, byte [eax + 2]
mov byte [esp + 0x12], cl
mov cl, byte [eax + 4]
mov al, byte [eax + 6]
mov byte [esp + 0x38], cl
mov ecx, dword [esp + 0x3c]
mov byte [esp + 0x13], al
mov eax, dword [esi + 4]
lea edx, [ecx - 1]
lea ecx, [ecx + ebp*4]
add edx, eax
dec ecx
test ebp, ebp
je 0x10162fff
mov ah, byte [esp + 0x38]
mov dword [esp + 0x1c], ebp
nop word [eax + eax]
mov al, byte [esp + 0x12]
cmp byte [edx - 2], al
jne 0x10162eea
cmp byte [edx - 1], ah
jne 0x10162eea
mov al, byte [esp + 0x13]
cmp byte [edx], al
jne 0x10162eea
xor al, al
jmp 0x10162eec
or al, 0xff
mov byte [ecx], al
or ebx, 0xffffffff
mov al, byte [edx]
mov edi, ecx
lea ecx, [ebx + edi]
mov byte [ebx + edi], al
mov al, byte [edx - 1]
mov byte [ecx - 1], al
mov al, byte [edx - 2]
sub edx, 3
mov byte [ecx - 2], al
sub ecx, 3
sub dword [esp + 0x1c], 1
jne 0x10162ed0
jmp 0x10162ff9
cmp cl, 0x10
jne 0x10162fff
movzx ecx, word [eax + 2]
mov dword [esp + 0x20], ecx
shr ecx, 8
mov dword [esp + 0x24], ecx
movzx ecx, word [eax + 4]
movzx eax, word [eax + 6]
mov dword [esp + 0x14], ecx
shr ecx, 8
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x2c], eax
shr eax, 8
mov dword [esp + 0x28], eax
lea edx, [ecx - 1]
add edx, dword [esi + 4]
lea ecx, [ecx + ebp*8]
dec ecx
test ebp, ebp
je 0x10162fff
mov dword [esp + 0x38], ebp
nop dword [eax]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x30], ecx
cmp byte [edx - 5], al
jne 0x10162fad
mov eax, dword [esp + 0x20]
cmp byte [edx - 4], al
jne 0x10162fad
mov eax, dword [esp + 0x1c]
cmp byte [edx - 3], al
jne 0x10162fad
mov eax, dword [esp + 0x14]
cmp byte [edx - 2], al
jne 0x10162fad
mov eax, dword [esp + 0x28]
cmp byte [edx - 1], al
jne 0x10162fad
mov eax, dword [esp + 0x2c]
cmp byte [edx], al
jne 0x10162fad
xor al, al
jmp 0x10162faf
or al, 0xff
mov ebp, dword [esp + 0x30]
dec ecx
or ebx, 0xffffffff
mov edi, ecx
mov byte [ebp], al
mov byte [ecx], al
lea ecx, [ebx + edi]
mov al, byte [edx]
mov byte [ebx + edi], al
mov al, byte [edx - 1]
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 dword [esp + 0x38], 1
jne 0x10162f70
mov ebp, dword [esp + 0x18]
lea ebx, [esi + 9]
lea edi, [esi + 8]
mov al, byte [ebx]
shl al, 2
mov byte [edi], 6
mov byte [esi + 0xa], 4
mov byte [esi + 0xb], al
movzx ecx, al
cmp al, 8
jb 0x10163026
shr ecx, 3
imul ecx, ebp
pop edi
mov dword [esi + 4], ecx
pop esi
pop ebp
pop ebx
add esp, 0x24
ret
imul ecx, ebp
add ecx, 7
shr ecx, 3
mov dword [esi + 4], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret