Function at 0x100a0d40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1013a420]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], esi
mov bl, byte [esi]
mov edi, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], eax
test bl, 0x40
jne 0x100a0d80
push eax
lea eax, [esi + 0x10]
push eax
push esi
call edi
add esp, 0xc
movzx eax, bl
mov edx, 0xf
and eax, 7
xor ecx, ecx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x30], edx
cmp edx, 0xf
jae 0x100a0db3
lea esp, [esp]
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], 0
inc edx
shl ecx, 8
cmp edx, 0xf
jb 0x100a0da0
movzx eax, byte [esi + 0xf]
or ecx, eax
mov byte [esi + 0xf], 1
mov eax, dword [ebp + 0x14]
cmp ecx, eax
je 0x100a0dd8
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003890f
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0xc]
cmp eax, 0x10
jb 0x100a0e68
mov edi, 0xfffffff8
sub edi, esi
shr eax, 4
mov dword [ebp - 0x28], eax
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x20]
add esp, 0xc
lea eax, [esi + 0x10]
inc byte [eax - 1]
lea eax, [eax - 1]
jne 0x100a0e11
lea ecx, [edi + eax]
test ecx, ecx
jne 0x100a0e02
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
mov edx, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x10]
xor ecx, dword [ebp - 0x14]
push dword [ebp - 0x24]
mov dword [edx + 4], eax
mov dword [edx], ecx
xor dword [esi + 0x14], eax
xor dword [esi + 0x10], ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
xor eax, dword [ebp - 8]
xor ecx, dword [ebp - 0xc]
mov dword [edx + 0xc], eax
mov dword [edx + 8], ecx
xor dword [esi + 0x1c], eax
lea eax, [esi + 0x10]
xor dword [esi + 0x18], ecx
push eax
push eax
call dword [ebp - 0x20]
mov eax, dword [ebp + 0x14]
add esp, 0xc
add dword [ebp - 0x1c], 0x10
sub eax, 0x10
add ebx, 0x10
mov dword [ebp + 0x14], eax
dec dword [ebp - 0x28]
jne 0x100a0df1
mov edi, dword [ebp - 0x20]
test eax, eax
je 0x100a0ec6
push dword [ebp - 0x24]
lea eax, [ebp - 0x14]
push eax
push esi
call edi
xor edi, edi
add esp, 0xc
cmp dword [ebp + 0x14], edi
jbe 0x100a0eb3
lea eax, [ebp - 0x14]
sub ebx, eax
sub dword [ebp - 0x1c], eax
lea eax, [esi + 0x10]
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x14]
add ecx, edi
movzx edx, byte [ebx + ecx]
movzx eax, byte [ecx]
xor edx, eax
mov eax, dword [ebp - 0x1c]
mov byte [eax + ecx], dl
mov eax, dword [ebp - 0x28]
xor byte [eax + edi], dl
inc edi
cmp edi, esi
jb 0x100a0e91
mov esi, dword [ebp - 0x2c]
mov ebx, dword [ebp - 0x24]
lea eax, [esi + 0x10]
mov edi, dword [ebp - 0x20]
push ebx
push eax
push eax
call edi
add esp, 0xc
jmp 0x100a0ec9
mov ebx, dword [ebp - 0x24]
mov eax, dword [ebp - 0x30]
cmp eax, 0x10
jae 0x100a0eee
mov ecx, 0x10
lea edi, [esi + eax]
sub ecx, eax
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [ebp - 0x20]
push ebx
lea eax, [ebp - 0x14]
push eax
push esi
call edi
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 8]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x15]
mov ecx, dword [ebp - 4]
pop edi
mov byte [esi], al
xor ecx, ebp
pop esi
xor eax, eax
pop ebx
call fcn.1003890f
mov esp, ebp
pop ebp
ret