Function at 0x5ba600
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x654a76
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x164
mov dword [esp], ecx
push esi
lea ecx, [esp + 0x3c]
call fcn.004f0420
mov esi, dword [esp + 0x17c]
mov dword [esp + 0x170], 0
mov eax, dword [esi + 0x538]
cmp eax, 0x10
jg 0x5ba913
test eax, eax
jl 0x5ba913
cmp dword [esi + 0x534], 2
je 0x5ba671
mov ecx, dword [esp + 0x184]
push str.invalid_GCM_mode
mov eax, dword [ecx]
call dword [eax + 0x14]
jmp 0x5ba924
push ebx
push ebp
test eax, eax
push edi
je 0x5ba6b5
cdq
push 0
push 8
push edx
push eax
call fcn.00643400
mov ecx, dword [esi + 0x548]
add ecx, eax
mov dword [esi + 0x548], ecx
mov ebp, dword [esi + 0x54c]
adc ebp, edx
lea ecx, [esp + 0x48]
lea edx, [esi + 0x4f0]
push ecx
push edx
push esi
mov dword [esi + 0x54c], ebp
call fcn.005b8d20
add esp, 0xc
mov edi, dword [esi + 0x544]
mov ebp, dword [esi + 0x540]
mov eax, edi
lea ebx, [esi + 0x520]
shr eax, 0x18
mov dword [esp + 0x18], edi
mov ecx, edi
mov edx, edi
mov byte [ebx], al
mov al, byte [esp + 0x18]
shr ecx, 0x10
shr edx, 8
mov byte [esi + 0x521], cl
mov byte [esi + 0x522], dl
mov byte [esi + 0x523], al
mov ecx, 0x18
mov eax, ebp
mov edx, edi
call fcn.00643780
mov byte [esi + 0x524], al
mov ecx, 0x10
mov eax, ebp
mov edx, edi
call fcn.00643780
mov byte [esi + 0x525], al
mov ecx, 8
mov eax, ebp
mov edx, edi
call fcn.00643780
mov edi, dword [esi + 0x54c]
mov cl, byte [esi + 0x540]
mov ebp, dword [esi + 0x548]
mov edx, edi
mov byte [esi + 0x526], al
mov byte [esi + 0x527], cl
shr edx, 0x18
mov dword [esp + 0x18], edi
mov eax, edi
mov ecx, edi
mov byte [esi + 0x528], dl
mov dl, byte [esp + 0x18]
shr eax, 0x10
shr ecx, 8
mov byte [esi + 0x529], al
mov byte [esi + 0x52a], cl
mov byte [esi + 0x52b], dl
mov ecx, 0x18
mov eax, ebp
mov edx, edi
call fcn.00643780
mov byte [esi + 0x52c], al
mov ecx, 0x10
mov eax, ebp
mov edx, edi
call fcn.00643780
mov byte [esi + 0x52d], al
mov ecx, 8
mov eax, ebp
mov edx, edi
call fcn.00643780
mov byte [esi + 0x52e], al
mov al, byte [esi + 0x548]
lea edi, [esi + 0x4f0]
mov ecx, 0xfffffb10
mov byte [esi + 0x52f], al
mov eax, edi
sub ecx, esi
mov dl, byte [eax + 0x30]
xor byte [eax], dl
inc eax
lea edx, [ecx + eax]
cmp edx, 0x10
jb 0x5ba7cc
lea eax, [esp + 0x48]
push eax
push edi
push esi
call fcn.005b8d20
mov ecx, dword [esp + 0x1c]
add esp, 0xc
add esi, 0x510
mov edx, dword [ecx]
push ebx
push esi
call dword [edx + 0x10]
mov eax, dword [esp + 0x18c]
lea ebp, [eax + 0x68]
mov ecx, ebp
call fcn.005a8750
mov esi, eax
test esi, esi
jne 0x5ba818
mov esi, 0x10
jmp 0x5ba82e
cmp esi, 0x10
jbe 0x5ba824
mov esi, 0x10
jmp 0x5ba82e
cmp esi, 0xc
jae 0x5ba82e
mov esi, 0xc
xor eax, eax
cmp eax, esi
jae 0x5ba847
mov cl, byte [edi + eax + 0x30]
mov bl, byte [edi + eax]
xor cl, bl
mov byte [esp + eax + 0x1c], cl
inc eax
cmp eax, 0x10
jb 0x5ba830
mov al, byte [esp + 0x184]
mov bl, 1
test al, al
je 0x5ba86d
mov ecx, ebp
call fcn.004dd9e0
lea edx, [esp + 0x1c]
push esi
push edx
mov ecx, ebp
call fcn.004e1260
jmp 0x5ba8f8
lea eax, [esp + 0x1c]
push esi
push eax
mov ecx, ebp
call fcn.004e0ad0
mov bl, al
test bl, bl
jne 0x5ba8f8
lea ecx, [esp + 0x2c]
call fcn.004dfe70
push 0x10
push 0xff
lea ecx, [esp + 0x34]
mov byte [esp + 0x184], 1
call fcn.004e0ed0
lea ecx, [esp + 0x2c]
push ecx
mov ecx, ebp
call fcn.004e0a70
test al, al
je 0x5ba8b5
mov bl, 1
jmp 0x5ba8e7
mov edi, dword [esp + 0x190]
push str.GCM_decrypt_authentication_tag_not_equal_to_the_expected_value.
mov ecx, edi
mov edx, dword [edi]
call dword [edx + 0x14]
lea eax, [esp + 0x1c]
push esi
push eax
push str.decryptTag
mov ecx, edi
call fcn.004ef450
push ebp
push str.expectedTag
mov ecx, edi
call fcn.004ef410
lea ecx, [esp + 0x2c]
mov byte [esp + 0x17c], 0
call fcn.004e0890
lea ecx, [esp + 0x48]
mov dword [esp + 0x17c], 0xffffffff
call fcn.004f0460
pop edi
mov al, bl
pop ebp
pop ebx
jmp 0x5ba93a
mov ecx, dword [esp + 0x184]
push str.invalid_GCM_buflen
mov edx, dword [ecx]
call dword [edx + 0x14]
lea ecx, [esp + 0x3c]
mov dword [esp + 0x170], 0xffffffff
call fcn.004f0460
xor al, al
mov ecx, dword [esp + 0x168]
pop esi
mov dword fs:[0], ecx
add esp, 0x170
ret 0x10