Function at 0x1015f510
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, dword [ebp + 8]
xor ecx, ecx
push edi
mov edi, dword [ebp + 0x14]
mov eax, dword [esi + 0x174]
mov dword [ebp - 0x10], eax
mov eax, edi
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x1015f76e
jb 0x1015f545
cmp eax, 0xffffffe0
ja 0x1015f76e
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
je 0x1015f56e
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fef0
add esp, 8
mov dword [esi + 0x16c], 0
movzx ecx, byte [esi + 0xc]
movzx eax, byte [esi + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [esi + 0xf]
shl ecx, 8
or ecx, eax
push ebx
mov ebx, dword [esi + 0x168]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ecx
test ebx, ebx
je 0x1015f5f7
mov edx, dword [ebp + 0x10]
mov dword [ebp - 4], edx
lea ebx, [ebx]
test edi, edi
je 0x1015f5d7
mov al, byte [ebx + esi + 0x10]
dec edi
xor al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
xor byte [ebx + esi + 0x40], al
inc ebx
and ebx, 0xf
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
mov dword [ebp + 0x14], edi
mov dword [ebp - 0x14], ebx
jne 0x1015f5b0
jmp 0x1015f5df
test ebx, ebx
jne 0x1015f75f
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fef0
mov ecx, dword [ebp - 8]
add esp, 8
mov eax, dword [ebp - 4]
jmp 0x1015f5fd
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
cmp edi, 0xc00
jb 0x1015f692
mov ebx, dword [ebp - 0xc]
mov eax, 0xaaaaaaab
mul edi
mov eax, dword [ebp - 4]
shr edx, 0xb
mov dword [ebp + 0x14], edx
lea esp, [esp]
push esi
push dword [ebp - 0x10]
push 0xc0
push eax
push ecx
call dword [ebp + 0x18]
add ebx, 0xc0
mov eax, ebx
mov byte [esi + 0xf], bl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ebx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ebx
shr eax, 8
push 0xc00
push dword [ebp - 4]
mov byte [esi + 0xe], al
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fcc0
mov eax, dword [ebp - 4]
add esp, 0x24
mov ecx, dword [ebp - 8]
add eax, 0xc00
add ecx, 0xc00
mov dword [ebp - 4], eax
sub edi, 0xc00
mov dword [ebp - 8], ecx
dec dword [ebp + 0x14]
jne 0x1015f620
mov dword [ebp - 0xc], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ebp + 0x14], edi
mov edx, edi
and edx, 0xfffffff0
mov dword [ebp - 0x14], edx
je 0x1015f6f3
push esi
push dword [ebp - 0x10]
mov edi, edx
shr edi, 4
push edi
push eax
push ecx
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add ecx, edi
mov edi, dword [ebp + 0x14]
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp - 0x14]
sub edi, eax
add dword [ebp - 8], eax
push eax
push dword [ebp - 4]
lea eax, [esi + 0x60]
mov byte [esi + 0xf], cl
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fcc0
mov eax, dword [ebp - 0x14]
add esp, 0x24
add dword [ebp - 4], eax
test edi, edi
je 0x1015f75f
push dword [ebp - 0x10]
lea eax, [esi + 0x10]
push eax
mov eax, dword [esi + 0x170]
push esi
call eax
mov ecx, dword [ebp - 0xc]
add esp, 0xc
inc ecx
mov eax, ecx
mov byte [esi + 0xf], cl
shr eax, 0x18
mov byte [esi + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [esi + 0xe], al
mov eax, dword [ebp - 4]
sub dword [ebp - 8], eax
lea edx, [ebx + eax]
lea eax, [esi + 0x40]
mov esi, dword [ebp - 8]
mov dword [ebp + 0x14], eax
jmp 0x1015f740
movzx ecx, byte [eax + ebx - 0x30]
lea edx, [edx + 1]
movzx eax, byte [esi + edx - 1]
xor ecx, eax
mov eax, dword [ebp + 0x14]
mov byte [edx - 1], cl
xor byte [eax + ebx], cl
inc ebx
dec edi
jne 0x1015f740
mov esi, dword [ebp + 8]
mov dword [esi + 0x168], ebx
xor eax, eax
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret