Function at 0x4ba9c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.005e38a0
mov eax, dword [esi + 0x174]
mov edx, dword [ebp + 0xc]
push ebx
push edi
mov edi, ecx
mov ecx, dword [esi + 0x164]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], eax
xor eax, eax
mov ecx, edx
add ecx, dword [esi + 0x38]
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x4bac30
jb 0x4baa04
cmp ecx, 0xffffffe0
ja 0x4bac30
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x168]
xor ecx, ecx
mov dword [ebp - 4], eax
cmp dword [esi + 0x16c], ecx
je 0x4baa86
cmp edx, ecx
jne 0x4baa46
mov ecx, dword [esi + 0x160]
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call ecx
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [esi + 0x40]
mov eax, dword [esi + 0x44]
mov dword [esi + 0x178], edx
mov edx, dword [esi + 0x48]
mov dword [esi + 0x17c], eax
mov eax, dword [esi + 0x4c]
mov dword [esi + 0x180], edx
mov dword [ebp - 4], 0x10
mov dword [esi + 0x184], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x16c], ecx
mov ebx, dword [esi + 0xc]
mov edx, eax
and edx, 0xf
bswap ebx
mov dword [ebp - 0xc], edx
je 0x4baaf5
jmp 0x4baa9a
mov edx, dword [ebp - 0xc]
cmp dword [ebp + 0xc], 0
je 0x4baacb
mov cl, byte [edi]
dec dword [ebp + 0xc]
mov byte [eax + esi + 0x178], cl
mov dl, byte [edx + esi + 0x10]
xor dl, cl
mov ecx, dword [ebp + 8]
mov byte [ecx], dl
inc ecx
mov dword [ebp + 8], ecx
mov ecx, dword [ebp - 0xc]
inc ecx
inc eax
inc edi
and ecx, 0xf
mov dword [ebp - 0xc], ecx
jne 0x4baa97
jmp 0x4baad3
test edx, edx
jne 0x4bac22
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 8]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
xor ecx, ecx
mov edx, dword [ebp + 0xc]
cmp edx, 0x10
jb 0x4bab24
cmp eax, ecx
je 0x4bab24
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
cmp edx, 0xc00
jb 0x4bab84
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [ebp - 0x14], edx
push 0xc00
push edi
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push esi
push edx
push 0xc0
push eax
push edi
call dword [ebp + 0x10]
add ebx, 0xc0
mov eax, 0xc00
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
mov ecx, ebx
add esp, 0x24
bswap ecx
add edi, eax
dec dword [ebp - 0x14]
mov dword [esi + 0xc], ecx
jne 0x4bab39
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov ecx, edx
and ecx, 0xfffffff0
mov dword [ebp - 0x18], ecx
je 0x4babcf
push ecx
mov eax, ecx
shr eax, 4
push edi
lea edx, [esi + 0x60]
mov dword [ebp - 0x14], eax
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
push esi
push ecx
push edx
push eax
push edi
call dword [ebp + 0x10]
add ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x18]
add dword [ebp + 8], eax
mov ecx, ebx
add edi, eax
add esp, 0x24
sub dword [ebp + 0xc], eax
mov eax, dword [ebp - 4]
bswap ecx
mov dword [esi + 0xc], ecx
cmp dword [ebp + 0xc], 0
je 0x4bac22
mov edx, dword [ebp - 0x10]
mov ecx, dword [esi + 0x170]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call ecx
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
inc ebx
bswap ebx
add esp, 0xc
lea eax, [edx + ecx]
mov dword [esi + 0xc], ebx
lea edx, [edx + esi + 0x10]
sub edi, ecx
mov cl, byte [edi + eax]
mov ebx, dword [ebp - 4]
dec dword [ebp + 0xc]
inc dword [ebp - 4]
mov byte [esi + ebx + 0x178], cl
mov bl, byte [edx]
xor bl, cl
mov byte [eax], bl
inc edx
inc eax
cmp dword [ebp + 0xc], 0
jne 0x4babfe
mov eax, dword [ebp - 4]
mov dword [esi + 0x168], eax
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret