Function at 0x852d80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xb0
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x1c]
push ebx
call sym.adb.exe_EVP_MD_size
add esp, 4
mov dword [esp + 0xc], eax
xorps xmm0, xmm0
movaps xmmword [esp + 0x90], xmm0
movaps xmmword [esp + 0x80], xmm0
movaps xmmword [esp + 0x70], xmm0
mov dword [esp + 0xa0], 0
lea edi, [esp + 0x70]
push edi
call sym.adb.exe_HMAC_CTX_init
add esp, 4
push 0
push ebx
push esi
push dword [ebp + 8]
push edi
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
xor ebx, ebx
test eax, eax
je 0x853080
mov ebx, dword [ebp + 0x20]
test ebx, ebx
je 0x853077
mov esi, dword [ebp + 0x24]
mov ecx, 1
xorps xmm0, xmm0
jmp 0x852e2c
add esi, ebx
mov ecx, dword [esp + 0x20]
inc ecx
mov eax, dword [esp + 0x24]
sub eax, ebx
mov ebx, eax
lea edi, [esp + 0x70]
xorps xmm0, xmm0
je 0x853077
mov eax, dword [esp + 0xc]
cmp eax, ebx
mov dword [esp + 0x24], ebx
cmovb ebx, eax
mov dword [esp + 0x20], ecx
mov eax, ecx
bswap eax
mov dword [esp + 0x2c], eax
movaps xmmword [esp + 0x60], xmm0
movaps xmmword [esp + 0x50], xmm0
movaps xmmword [esp + 0x40], xmm0
movaps xmmword [esp + 0x30], xmm0
sub esp, 0x14
movups xmmword [esp + 4], xmm0
mov dword [esp], edi
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
test eax, eax
je 0x853073
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x853073
push 4
lea eax, [esp + 0x30]
push eax
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x853073
push 0
lea eax, [esp + 0x34]
push eax
push edi
call sym.adb.exe_HMAC_Final
add esp, 0xc
test eax, eax
je 0x853073
test ebx, ebx
je 0x852ece
push ebx
lea eax, [esp + 0x34]
push eax
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
cmp dword [ebp + 0x18], 2
jb 0x852e10
lea eax, [ebx - 0x20]
mov dword [esp + 0x18], eax
shr eax, 5
inc eax
mov ecx, ebx
and ecx, 0xffffffe0
mov dword [esp + 8], ecx
mov dword [esp + 0x14], eax
and eax, 0xfffffffe
mov dword [esp + 0x10], eax
mov eax, ebx
and eax, 0xfffffff8
mov dword [esp + 0x1c], eax
mov eax, 1
jmp 0x852f1e
mov eax, dword [esp + 0x28]
inc eax
cmp eax, dword [ebp + 0x18]
je 0x852e10
mov dword [esp + 0x28], eax
sub esp, 0x14
xorps xmm0, xmm0
movups xmmword [esp + 4], xmm0
lea edi, [esp + 0x84]
mov dword [esp], edi
call sym.adb.exe_HMAC_Init_ex
add esp, 0x14
test eax, eax
je 0x853073
push dword [esp + 0xc]
lea eax, [esp + 0x34]
push eax
push edi
call sym.adb.exe_HMAC_Update
add esp, 0xc
test eax, eax
je 0x853073
push 0
lea eax, [esp + 0x34]
push eax
push edi
call sym.adb.exe_HMAC_Final
add esp, 0xc
test eax, eax
je 0x853073
test ebx, ebx
je 0x852f10
xor ecx, ecx
cmp ebx, 8
jb 0x853068
xor eax, eax
cmp ebx, 0x20
jb 0x85303c
xor eax, eax
cmp dword [esp + 0x18], 0x20
jb 0x852ffe
xor eax, eax
mov ecx, dword [esp + 0x10]
nop word cs:[eax + eax]
movups xmm0, xmmword [esp + eax + 0x30]
movups xmm1, xmmword [esp + eax + 0x40]
movups xmm2, xmmword [esi + eax]
xorps xmm2, xmm0
movups xmm0, xmmword [esi + eax + 0x10]
xorps xmm0, xmm1
movups xmmword [esi + eax], xmm2
movups xmmword [esi + eax + 0x10], xmm0
movups xmm0, xmmword [esp + eax + 0x50]
movups xmm1, xmmword [esp + eax + 0x60]
movups xmm2, xmmword [esi + eax + 0x20]
xorps xmm2, xmm0
movups xmm0, xmmword [esi + eax + 0x30]
xorps xmm0, xmm1
movups xmmword [esi + eax + 0x20], xmm2
movups xmmword [esi + eax + 0x30], xmm0
add eax, 0x40
add ecx, 0xfffffffe
jne 0x852fb0
test byte [esp + 0x14], 1
je 0x853027
movups xmm0, xmmword [esp + eax + 0x30]
movups xmm1, xmmword [esp + eax + 0x40]
movups xmm2, xmmword [esi + eax]
xorps xmm2, xmm0
movups xmm0, xmmword [esi + eax + 0x10]
xorps xmm0, xmm1
movups xmmword [esi + eax], xmm2
movups xmmword [esi + eax + 0x10], xmm0
cmp ebx, dword [esp + 8]
je 0x852f10
mov ecx, dword [esp + 8]
mov eax, ecx
test bl, 0x18
je 0x853068
mov ecx, dword [esp + 0x1c]
movsd xmm0, qword [esp + eax + 0x30]
movsd xmm1, qword [esi + eax]
xorps xmm1, xmm0
movlps qword [esi + eax], xmm1
add eax, 8
cmp ecx, eax
jne 0x853040
mov eax, ecx
nop dword [eax + eax]
cmp ebx, ecx
je 0x852f10
movzx eax, byte [esp + ecx + 0x30]
xor byte [esi + ecx], al
inc ecx
jmp 0x853060
xor ebx, ebx
jmp 0x853080
xor ebx, ebx
cmp dword [ebp + 0x18], 0
setne bl
push edi
call sym.adb.exe_HMAC_CTX_cleanup
add esp, 4
mov eax, ebx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret