Function at 0x100ba660
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov ecx, dword [ebp + 0x18]
xor edx, edx
push ebx
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x168]
mov ebx, dword [edi + 0x160]
mov dword [ebp - 0xc], eax
mov eax, dword [edi + 0x164]
mov dword [ebp - 0x18], eax
mov eax, ecx
add eax, dword [edi + 0x38]
mov dword [ebp - 0x14], ebx
adc edx, dword [edi + 0x3c]
cmp edx, 0xf
ja 0x100ba8bc
jb 0x100ba6a7
cmp eax, 0xffffffe0
ja 0x100ba8bc
mov dword [edi + 0x38], eax
lea eax, [edi + 0x40]
mov dword [edi + 0x3c], edx
lea edx, [edi + 0x60]
cmp dword [edi + 0x174], 0
je 0x100ba6d0
push edx
push eax
call ebx
mov ecx, dword [ebp + 0x18]
add esp, 8
mov dword [edi + 0x174], 0
mov edx, dword [edi + 0x170]
mov ebx, dword [ebp + 0x10]
mov dword [ebp + 8], edx
push esi
mov esi, dword [ebp + 0x14]
test edx, edx
je 0x100ba734
test ecx, ecx
je 0x100ba722
mov al, byte [edx + edi + 0x10]
dec ecx
xor al, byte [ebx]
inc ebx
mov byte [esi], al
inc esi
xor byte [edx + edi + 0x40], al
inc edx
and edx, 0xf
mov dword [ebp - 4], ebx
mov dword [ebp + 0x18], ecx
mov dword [ebp + 8], edx
jne 0x100ba6e4
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add esp, 8
mov ecx, dword [ebp + 0x18]
mov dword [ebp + 8], eax
mov dword [ebp + 0x18], ecx
jmp 0x100ba737
pop esi
mov dword [edi + 0x170], edx
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], ebx
mov eax, dword [edi + 0xc]
bswap eax
mov dword [ebp - 8], eax
cmp ecx, 0xc00
jb 0x100ba7dc
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [ebp - 0x14], edx
nop dword [eax + eax]
mov dword [ebp - 0x10], 0xc0
push dword [ebp + 0xc]
lea eax, [edi + 0x10]
push eax
push edi
call dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add esp, 0xc
inc eax
mov dword [ebp - 8], eax
bswap eax
mov dword [edi + 0xc], eax
xor eax, eax
sub ebx, esi
mov ecx, eax
lea edx, [eax + esi]
shr ecx, 2
add eax, 4
mov ecx, dword [edi + ecx*4 + 0x10]
xor ecx, dword [ebx + edx]
mov dword [edx], ecx
cmp eax, 0x10
jb 0x100ba785
mov ebx, dword [ebp - 4]
add esi, 0x10
add ebx, 0x10
sub dword [ebp - 0x10], 1
mov dword [ebp - 4], ebx
jne 0x100ba767
push 0xc00
lea eax, [esi - 0xc00]
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
add esp, 0x10
sub ecx, 0xc00
sub dword [ebp - 0x14], 1
mov dword [ebp + 0x18], ecx
jne 0x100ba760
mov edx, ecx
and edx, 0xfffffff0
mov dword [ebp - 0x1c], edx
je 0x100ba85e
cmp ecx, 0x10
jb 0x100ba847
shr ecx, 4
lea eax, [edi + 0x10]
mov dword [ebp - 0x14], ecx
push dword [ebp + 0xc]
push eax
push edi
call dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add esp, 0xc
inc eax
xor edx, edx
mov dword [ebp - 8], eax
sub ebx, esi
bswap eax
mov dword [edi + 0xc], eax
mov dword [ebp - 0x10], ebx
mov eax, edx
lea ecx, [edx + esi]
shr eax, 2
add edx, 4
mov eax, dword [edi + eax*4 + 0x10]
xor eax, dword [ebx + ecx]
mov dword [ecx], eax
cmp edx, 0x10
jb 0x100ba812
mov ebx, dword [ebp - 4]
lea eax, [edi + 0x10]
sub dword [ebp + 0x18], 0x10
add ebx, 0x10
add esi, 0x10
mov dword [ebp - 4], ebx
sub dword [ebp - 0x14], 1
jne 0x100ba7f4
mov edx, dword [ebp - 0x1c]
push edx
mov eax, esi
sub eax, edx
push eax
lea eax, [edi + 0x60]
push eax
lea eax, [edi + 0x40]
push eax
call dword [ebp - 0x18]
mov ecx, dword [ebp + 0x18]
add esp, 0x10
test ecx, ecx
je 0x100ba8a7
push dword [ebp + 0xc]
lea eax, [edi + 0x10]
push eax
push edi
call dword [ebp - 0xc]
mov eax, dword [ebp - 8]
lea ecx, [edi + 0x40]
inc eax
sub ebx, esi
bswap eax
mov dword [edi + 0xc], eax
add esp, 0xc
mov eax, dword [ebp + 8]
add ecx, eax
lea edx, [eax + esi]
mov esi, dword [ebp + 0x18]
add eax, esi
mov dword [ebp + 8], eax
nop
mov al, byte [edx + ebx]
lea edx, [edx + 1]
xor al, byte [ecx - 0x30]
lea ecx, [ecx + 1]
mov byte [edx - 1], al
xor byte [ecx - 1], al
sub esi, 1
jne 0x100ba890
mov eax, dword [ebp + 8]
pop esi
mov dword [edi + 0x170], eax
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret