Function at 0xba1bec
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x48
call fcn.00bdbdec
mov eax, dword [0x58e2fc]
xor eax, esp
mov dword [esp + 0x44], eax
cmp dword [0x592b9c], 0
mov eax, dword [esp + 0x4c]
push ebx
mov dword [esp + 8], eax
je 0xba1d0b
lea ecx, [esp + 0xc]
push ecx
call fcn.00b796ec
push 0xda
push 0x544808
push 0x13
push 5
call fcn.00b79a3c
lea edx, [esp + 0x20]
push edx
push 0x592750
call fcn.00b7972c
mov ebx, eax
push 0xdc
neg ebx
push 0x544808
sbb ebx, ebx
push 0x13
inc ebx
push 6
mov dword [esp + 0x30], ebx
call fcn.00b79a3c
add esp, 0x2c
test ebx, ebx
jne 0xba1c7e
push 0xe1
push 0x544808
push 0x12
push 9
call fcn.00b79a3c
add esp, 0x10
mov eax, dword [0x592b88]
mov edx, dword [0x592b8c]
mov ecx, dword [0x592b84]
mov dword [esp + 0x14], eax
mov eax, dword [0x592b6c]
push esi
mov esi, dword [esp + 0x58]
mov dword [esp + 0x1c], edx
mov edx, dword [0x592b70]
mov dword [esp + 0x38], eax
mov eax, dword [0x592b74]
push edi
mov edi, ecx
add ecx, esi
mov dword [esp + 0x40], edx
mov edx, dword [0x592b78]
mov dword [esp + 0x44], eax
mov eax, dword [0x592b7c]
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], eax
mov dword [0x592b84], ecx
cmp ecx, 0x3ff
jl 0xba1d1c
mov eax, 0x7fdff7fd
imul ecx
sub edx, ecx
sar edx, 9
mov eax, edx
shr eax, 0x1f
add eax, edx
imul eax, eax, 0x3ff
add ecx, eax
mov dword [0x592b84], ecx
mov dword [0x592b80], 0x3ff
jmp 0xba1d32
mov dword [esp + 4], 0
mov ebx, dword [esp + 4]
jmp 0xba1c68
mov eax, dword [0x592b80]
cmp eax, 0x3ff
jge 0xba1d32
cmp ecx, eax
jle 0xba1d32
mov dword [0x592b80], ecx
mov eax, 0x66666667
imul esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
add ecx, ecx
mov edx, esi
sub edx, ecx
xor ecx, ecx
test edx, edx
setg cl
add ecx, eax
add dword [0x592b8c], ecx
test ebx, ebx
jne 0xba1d77
push 0x101
push 0x544808
push 0x12
push 0xa
call fcn.00b79a3c
add esp, 0x10
lea edx, [esp + 0x24]
push edx
call fcn.00b7ee3c
add esp, 4
test esi, esi
jle 0xba1e8a
push ebp
mov ebp, esi
dec esi
mov eax, 0xcccccccd
mul esi
shr edx, 4
inc edx
mov dword [esp + 0x18], edx
mov esi, ebp
cmp ebp, 0x14
jle 0xba1dab
mov esi, 0x14
push 0
call fcn.00b7fd5c
push eax
lea eax, [esp + 0x30]
push eax
call fcn.00b7ee8c
push 0x14
lea ecx, [esp + 0x50]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00b7f03c
lea ebx, [esi + edi - 0x3ff]
add esp, 0x18
lea ecx, [edi + 0x592758]
lea edx, [esp + 0x28]
test ebx, ebx
jle 0xba1e07
mov eax, esi
sub eax, ebx
push eax
push ecx
push edx
call fcn.00b7f03c
push ebx
lea eax, [esp + 0x38]
push 0x592758
push eax
call fcn.00b7f03c
add esp, 0x18
jmp 0xba1e12
push esi
push ecx
push edx
call fcn.00b7f03c
add esp, 0xc
mov ebx, dword [esp + 0x14]
push esi
lea eax, [esp + 0x2c]
push ebx
push eax
call fcn.00b7f03c
push 8
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x3c]
push edx
call fcn.00b7f03c
push 0
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x48]
push ecx
call fcn.00b7f04c
mov ecx, 1
add dword [esp + 0x48], ecx
add ebx, esi
add esp, 0x24
xor eax, eax
mov dword [esp + 0x14], ebx
test esi, esi
jle 0xba1e78
mov dl, byte [esp + eax + 0x40]
xor byte [edi + 0x592758], dl
add edi, ecx
cmp edi, 0x3ff
jl 0xba1e72
xor edi, edi
add eax, ecx
cmp eax, esi
jl 0xba1e5c
sub ebp, 0x14
sub dword [esp + 0x18], ecx
jne 0xba1d9f
mov ebx, dword [esp + 0x10]
pop ebp
lea eax, [esp + 0x24]
push eax
call fcn.00b7f0cc
add esp, 4
pop edi
pop esi
test ebx, ebx
jne 0xba1eb3
push 0x134
push 0x544808
push 0x12
push 9
call fcn.00b79a3c
add esp, 0x10
xor eax, eax
lea esp, [esp]
movzx ecx, byte [esp + eax + 0x34]
xor byte [eax + 0x592b6c], cl
movzx edx, byte [esp + eax + 0x35]
movzx ecx, byte [esp + eax + 0x36]
xor byte [eax + 0x592b6d], dl
xor byte [eax + 0x592b6e], cl
movzx edx, byte [esp + eax + 0x37]
movzx ecx, byte [esp + eax + 0x38]
xor byte [eax + 0x592b6f], dl
xor byte [eax + 0x592b70], cl
add eax, 5
cmp eax, 0x14
jl 0xba1ebc
fld qword [0x544800]
fld qword [0x592b90]
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 5
jp 0xba1f1e
fadd qword [esp + 0x58]
fstp qword [0x592b90]
jmp 0xba1f20
fstp st(0)
test ebx, ebx
pop ebx
jne 0xba1f3b
push 0x13f
push 0x544808
push 0x12
push 0xa
call fcn.00b79a3c
add esp, 0x10
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.00bd9175
add esp, 0x48
ret