Function at 0x512860
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x164
mov edi, edx
mov esi, ecx
mov eax, dword [esp + 0x17c]
mov ecx, dword [esp + 0x180]
mov edx, dword [esp + 0x178]
xorps xmm0, xmm0
movups xmmword [esp + 0x154], xmm0
movups xmmword [esp + 0x144], xmm0
movups xmmword [esp + 0x134], xmm0
movups xmmword [esp + 0x124], xmm0
mov ebx, dword [edx + 4]
mov dword [esp + 0x38], ebx
movups xmmword [esp + 0x24], xmm0
movups xmmword [esp + 0x14], xmm0
movups xmmword [esp + 4], xmm0
mov dword [esp + 0x34], 0
movups xmmword [esp + 0x3c], xmm0
movups xmmword [esp + 0x4c], xmm0
movups xmmword [esp + 0x5c], xmm0
mov dword [esp + 0x6c], 0
movups xmmword [esp + 0x70], xmm0
movups xmmword [esp + 0x80], xmm0
movups xmmword [esp + 0x90], xmm0
mov dword [esp + 0xa0], 0
sub esp, 4
lea ebx, [esp + 0x74]
push edx
push ecx
push eax
push ebx
call sym.fastboot.exe_HMAC_Init_ex
add esp, 0x14
xor ebp, ebp
test eax, eax
je 0x512d85
lea eax, [esp + 0x18]
lea ecx, [esp + 0x84]
push ecx
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d85
lea eax, [esp + 0x28]
lea ecx, [esp + 0x94]
push ecx
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d85
mov dword [esp], edi
lea edi, [esp + 8]
lea eax, [esp + 0x74]
push eax
push edi
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d85
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
push dword [esp + 0x188]
push dword [esp + 0x188]
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
push dword [esp + 0x190]
push dword [esp + 0x190]
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
push dword [esp + 0x198]
push dword [esp + 0x198]
push edi
call dword [eax + 0x10]
add esp, 0xc
xorps xmm0, xmm0
movups xmmword [esp + 0xd4], xmm0
movups xmmword [esp + 0xc4], xmm0
movups xmmword [esp + 0xb4], xmm0
movups xmmword [esp + 0xa4], xmm0
mov eax, dword [esp + 8]
lea ebp, [esp + 0xa4]
push ebp
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x10]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 0x28]
push eax
push edi
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
mov eax, dword [esp + 8]
push ebx
push ebp
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
lea ebp, [esp + 0x124]
push ebp
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x10]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
xorps xmm0, xmm0
movups xmmword [esp + 0x114], xmm0
movups xmmword [esp + 0x104], xmm0
movups xmmword [esp + 0xf4], xmm0
movups xmmword [esp + 0xe4], xmm0
lea eax, [esp + 0x84]
push eax
lea eax, [esp + 0x1c]
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
lea eax, [esp + 0x94]
push eax
lea eax, [esp + 0x2c]
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0xc]
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
mov eax, dword [esp + 0x70]
mov dword [esp + 4], eax
mov eax, dword [esp + 8]
push ebx
push ebp
lea edi, [esp + 0x10]
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp]
cmp eax, dword [esp + 0x38]
jbe 0x512b4d
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x54]
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
lea edi, [esp + 0x40]
je 0x512d7f
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x64]
push eax
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
lea eax, [esp + 8]
push eax
push edi
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
mov eax, dword [esp + 4]
mov dword [esp + 0x3c], eax
lea edi, [esp + 8]
mov eax, dword [esp + 8]
push dword [esp + 0x188]
push dword [esp + 0x188]
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
push dword [esp + 0x190]
push dword [esp + 0x190]
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
push dword [esp + 0x198]
push dword [esp + 0x198]
push edi
call dword [eax + 0x10]
add esp, 0xc
xorps xmm0, xmm0
movups xmmword [esp + 0xd4], xmm0
movups xmmword [esp + 0xc4], xmm0
movups xmmword [esp + 0xb4], xmm0
movups xmmword [esp + 0xa4], xmm0
mov eax, dword [esp + 8]
lea ebp, [esp + 0xa4]
push ebp
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x10]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 0x28]
push eax
push edi
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
mov eax, dword [esp + 8]
push ebx
push ebp
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 8]
lea ecx, [esp + 0xe4]
push ecx
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 8]
mov ebx, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x10]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
mov edx, dword [esp]
cmp ebx, edx
cmovae ebx, edx
test ebx, ebx
xorps xmm3, xmm3
je 0x512ce0
xor eax, eax
cmp ebx, 8
jb 0x512cc4
xor eax, eax
cmp ebx, 0x20
jb 0x512c98
mov eax, ebx
and eax, 0xffffffe0
xor ecx, ecx
nop dword [eax + eax]
movups xmm0, xmmword [esp + ecx + 0xe4]
movups xmm1, xmmword [esp + ecx + 0xf4]
movups xmm2, xmmword [esi + ecx]
xorps xmm2, xmm0
movups xmm0, xmmword [esi + ecx + 0x10]
xorps xmm0, xmm1
movups xmmword [esi + ecx], xmm2
movups xmmword [esi + ecx + 0x10], xmm0
add ecx, 0x20
cmp eax, ecx
jne 0x512c60
cmp ebx, eax
je 0x512ce0
test bl, 0x18
je 0x512cc4
mov ecx, eax
mov eax, ebx
and eax, 0xfffffff8
nop
movsd xmm0, qword [esp + ecx + 0xe4]
movsd xmm1, qword [esi + ecx]
xorps xmm1, xmm0
movlps qword [esi + ecx], xmm1
add ecx, 8
cmp eax, ecx
jne 0x512ca0
nop dword [eax]
cmp ebx, eax
je 0x512ce0
movzx ecx, byte [esp + eax + 0xe4]
xor byte [esi + eax], cl
inc eax
jmp 0x512cc0
sub edx, ebx
je 0x512dc7
mov dword [esp], edx
movups xmmword [esp + 0xd4], xmm3
movups xmmword [esp + 0xc4], xmm3
movups xmmword [esp + 0xb4], xmm3
movups xmmword [esp + 0xa4], xmm3
mov eax, dword [esp + 0x40]
push ebp
lea edi, [esp + 0x44]
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 0x40]
mov ebp, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x48]
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 0x60]
push eax
push edi
call sym.fastboot.exe_EVP_MD_CTX_copy_ex
add esp, 8
test eax, eax
je 0x512d7f
add esi, ebx
mov eax, dword [esp + 0x40]
push ebp
lea ecx, [esp + 0xa8]
push ecx
push edi
call dword [eax + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x40]
lea ebp, [esp + 0x124]
push ebp
push edi
call dword [eax + 0x14]
add esp, 8
mov eax, dword [esp + 0x40]
mov ebx, dword [eax + 4]
push dword [eax + 0x1c]
push dword [esp + 0x48]
jmp 0x512a52
lea ebx, [esp + 0x70]
xor ebp, ebp
lea eax, [esp + 0x124]
push 0x40
push eax
call sym.fastboot.exe_OPENSSL_cleanse
add esp, 8
lea eax, [esp + 4]
push eax
call sym.fastboot.exe_HMAC_CTX_cleanup
add esp, 4
lea eax, [esp + 0x3c]
push eax
call sym.fastboot.exe_HMAC_CTX_cleanup
add esp, 4
push ebx
call sym.fastboot.exe_HMAC_CTX_cleanup
add esp, 4
mov eax, ebp
add esp, 0x164
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebp, 1
lea ebx, [esp + 0x70]
jmp 0x512d85