Function at 0x850260
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x130
mov edi, dword [ebp + 0x18]
xor eax, eax
cmp edi, 0x1fffffff
ja 0x850317
mov esi, dword [ebp + 8]
cmp dword [esi + 0x18], 0
jne 0x850317
lea edx, [edi*8]
mov ecx, dword [esi + 0x14]
add edx, ecx
jb 0x850317
mov eax, dword [esi + 0x5c]
lea edx, [eax + edi]
add edx, 0x48
pxor xmm0, xmm0
movdqa xmmword [esp + 0x80], xmm0
movdqa xmmword [esp + 0x70], xmm0
movdqa xmmword [esp + 0x60], xmm0
movdqa xmmword [esp + 0x50], xmm0
xor ebx, ebx
pxor xmm0, xmm0
movdqa xmmword [esp + 0x30], xmm0
mov dword [esp + 0x14], edx
cmp edx, 0x40
jae 0x85031f
movdqa xmm2, xmmword [esp + 0x30]
movdqa xmm0, xmm2
pxor xmm1, xmm1
punpckhbw xmm0, xmm1
pshuflw xmm0, xmm0, 0x1b
pshufhw xmm0, xmm0, 0x1b
punpcklbw xmm2, xmm1
pshuflw xmm1, xmm2, 0x1b
pshufhw xmm1, xmm1, 0x1b
packuswb xmm1, xmm0
mov eax, dword [ebp + 0xc]
movdqu xmmword [eax], xmm1
bswap ebx
mov dword [eax + 0x10], ebx
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp + 0x14]
lea ebx, [eax + edx]
add ebx, 0x48
shr ebx, 6
lea eax, [ecx + edx*8]
mov ecx, eax
shr ecx, 8
movd xmm0, ecx
mov ecx, eax
shr ecx, 0x10
movd xmm1, ecx
lea ecx, [ebx - 1]
mov dword [esp + 0x1c], ecx
shr dword [esp + 0x14], 6
neg ebx
mov dword [esp + 0x20], ebx
movd xmm2, eax
shr eax, 0x18
punpckldq xmm0, xmm2
movd xmm2, eax
punpckldq xmm2, xmm1
punpcklqdq xmm2, xmm0
movdqa xmmword [esp + 0x90], xmm2
movd xmm0, edx
pshufd xmm0, xmm0, 0
movdqa xmmword [esp + 0xa0], xmm0
neg edx
mov dword [esp + 0x2c], edx
pxor xmm0, xmm0
movdqa xmmword [esp + 0x30], xmm0
lea eax, [esi + 0x1c]
mov dword [esp + 0x18], eax
xor ebx, ebx
xor eax, eax
xor edx, edx
jmp 0x85045a
mov edi, dword [esp + 0x24]
mov ebx, edi
xor ebx, dword [esp + 0x1c]
dec ebx
and ebx, dword [esp + 0x20]
movd xmm0, dword [esp + 0x8c]
movd xmm1, ebx
sar ebx, 0x1f
pshufd xmm2, xmm1, 0
psrad xmm2, 0x1f
movdqa xmmword [esp + 0x40], xmm2
movdqa xmm1, xmmword [esp + 0x90]
pand xmm1, xmm2
pand xmm1, xmmword [0x947120]
packuswb xmm1, xmm1
packuswb xmm1, xmm1
por xmm1, xmm0
movd dword [esp + 0x8c], xmm1
lea eax, [esp + 0x50]
push eax
mov esi, dword [ebp + 8]
push esi
call sym.adb.exe_SHA1_Transform
add esp, 8
and ebx, dword [esi + 0x10]
mov eax, dword [esp + 0x28]
or eax, ebx
mov ebx, eax
mov eax, edi
mov edx, dword [esp + 0x10]
sub edx, dword [esp + 0xc]
movdqu xmm0, xmmword [esi]
pand xmm0, xmmword [esp + 0x40]
movdqa xmm1, xmmword [esp + 0x30]
por xmm1, xmm0
movdqa xmmword [esp + 0x30], xmm1
add edx, 0x40
inc eax
cmp eax, dword [esp + 0x14]
mov edi, dword [ebp + 0x18]
je 0x8502d8
mov dword [esp + 0xc], 0
mov dword [esp + 0x24], eax
test eax, eax
mov dword [esp + 0x10], edx
jne 0x85049a
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x5c]
mov dword [esp + 0xc], 0
test esi, esi
je 0x85049a
push esi
push dword [esp + 0x1c]
lea eax, [esp + 0x58]
push eax
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [esp + 0x1c]
add esp, 0xc
mov dword [esp + 0xc], esi
cmp edx, edi
mov esi, dword [esp + 0xc]
jae 0x8504ca
mov ecx, 0x40
sub ecx, esi
mov eax, edi
sub eax, edx
cmp ecx, eax
cmovb eax, ecx
test eax, eax
je 0x8504ca
mov ecx, dword [ebp + 0x10]
add ecx, edx
lea edx, [esp + esi + 0x50]
push eax
push ecx
push edx
call sub.api_ms_win_crt_private_l1_1_0.dll_memcpy
add esp, 0xc
mov dword [esp + 0x28], ebx
cmp esi, 0x3f
mov eax, dword [ebp + 0x14]
ja 0x8503b0
mov edi, 0x40
mov esi, dword [esp + 0xc]
sub edi, esi
cmp edi, 0x10
jb 0x850736
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
sub eax, ecx
mov edx, edi
and edx, 0xfffffff0
lea esi, [ecx + edx]
movd xmm0, ecx
pshufd xmm1, xmm0, 0
movdqa xmm2, xmm1
paddd xmm2, xmmword [0x9470c0]
movdqa xmm0, xmm1
paddd xmm0, xmmword [str._b_t_n_v]
movdqa xmm3, xmm0
movdqa xmm5, xmm1
paddd xmm5, xmmword [0x9470e0]
paddd xmm1, xmmword [0x9470f0]
movd xmm0, eax
pshufd xmm0, xmm0, 0
movdqa xmmword [esp + 0xb0], xmm0
add ecx, esp
add ecx, 0x50
xor ebx, ebx
nop word cs:[eax + eax]
movdqa xmmword [esp + 0xf0], xmm5
movdqa xmmword [esp + 0x100], xmm3
movdqa xmmword [esp + 0x110], xmm2
movdqa xmmword [esp + 0x40], xmm1
movdqa xmm4, xmmword [esp + 0xb0]
movdqa xmm0, xmm4
paddd xmm0, xmm3
movdqa xmmword [esp + 0xe0], xmm0
movdqa xmm0, xmm4
paddd xmm0, xmm2
movdqa xmm2, xmm4
paddd xmm2, xmm1
paddd xmm4, xmm5
movdqa xmm1, xmm4
movdqa xmm6, xmmword [esp + 0xa0]
pxor xmm1, xmm6
movdqa xmmword [esp + 0xd0], xmm1
movdqa xmm7, xmm2
pxor xmm7, xmm6
movdqa xmm3, xmm0
pxor xmm3, xmm6
movdqa xmm5, xmm3
movdqa xmmword [esp + 0xc0], xmm3
movdqa xmm3, xmm4
psubd xmm3, xmm6
pxor xmm3, xmm4
por xmm3, xmm1
pxor xmm3, xmm4
movdqa xmm4, xmm2
psubd xmm4, xmm6
pxor xmm4, xmm2
por xmm4, xmm7
pxor xmm4, xmm2
movdqa xmm2, xmm0
psubd xmm2, xmm6
pxor xmm2, xmm0
por xmm2, xmm5
pxor xmm2, xmm0
movdqa xmm0, xmmword [esp + 0xe0]
movdqa xmm5, xmm0
pxor xmm5, xmm6
movdqa xmm1, xmm0
psubd xmm1, xmm6
pxor xmm1, xmm0
por xmm1, xmm5
pxor xmm1, xmm0
psrad xmm1, 0x1f
psrad xmm2, 0x1f
packssdw xmm1, xmm2
movdqa xmm2, xmmword [esp + 0x110]
psrad xmm4, 0x1f
psrad xmm3, 0x1f
packssdw xmm4, xmm3
packsswb xmm4, xmm1
movdqa xmm3, xmmword [esp + 0xd0]
movdqa xmm1, xmm3
pcmpeqd xmm6, xmm6
paddd xmm1, xmm6
pandn xmm3, xmm1
movdqa xmm1, xmm7
paddd xmm1, xmm6
pandn xmm7, xmm1
movdqa xmm0, xmmword [esp + 0xc0]
movdqa xmm1, xmm0
paddd xmm1, xmm6
pandn xmm0, xmm1
movdqa xmm1, xmm5
paddd xmm1, xmm6
pandn xmm5, xmm1
movdqa xmm1, xmmword [esp + 0x40]
psrld xmm5, 0x18
psrld xmm0, 0x18
packuswb xmm5, xmm0
psrld xmm7, 0x18
psrld xmm3, 0x18
packuswb xmm7, xmm3
packuswb xmm7, xmm5
movdqu xmm0, xmmword [ecx + ebx]
pand xmm0, xmm4
pand xmm7, xmmword [0x947100]
por xmm0, xmm7
movdqa xmm5, xmmword [esp + 0xf0]
movdqu xmmword [ecx + ebx], xmm0
add ebx, 0x10
movdqa xmm0, xmmword [0x947110]
paddd xmm1, xmm0
paddd xmm5, xmm0
movdqa xmm3, xmmword [esp + 0x100]
paddd xmm3, xmm0
paddd xmm2, xmm0
cmp edx, ebx
jne 0x850560
cmp edi, edx
mov eax, dword [ebp + 0x14]
je 0x8503b0
lea ecx, [esi - 0x40]
lea edx, [esp + esi]
add edx, 0x50
add esi, dword [esp + 0x10]
sub esi, dword [esp + 0xc]
nop word [eax + eax]
mov ebx, esi
xor ebx, eax
mov eax, dword [esp + 0x2c]
add eax, esi
xor eax, esi
or eax, ebx
mov edi, ebx
not edi
dec ebx
and ebx, edi
xor eax, esi
sar eax, 0x1f
shr ebx, 0x18
and al, byte [edx]
and bl, 0x80
or bl, al
mov eax, dword [ebp + 0x14]
mov byte [edx], bl
inc edx
inc esi
inc ecx
jne 0x850750
jmp 0x8503b0