Function at 0x4c99a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x2c
mov ebx, dword [esp + 0x54]
mov edi, dword [esp + 0x48]
mov dword [edi], 0
xor ebp, ebp
cmp ebx, 0x10
jb 0x4c9c58
lea edx, [ebx - 8]
cmp edx, dword [esp + 0x4c]
ja 0x4c9c58
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x44]
cmp ebx, 0x10
jne 0x4c9a17
mov dword [esp + 0x1c], edx
xorps xmm0, xmm0
movups xmmword [esp + 0xc], xmm0
lea eax, [esp + 0xc]
push dword [esp + 0x40]
push eax
push ecx
call fcn.004c61a0
add esp, 0xc
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
movsd xmm0, qword [esp + 0x14]
movsd qword [esi], xmm0
jmp 0x4c9b01
xor ebp, ebp
cmp ebx, 0x18
jl 0x4c9c58
mov eax, ebx
and eax, 7
jne 0x4c9c58
movsd xmm0, qword [ecx]
movsd qword [esp + 0xc], xmm0
add ecx, 8
mov dword [esp + 0x1c], edx
push edx
push ecx
push dword [esp + 0x4c]
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
add esp, 0xc
shr ebx, 3
lea eax, [ebx + ebx*2]
lea eax, [eax*2 - 6]
mov ecx, 1
mov dword [esp], ebx
sub ecx, ebx
mov dword [esp + 0x28], ecx
mov ecx, 5
lea ebp, [esp + 0xc]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
mov ebx, eax
mov edi, dword [esp]
mov esi, dword [esp + 0x44]
nop word cs:[eax + eax]
xor byte [esp + 0x13], bl
xor byte [esp + 0x12], bh
mov eax, ebx
shr eax, 0x10
xor byte [esp + 0x11], al
mov eax, ebx
shr eax, 0x18
xor byte [esp + 0x10], al
movsd xmm0, qword [esi + edi*8 - 0x10]
movsd qword [esp + 0x14], xmm0
push dword [esp + 0x40]
push ebp
push ebp
call fcn.004c61a0
add esp, 0xc
movsd xmm0, qword [esp + 0x14]
movsd qword [esi + edi*8 - 0x10], xmm0
dec edi
dec ebx
cmp edi, 1
jne 0x4c9a90
mov ecx, dword [esp + 4]
dec ecx
mov eax, dword [esp + 8]
add eax, dword [esp + 0x28]
cmp ecx, 6
jb 0x4c9a70
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], eax
mov edi, dword [esp + 0x48]
mov ebx, dword [esp + 0x54]
lea eax, [esp + 0x20]
push 4
push 0x58e258
push eax
call sym.fastboot.exe_CRYPTO_memcmp
add esp, 0xc
mov ecx, eax
not eax
dec ecx
and ecx, eax
sar ecx, 0x1f
mov edx, dword [esp + 0x24]
test edx, edx
cmove ecx, edx
bswap edx
lea eax, [edx - 1]
lea esi, [ebx - 9]
xor eax, esi
xor ebp, ebp
cmp eax, 8
cmovb ebp, ecx
lea eax, [ebx - 0xf]
cmp eax, dword [esp + 0x1c]
jae 0x4c9c4f
lea ecx, [ebx - 0xb]
mov edi, ecx
xor edi, edx
mov dword [esp + 4], eax
mov eax, ecx
sub eax, edx
xor eax, ecx
or eax, edi
mov dword [esp], esi
mov esi, dword [esp + 0x44]
movzx esi, byte [esi + ebx - 0xb]
dec esi
sar esi, 0x1f
xor eax, ecx
mov eax, 0xffffffff
cmovs esi, eax
mov dword [esp + 8], esi
lea esi, [ebx - 0xa]
mov ecx, esi
xor ecx, edx
mov eax, esi
sub eax, edx
xor eax, esi
or eax, ecx
mov ecx, dword [esp + 0x44]
movzx edi, byte [ecx + ebx - 0xa]
dec edi
sar edi, 0x1f
xor eax, esi
mov eax, 0xffffffff
cmovs edi, eax
mov esi, dword [esp]
mov eax, esi
xor eax, edx
mov ecx, esi
sub ecx, edx
xor ecx, esi
or ecx, eax
mov eax, dword [esp + 0x44]
movzx eax, byte [eax + ebx - 9]
dec eax
sar eax, 0x1f
xor ecx, esi
lea ecx, [ebx - 0xc]
movd xmm0, ecx
lea ecx, [ebx - 0xd]
movd xmm1, ecx
movd xmm2, dword [esp + 4]
mov ecx, dword [esp + 0x44]
movd xmm3, dword [ecx + ebx - 0xf]
lea ecx, [ebx - 0xe]
punpckldq xmm1, xmm0
movd xmm0, ecx
punpckldq xmm2, xmm0
punpcklqdq xmm2, xmm1
movd xmm0, edx
pshufd xmm0, xmm0, 0
movdqa xmm1, xmm2
pxor xmm1, xmm0
movdqa xmm4, xmm2
psubd xmm4, xmm0
pxor xmm4, xmm2
por xmm4, xmm1
pxor xmm4, xmm2
pxor xmm0, xmm0
punpcklbw xmm3, xmm0
punpcklwd xmm3, xmm0
pcmpeqd xmm0, xmm0
paddd xmm0, xmm3
por xmm0, xmm4
mov ecx, 0xffffffff
cmovs eax, ecx
movmskps esi, xmm0
xor ecx, ecx
cmp esi, 0xf
sete cl
and eax, edi
mov edi, dword [esp + 0x48]
and eax, dword [esp + 8]
and eax, ebp
neg ecx
and eax, ecx
mov ebp, eax
mov eax, ebp
and eax, edx
mov dword [edi], eax
and ebp, 1
mov eax, ebp
add esp, 0x2c
pop esi
pop edi
pop ebx
pop ebp
ret