Function at 0x5ba820
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xf0
mov esi, dword [ebp + 0x10]
cmp esi, 0x20
je 0x5ba85b
xor ebx, ebx
cmp esi, 0x10
jne 0x5babfe
push 0x5e7260
push 0x9b6938
call sym.adb.exe_CRYPTO_once
add esp, 8
mov eax, 0x9b6940
jmp 0x5ba872
push 0x5e81a0
push 0x9b6abc
call sym.adb.exe_CRYPTO_once
add esp, 8
mov eax, 0x9b6ac0
mov ecx, dword [ebp + 0xc]
xorps xmm0, xmm0
movaps xmmword [esp + 0xb0], xmm0
movaps xmmword [esp + 0xa0], xmm0
movaps xmmword [esp + 0x90], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0xc4], 0
mov dword [esp + 0xc0], 0
sub esp, 4
lea edx, [esp + 0x14]
push eax
push esi
push ecx
push edx
call sym.adb.exe_CMAC_Init
add esp, 0x14
xor ebx, ebx
test eax, eax
je 0x5bab6a
mov ecx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x14]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0xc4]
mov esi, dword [eax + 4]
xorps xmm0, xmm0
movaps xmmword [esp + 0xd0], xmm0
test ebx, ebx
je 0x5ba981
mov eax, esi
sub eax, ebx
cmp eax, ecx
cmovae eax, ecx
lea edx, [esp + 0xb4]
test eax, eax
je 0x5ba940
add ebx, edx
push eax
push edi
push ebx
mov ebx, eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov eax, ebx
mov ecx, dword [ebp + 0x18]
add esp, 0xc
mov ebx, dword [esp + 0xc4]
add ebx, eax
mov dword [esp + 0xc4], ebx
sub ecx, eax
je 0x5ba9d2
mov ebx, eax
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0xd0]
push esi
lea edx, [esp + 0xb8]
push edx
push ecx
lea ecx, [esp + 0x1c]
push ecx
call dword [eax + 0x20]
add esp, 0x10
test eax, eax
je 0x5ba9f6
add edi, ebx
mov ecx, dword [esp + 0xc]
mov ebx, ecx
cmp ecx, esi
jbe 0x5ba9b5
nop word [eax + eax]
mov eax, dword [esp + 0x10]
push esi
push edi
lea ecx, [esp + 0xd8]
push ecx
lea ecx, [esp + 0x1c]
push ecx
call dword [eax + 0x20]
add esp, 0x10
test eax, eax
je 0x5ba9f6
add edi, esi
sub ebx, esi
cmp ebx, esi
ja 0x5ba990
test ebx, ebx
je 0x5ba9cb
lea eax, [esp + 0xb4]
push ebx
push edi
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp + 0xc4], ebx
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x10]
test edi, edi
je 0x5ba9fd
mov edx, dword [eax + 4]
cmp ebx, edx
jne 0x5baa07
lea eax, [esp + 0x94]
mov ebx, edx
test ebx, ebx
jne 0x5baa43
jmp 0x5bab51
xor ebx, ebx
jmp 0x5bab6a
mov ebx, 1
jmp 0x5bab72
mov byte [esp + ebx + 0xb4], 0x80
mov ecx, dword [esp + 0xc4]
mov eax, ecx
not eax
add eax, edx
mov ebx, edx
je 0x5baa34
add ecx, esp
add ecx, 0xb5
push eax
push 0
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
lea eax, [esp + 0xa4]
test ebx, ebx
je 0x5bab51
xor ecx, ecx
cmp ebx, 8
jb 0x5bab3e
xor ecx, ecx
cmp ebx, 0x20
jb 0x5bab17
mov esi, ebx
lea ecx, [ebx - 0x20]
mov ebx, ecx
shr ebx, 5
inc ebx
xor edx, edx
cmp ecx, 0x20
jb 0x5baada
mov ecx, ebx
and ecx, 0xfffffffe
xor edx, edx
nop word cs:[eax + eax]
movups xmm0, xmmword [esp + edx + 0xb4]
movups xmm1, xmmword [esp + edx + 0xc4]
movups xmm2, xmmword [eax + edx]
xorps xmm2, xmm0
movups xmm0, xmmword [eax + edx + 0x10]
xorps xmm0, xmm1
movups xmmword [edi + edx], xmm2
movups xmmword [edi + edx + 0x10], xmm0
movups xmm0, xmmword [esp + edx + 0xd4]
movups xmm1, xmmword [esp + edx + 0xe4]
movups xmm2, xmmword [eax + edx + 0x20]
xorps xmm2, xmm0
movups xmm0, xmmword [eax + edx + 0x30]
xorps xmm0, xmm1
movups xmmword [edi + edx + 0x20], xmm2
movups xmmword [edi + edx + 0x30], xmm0
add edx, 0x40
add ecx, 0xfffffffe
jne 0x5baa80
mov ecx, esi
and ecx, 0xffffffe0
test bl, 1
je 0x5bab0c
movups xmm0, xmmword [esp + edx + 0xb4]
movups xmm1, xmmword [esp + edx + 0xc4]
movups xmm2, xmmword [eax + edx]
xorps xmm2, xmm0
movups xmm0, xmmword [eax + edx + 0x10]
xorps xmm0, xmm1
movups xmmword [edi + edx], xmm2
movups xmmword [edi + edx + 0x10], xmm0
mov ebx, esi
cmp esi, ecx
je 0x5bab51
test bl, 0x18
je 0x5bab3e
mov edx, ecx
mov ecx, ebx
and ecx, 0xfffffff8
nop
movsd xmm0, qword [esp + edx + 0xb4]
movsd xmm1, qword [eax + edx]
xorps xmm1, xmm0
movlps qword [edi + edx], xmm1
add edx, 8
cmp ecx, edx
jne 0x5bab20
jmp 0x5bab4d
movzx edx, byte [eax + ecx]
xor dl, byte [esp + ecx + 0xb4]
mov byte [edi + ecx], dl
inc ecx
cmp ebx, ecx
jne 0x5bab3e
mov eax, dword [esp + 0x10]
push ebx
push edi
push edi
lea ecx, [esp + 0x1c]
push ecx
call dword [eax + 0x20]
add esp, 0x10
xor ebx, ebx
test eax, eax
setne bl
mov eax, dword [esp + 0x10]
test eax, eax
je 0x5bab83
mov eax, dword [eax + 0x24]
test eax, eax
je 0x5bab83
lea ecx, [esp + 0x10]
push ecx
call eax
add esp, 4
push dword [esp + 0x18]
call sym.adb.exe_OPENSSL_free
add esp, 4
xorps xmm0, xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0x90], 0
lea eax, [esp + 0x94]
push 0x10
push eax
call sym.adb.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 0xa4]
push 0x10
push eax
call sym.adb.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 0xb4]
push 0x10
push eax
call sym.adb.exe_OPENSSL_cleanse
add esp, 8
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret