Function at 0x1015f230
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov edx, dword [ebp + 0x14]
xor ecx, ecx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi + 0x170]
mov dword [ebp - 0xc], eax
mov eax, dword [esi + 0x174]
mov dword [ebp - 8], eax
mov eax, edx
add eax, dword [esi + 0x38]
adc ecx, dword [esi + 0x3c]
cmp ecx, 0xf
ja 0x1015f4ff
jb 0x1015f26d
cmp eax, 0xffffffe0
ja 0x1015f4ff
cmp dword [esi + 0x16c], 0
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], ecx
je 0x1015f299
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fef0
mov edx, dword [ebp + 0x14]
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 [ebp + 0x10]
mov dword [ebp - 4], ecx
mov ecx, dword [esi + 0x168]
mov dword [ebp - 0x10], ecx
push edi
mov edi, dword [ebp + 0xc]
test ecx, ecx
je 0x1015f309
test edx, edx
je 0x1015f2f1
mov al, byte [ecx + esi + 0x10]
dec edx
xor al, byte [edi]
inc edi
mov byte [ebx], al
inc ebx
xor byte [ecx + esi + 0x40], al
inc ecx
and ecx, 0xf
mov dword [ebp + 0x14], edx
mov dword [ebp - 0x10], ecx
jne 0x1015f2d0
jmp 0x1015f2f9
test ecx, ecx
jne 0x1015f4de
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fef0
add esp, 8
mov ecx, dword [ebp + 0x14]
cmp ecx, 0xc00
jb 0x1015f3c5
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [ebp - 0x18], edx
jmp 0x1015f330
mov dword [ebp - 0x14], 0xc0
push dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
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 [esi + 0x10]
xor eax, dword [edi]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
dec dword [ebp - 0x14]
mov dword [ebp - 4], ecx
jne 0x1015f337
push 0xc00
lea eax, [ebx - 0xc00]
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fcc0
mov ecx, dword [ebp + 0x14]
add esp, 0x10
sub ecx, 0xc00
dec dword [ebp - 0x18]
mov dword [ebp + 0x14], ecx
jne 0x1015f330
mov edx, ecx
and edx, 0xfffffff0
mov dword [ebp - 0x14], edx
je 0x1015f45e
cmp ecx, 0x10
jb 0x1015f445
shr ecx, 4
lea eax, [esi + 0x10]
mov dword [ebp - 0x18], ecx
push dword [ebp - 8]
push eax
push esi
call dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
add esp, 0xc
inc ecx
sub dword [ebp + 0x14], 0x10
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 [esi + 0x10]
xor eax, dword [edi]
mov dword [ebx], eax
mov eax, dword [edi + 4]
xor eax, dword [esi + 0x14]
mov dword [ebx + 4], eax
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
mov dword [ebx + 8], eax
mov eax, dword [edi + 0xc]
add edi, 0x10
xor eax, dword [esi + 0x1c]
mov dword [ebx + 0xc], eax
add ebx, 0x10
dec dword [ebp - 0x18]
lea eax, [esi + 0x10]
mov dword [ebp - 4], ecx
jne 0x1015f3e1
mov edx, dword [ebp - 0x14]
push edx
mov eax, ebx
sub eax, edx
push eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call fcn.1015fcc0
mov ecx, dword [ebp + 0x14]
add esp, 0x10
test ecx, ecx
je 0x1015f4ed
push dword [ebp - 8]
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
add esp, 0xc
mov edx, dword [ebp - 0x10]
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
sub edi, ebx
mov byte [esi + 0xe], al
lea eax, [edx + ebx]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
lea eax, [esi + 0x40]
mov esi, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
lea ebx, [ebx]
movzx ecx, byte [eax + edx - 0x30]
lea esi, [esi + 1]
movzx eax, byte [edi + esi - 1]
xor ecx, eax
mov eax, dword [ebp - 0x18]
mov byte [esi - 1], cl
xor byte [eax + edx], cl
inc edx
dec ebx
jne 0x1015f4b0
mov esi, dword [ebp + 8]
xor eax, eax
pop edi
pop ebx
mov dword [esi + 0x168], edx
pop esi
mov esp, ebp
pop ebp
ret
pop edi
pop ebx
mov dword [esi + 0x168], ecx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
xor eax, eax
pop edi
pop ebx
mov dword [esi + 0x168], edx
pop esi
mov esp, ebp
pop ebp
ret
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret