Function at 0x10037860
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x24]
push esi
mov esi, dword [esp + 0x2c]
push edi
mov eax, dword [ebp + 4]
mov esi, dword [esi + 4]
add esi, 0x20
lea edi, [eax + 0x20]
sar esi, 5
sar edi, 5
lea ecx, [eax + 1]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], esi
and ecx, 0x8000001f
jns 0x10037899
dec ecx
or ecx, 0xffffffe0
inc ecx
mov ebx, 0xffffffff
jne 0x100378a4
or edx, ebx
jmp 0x100378aa
mov edx, ebx
shl edx, cl
not edx
mov eax, dword [ebp + 0xc]
and dword [eax + edi*4 - 4], edx
mov edx, dword [esp + 0x30]
mov ecx, dword [edx + 4]
inc ecx
and ecx, 0x8000001f
jns 0x100378c6
dec ecx
or ecx, 0xffffffe0
inc ecx
jne 0x100378cd
or ebx, 0xffffffff
jmp 0x100378d1
shl ebx, cl
not ebx
mov eax, dword [edx + 0xc]
and dword [eax + esi*4 - 4], ebx
mov eax, dword [esp + 0x2c]
mov ecx, dword [ebp + 0xc]
mov ebp, dword [edx + 0xc]
mov edx, dword [edx + 4]
mov eax, dword [eax + 4]
cmp eax, edx
mov ebx, dword [esp + 0x34]
cmovg edx, eax
mov dword [esp + 0x30], ecx
mov dword [esp + 0x1c], edx
mov eax, dword [ebx]
cmp edx, eax
jl 0x10037974
mov ecx, dword [ebx + 0xc]
test ecx, ecx
je 0x1003792a
add eax, 0x1f
sar eax, 5
shl eax, 2
push eax
push 0
push ecx
call fcn.100506f0
push dword [ebx + 0xc]
push dword [ebx + 0x14]
call fcn.10050630
mov edx, dword [esp + 0x30]
add esp, 0x14
lea eax, [edx + 0x20]
sar eax, 5
mov dword [esp + 0x10], eax
shl eax, 2
push eax
push dword [ebx + 0x14]
mov dword [esp + 0x34], eax
call fcn.10050640
add esp, 8
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x1003795b
pop edi
pop esi
pop ebp
mov eax, 0x3e9
pop ebx
add esp, 0x18
ret
mov ecx, dword [esp + 0x2c]
mov dword [ecx + eax - 4], 0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x30]
shl eax, 5
mov dword [ebx], eax
mov eax, dword [ebx + 0xc]
cmp edi, esi
mov edx, esi
mov dword [esp + 0x2c], eax
cmovl edx, edi
xor ebx, ebx
test edx, edx
jle 0x10037a64
cmp edx, 4
jb 0x10037a28
lea eax, [eax + edx*4]
add eax, 0xfffffffc
mov dword [esp + 0x10], eax
lea eax, [edx - 1]
lea eax, [ecx + eax*4]
cmp dword [esp + 0x2c], eax
ja 0x100379b1
cmp dword [esp + 0x10], ecx
jae 0x10037a28
lea eax, [ebp - 4]
lea eax, [eax + edx*4]
cmp dword [esp + 0x2c], eax
ja 0x100379c3
cmp dword [esp + 0x10], ebp
jae 0x10037a28
mov eax, edx
and eax, 0x80000003
jns 0x100379d1
dec eax
or eax, 0xfffffffc
inc eax
mov esi, dword [esp + 0x2c]
sub esi, ebp
mov dword [esp + 0x10], edx
sub dword [esp + 0x10], eax
mov eax, ebp
mov dword [esp + 0x20], esi
mov esi, ecx
mov edi, dword [esp + 0x20]
sub esi, ebp
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
lea esp, [esp]
movdqu xmm1, xmmword [ecx + eax]
add ebx, 4
lea eax, [eax + 0x10]
movdqu xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [edi + eax - 0x10], xmm1
cmp ebx, dword [esp + 0x10]
jl 0x10037a00
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0x30]
cmp ebx, edx
jge 0x10037a64
mov edi, dword [esp + 0x2c]
lea ecx, [ecx + ebx*4]
sub edi, dword [esp + 0x30]
mov esi, ebp
sub esi, dword [esp + 0x30]
sub edx, ebx
mov dword [esp + 0x24], edi
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x24]
jmp 0x10037a50
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
xor eax, dword [ecx - 4]
mov dword [ebx + ecx - 4], eax
dec edx
jne 0x10037a50
mov esi, dword [esp + 0x18]
cmp edi, esi
jle 0x10037a92
cmp esi, edi
jge 0x10037aac
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
sub eax, edx
sub edi, esi
mov dword [esp + 0x30], eax
lea ecx, [edx + esi*4]
nop
mov eax, dword [eax + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
mov eax, dword [esp + 0x30]
dec edi
jne 0x10037a80
jmp 0x10037aac
jge 0x10037aac
mov eax, dword [esp + 0x2c]
sub ebp, eax
sub esi, edi
lea ecx, [eax + edi*4]
nop
mov eax, dword [ecx + ebp]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
dec esi
jne 0x10037aa0
mov ecx, dword [esp + 0x34]
push ecx
push dword [esp + 0x20]
mov dword [ecx + 8], 0
call fcn.10038300
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret