Function at 0x4ba740
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x18
call fcn.005e28b0
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 0x4ba9ad
jb 0x4ba784
cmp ecx, 0xffffffe0
ja 0x4ba9ad
mov dword [esi + 0x3c], eax
mov dword [esi + 0x38], ecx
mov ecx, dword [esi + 0x168]
xor eax, eax
mov dword [ebp - 4], ecx
cmp dword [esi + 0x16c], eax
je 0x4ba806
cmp edx, eax
jne 0x4ba7c6
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 ecx, dword [esi + 0x40]
mov dword [esi + 0x178], ecx
mov ecx, dword [esi + 0x44]
mov dword [esi + 0x17c], ecx
mov ecx, dword [esi + 0x48]
mov dword [esi + 0x180], ecx
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 4], 0x10
mov dword [esi + 0x184], ecx
mov ecx, dword [ebp - 4]
mov dword [esi + 0x40], eax
mov dword [esi + 0x44], eax
mov dword [esi + 0x48], eax
mov dword [esi + 0x4c], eax
mov dword [esi + 0x16c], eax
mov ebx, dword [esi + 0xc]
mov eax, ecx
and eax, 0xf
bswap ebx
mov dword [ebp - 0xc], eax
je 0x4ba876
jmp 0x4ba81a
mov eax, dword [ebp - 0xc]
test edx, edx
je 0x4ba84b
mov al, byte [eax + esi + 0x10]
mov edx, dword [ebp + 8]
xor al, byte [edx]
inc edx
mov byte [edi], al
mov byte [ecx + esi + 0x178], al
mov eax, dword [ebp - 0xc]
mov dword [ebp + 8], edx
mov edx, dword [ebp + 0xc]
dec edx
inc eax
inc ecx
inc edi
and eax, 0xf
mov dword [ebp + 0xc], edx
mov dword [ebp - 0xc], eax
jne 0x4ba817
jmp 0x4ba853
test eax, eax
jne 0x4ba99f
push ecx
lea ecx, [esi + 0x178]
push ecx
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp edx, 0x10
jb 0x4ba8a2
test ecx, ecx
je 0x4ba8a2
push ecx
lea ecx, [esi + 0x178]
push ecx
lea edx, [esi + 0x60]
push edx
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 4]
add esp, 0x10
cmp edx, 0xc00
jb 0x4ba902
mov eax, 0xaaaaaaab
mul edx
shr edx, 0xb
mov dword [ebp - 0x14], edx
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push esi
push ecx
push 0xc0
push edi
push edx
call dword [ebp + 0x10]
add ebx, 0xc0
mov eax, ebx
bswap eax
push 0xc00
mov dword [esi + 0xc], eax
push edi
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [ebp - 8]
mov eax, 0xc00
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
add esp, 0x24
add edi, eax
dec dword [ebp - 0x14]
jne 0x4ba8b7
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
mov eax, edx
and eax, 0xfffffff0
mov dword [ebp - 0x14], eax
je 0x4ba94c
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push esi
push ecx
shr eax, 4
push eax
push edi
push edx
mov dword [ebp - 0x18], eax
call dword [ebp + 0x10]
add ebx, dword [ebp - 0x18]
lea ecx, [esi + 0x60]
mov eax, ebx
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x14]
add dword [ebp + 8], eax
sub dword [ebp + 0xc], eax
push eax
push edi
push ecx
lea edx, [esi + 0x40]
push edx
call dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
add esp, 0x24
add edi, dword [ebp - 0x14]
test edx, edx
je 0x4ba99f
mov eax, dword [ebp - 0x10]
mov edx, dword [esi + 0x170]
push eax
lea ecx, [esi + 0x10]
push ecx
push esi
call edx
mov edx, dword [ebp - 0xc]
inc ebx
bswap ebx
mov dword [esi + 0xc], ebx
mov ebx, dword [ebp + 8]
add esp, 0xc
lea ecx, [edx + edi]
lea edx, [edx + esi + 0x10]
sub ebx, edi
movzx edi, byte [edx]
movzx eax, byte [ebx + ecx]
dec dword [ebp + 0xc]
xor eax, edi
mov edi, dword [ebp - 4]
mov byte [ecx], al
mov byte [esi + edi + 0x178], al
inc edi
inc edx
inc ecx
cmp dword [ebp + 0xc], 0
mov dword [ebp - 4], edi
jne 0x4ba979
mov ecx, edi
mov dword [esi + 0x168], ecx
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