Function at 0x5b718bab
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
and dword [ebp - 0x10], 0
cmp dword [esi + 0x4c], 0
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
je 0x5b718bcb
mov dword [ebp - 4], 2
jmp 0x5b718bd6
mov eax, dword [esi + 0x10]
xor edx, edx
div dword [esi + 8]
mov dword [ebp - 4], eax
mov eax, dword [esi + 0x38]
mov ecx, dword [esi + 0x3c]
mov edx, eax
or edx, ecx
je 0x5b718c06
sub eax, dword [esi + 0x40]
sbb ecx, dword [esi + 0x44]
xor edx, edx
cmp edx, ecx
jb 0x5b718c06
ja 0x5b718bf5
cmp dword [ebp + 0xc], eax
jbe 0x5b718c06
mov dword [ebp + 0xc], eax
test eax, eax
jne 0x5b718c06
mov eax, 0x80000000
jmp 0x5b718ebc
mov ecx, dword [esi + 0xc]
push edi
mov edi, dword [ebp - 4]
cmp edi, ecx
je 0x5b718c45
jbe 0x5b718c37
push 4
pop eax
cmp edi, eax
cmova eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div ecx
push eax
call fcn.5b6f1000
mov dword [ebp + 8], eax
test eax, eax
je 0x5b718ebb
mov ebx, dword [ebp + 8]
mov eax, edi
imul eax, dword [ebp + 0xc]
xor edx, edx
div dword [esi + 0xc]
mov dword [ebp + 0xc], eax
cmp dword [esi + 0x4c], 0
je 0x5b718d29
mov eax, dword [ebp + 0xc]
mov dword [ebp - 8], eax
cmp dword [esi + 0x74], 0
jg 0x5b718ce5
mov eax, dword [esi + 0x60]
mov ecx, dword [esi + 0xa4]
sub ecx, eax
push ecx
mov ecx, dword [esi + 0x5c]
add ecx, eax
push ecx
push dword [esi]
call fcn.5b6f76e7
add dword [esi + 0x60], eax
mov eax, dword [esi + 0x60]
cmp eax, dword [esi + 0xa4]
jae 0x5b718c99
push dword [esi]
call fcn.5b6f7cb9
test eax, eax
je 0x5b718d21
push 0x20
jmp 0x5b718c9b
push 4
cmp dword [esi + 0x74], 0
pop eax
je 0x5b718ca5
or eax, 0x10
push eax
lea eax, [esi + 0x50]
push eax
push dword [esi + 0x4c]
call dword [sym.imp.msacm32.dll_acmStreamConvert]
test eax, eax
jne 0x5b718d1a
mov ecx, dword [esi + 0x64]
test ecx, ecx
jne 0x5b718cc3
cmp dword [esi + 0x74], ecx
je 0x5b718d1a
sub dword [esi + 0x60], ecx
mov edx, dword [esi + 0x60]
je 0x5b718cdc
mov eax, dword [esi + 0x5c]
push edx
add ecx, eax
push ecx
push eax
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov eax, dword [esi + 0x6c]
mov dword [esi + 0xa8], eax
mov ebx, dword [esi + 0x74]
cmp dword [ebp - 8], ebx
cmovb ebx, dword [ebp - 8]
push ebx
push dword [esi + 0xa8]
push dword [ebp + 8]
call sub.msvcrt.dll_memcpy
add dword [ebp + 8], ebx
sub dword [esi + 0x74], ebx
add dword [esi + 0xa8], ebx
add esp, 0xc
sub dword [ebp - 8], ebx
mov ebx, dword [ebp + 8]
je 0x5b718d21
jmp 0x5b718c55
mov dword [ebp - 0x10], 0x80000000
mov eax, dword [ebp - 8]
sub dword [ebp + 0xc], eax
jmp 0x5b718d7c
mov edi, dword [esi + 0x48]
test edi, edi
je 0x5b718d41
push edi
lea eax, [esi + 0xac]
push eax
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0xc]
sub eax, edi
push eax
lea eax, [edi + ebx]
push eax
push dword [esi]
call fcn.5b6f76e7
add eax, edi
xor edx, edx
mov dword [ebp + 0xc], eax
div dword [esi + 0x10]
mov dword [esi + 0x48], edx
test edx, edx
je 0x5b718d7c
sub dword [ebp + 0xc], edx
mov eax, dword [ebp + 0xc]
push edx
add eax, ebx
push eax
lea eax, [esi + 0xac]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0xc], 0
je 0x5b718e9e
push 3
pop edi
cmp dword [ebp - 4], edi
jne 0x5b718dc9
mov eax, dword [ebp + 0xc]
xor edx, edx
mov ecx, edi
div ecx
mov ecx, eax
imul ecx, ecx, 3
add ecx, ebx
shl eax, 2
lea edx, [eax + ebx]
mov dword [ebp + 0xc], eax
sub ecx, edi
mov eax, dword [ecx]
and eax, 0xffffff
cmp dword [esi + 0x20], 1
je 0x5b718db9
shl eax, 8
sub edx, 4
mov dword [edx], eax
cmp edx, ebx
jne 0x5b718da7
mov dword [ebp - 4], 4
cmp dword [ebp - 4], 1
jne 0x5b718de3
cmp dword [esi + 0x20], 0
je 0x5b718dfc
mov ecx, dword [ebp + 0xc]
mov eax, ebx
xor byte [eax], 0x80
inc eax
dec ecx
jne 0x5b718dda
jmp 0x5b718dfc
cmp dword [esi + 0x20], 1
jne 0x5b718dfc
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [ebp - 4]
push dword [ebp - 4]
push eax
push ebx
push ebx
call fcn.5b707e40
cmp dword [esi + 4], edi
jne 0x5b718e4e
cmp dword [ebp - 4], 8
jne 0x5b718e2b
cmp dword [esi + 0xc], 4
mov edx, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
cmovne edx, ebx
shr ecx, 3
xor eax, eax
test ecx, ecx
je 0x5b718e28
fld qword [ebx + eax*8]
fstp dword [edx + eax*4]
inc eax
cmp eax, ecx
jb 0x5b718e1d
shr dword [ebp + 0xc], 1
mov eax, dword [esi + 0xc]
cmp eax, 4
je 0x5b718e9e
push eax
mov eax, dword [ebp + 0xc]
shr eax, 2
push eax
push dword [ebp - 0xc]
push ebx
call fcn.5b707c20
mov ecx, edi
sub ecx, dword [esi + 0xc]
shr dword [ebp + 0xc], cl
jmp 0x5b718e9e
cmp dword [esi + 0xc], 4
jne 0x5b718e77
mov eax, dword [ebp + 0xc]
xor edx, edx
div dword [ebp - 4]
push dword [ebp - 4]
mov edi, eax
push edi
push dword [ebp - 0xc]
push dword [ebp - 0xc]
call fcn.5b707b20
mov eax, edi
shl eax, 2
mov dword [ebp + 0xc], eax
jmp 0x5b718e9e
cmp dword [ebp - 4], 4
jne 0x5b718e9e
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0xc]
shr eax, 2
lea edi, [eax + eax]
lea ecx, [ebx + 2]
mov dword [ebp + 0xc], edi
mov di, word [ecx]
mov word [edx], di
add edx, 2
add ecx, 4
dec eax
jne 0x5b718e8f
mov eax, dword [ebp - 4]
cmp eax, dword [esi + 0xc]
jbe 0x5b718eac
push ebx
call fcn.5b6f1026
mov ecx, dword [ebp + 0xc]
add dword [esi + 0x40], ecx
mov eax, dword [ebp - 0x10]
adc dword [esi + 0x44], 0
or eax, ecx
pop edi
pop ebx
leave
ret 8