Function at 0x1009d0b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
mov esi, ecx
cmp dword [esi], 0
je 0x1009d0c8
mov eax, 0xfffffffb
pop esi
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [esi + 4]
cmp edi, 2
je 0x1009d0e2
cmp dword [esi + 8], 0
jne 0x1009d0e2
pop edi
mov eax, 0xfffffffa
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x1009d390
test eax, eax
jle 0x1009d390
cdq
and edx, 0x7f
add eax, edx
sar eax, 7
mov edx, edi
sub edx, 0
push ebx
mov dword [ebp - 8], eax
je 0x1009d35c
dec edx
je 0x1009d2af
dec edx
je 0x1009d121
pop ebx
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x18]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
test eax, eax
jle 0x1009d386
xor edi, edi
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
mov bl, byte [ebp - 0x1b]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x28], ecx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x20], eax
push ecx
mov eax, ecx
mov dword [ebp - 0x24], edx
call fcn.1009d660
movzx eax, byte [ebp - 0x1c]
add al, al
mov dl, bl
shr dl, 7
or dl, al
mov al, byte [ebp - 0x1a]
mov byte [ebp - 0x1c], dl
mov cl, al
shr cl, 7
add bl, bl
or cl, bl
mov byte [ebp - 0x1b], cl
mov cl, byte [ebp - 0x19]
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x18]
mov byte [ebp - 0x1a], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x17]
mov byte [ebp - 0x19], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x16]
mov byte [ebp - 0x18], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x15]
mov byte [ebp - 0x17], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x14]
mov byte [ebp - 0x16], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x13]
mov byte [ebp - 0x15], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0x12]
mov byte [ebp - 0x14], dl
mov dl, al
shr dl, 7
add cl, cl
or dl, cl
mov cl, byte [ebp - 0x11]
mov byte [ebp - 0x13], dl
mov dl, cl
add al, al
shr dl, 7
add esp, 4
or dl, al
mov al, byte [ebp - 0x10]
mov byte [ebp - 0x12], dl
add cl, cl
mov dl, al
shr dl, 7
or dl, cl
mov cl, byte [ebp - 0xf]
mov ebx, dword [ebp + 8]
mov byte [ebp - 0x11], dl
mov dl, cl
shr dl, 7
add al, al
or dl, al
mov al, byte [ebp - 0xe]
add cl, cl
mov byte [ebp - 0x10], dl
mov dl, al
shr dl, 7
or dl, cl
movzx ecx, byte [ebp - 0xd]
shr cl, 7
add al, al
or cl, al
mov byte [ebp - 0xe], cl
mov eax, edi
mov byte [ebp - 0xf], dl
shr eax, 3
movzx ebx, byte [eax + ebx]
mov edx, edi
and edx, 7
mov cl, 7
sub cl, dl
shr bl, cl
movzx ecx, byte [ebp - 0xd]
and bl, 1
add cl, cl
or bl, cl
mov byte [ebp - 0xd], bl
movzx ebx, byte [ebp - 0x2c]
and bl, 0x80
mov cl, dl
shr bl, cl
mov ecx, dword [ebp + 0xc]
inc edi
xor byte [eax + ecx], bl
cmp edi, 0x80
jl 0x1009d146
mov eax, dword [ebp - 4]
dec eax
mov dword [ebp - 4], eax
test eax, eax
jg 0x1009d144
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0xc]
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x14], edx
mov edx, dword [esi + 0x18]
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], eax
test eax, eax
jle 0x1009d386
mov eax, dword [ebp + 0xc]
lea ebx, [ecx + 8]
sub ecx, eax
add ecx, 0xfffffff8
lea edi, [eax + 8]
mov dword [ebp - 0xc], ecx
mov eax, dword [ebp - 0xc]
add eax, edi
push eax
push esi
lea eax, [ebp - 0x2c]
call fcn.1009da20
mov edx, dword [ebp - 0x14]
xor dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x10]
xor dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x2c]
xor eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x28]
xor ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx + edi]
mov dword [edi - 8], eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebx - 4]
mov dword [edi - 4], ecx
mov dword [ebp - 0x28], ecx
mov ecx, dword [ebx]
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov dword [edi], edx
mov eax, dword [ebx + 4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x20]
dec eax
mov dword [edi + 4], ecx
add esp, 8
add ebx, 0x10
add edi, 0x10
mov dword [ebp - 4], eax
test eax, eax
jg 0x1009d2e3
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
mov edi, eax
test eax, eax
jle 0x1009d386
jmp 0x1009d367
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ecx
push esi
call fcn.1009da20
add dword [ebp + 8], 0x10
add eax, 0x10
dec edi
add esp, 8
mov dword [ebp + 0xc], eax
test edi, edi
jg 0x1009d364
mov eax, dword [ebp - 8]
pop ebx
pop edi
shl eax, 7
pop esi
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret