Function at 0x1003bf30
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov bl, byte [esp + 0x30]
mov esi, edx
mov edi, ecx
mov dl, 1
test bl, bl
je 0x1003c068
movsd xmm0, qword [esi + 0x10]
movsd xmm2, qword [esi]
movsd xmm1, qword [esi + 8]
movsd qword [esp + 0x14], xmm0
movsd qword [esp + 0xc], xmm1
movsd qword [esp + 4], xmm2
mov eax, dword [edi + 0x18]
cmp eax, 1
je 0x1003bf92
test eax, eax
jne 0x1003bf9a
mov ebp, dword [edi + 0x1c]
test ebp, ebp
je 0x1003bf9a
cmp dword [edi + 0x20], 0
je 0x1003bf9a
call sub.KERNEL32.dll_GetProcessHeap
push ebp
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x1003bf9a
lea ecx, [edi + 0x1c]
call fcn.1003be10
mov dword [edi + 0x18], 1
lea ebp, [edi + 0x1c]
movsd xmm0, qword [esp + 4]
movsd xmm1, qword [esp + 0xc]
movsd qword [edi + 0x1c], xmm0
movsd qword [edi + 0x24], xmm1
movsd xmm0, qword [esp + 0x14]
movsd qword [edi + 0x2c], xmm0
mov eax, dword [edi]
nop word [eax + eax]
mov ecx, eax
xor ecx, 3
lock cmpxchg dword [edi], ecx
jne 0x1003bfd0
test al, 1
je 0x1003c12f
test al, 2
jne 0x1003c140
test al, 8
jne 0x1003c01d
mov eax, dword [edi + 0x18]
cmp eax, 1
je 0x1003c037
test eax, eax
jne 0x1003c03e
mov eax, dword [ebp]
test eax, eax
je 0x1003c03e
cmp dword [edi + 0x20], 0
je 0x1003c03e
mov dword [esp], eax
call sub.KERNEL32.dll_GetProcessHeap
push dword [esp]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x1003c03e
test al, 0x10
je 0x1003c066
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x1003c151
push dword [edi + 0x38]
call dword [eax + 8]
add esp, 4
jmp 0x1003c066
mov ecx, ebp
call fcn.1003be10
mov dword [edi + 0x18], 2
movsd xmm0, qword [esp + 0x14]
movsd qword [ebp + 0x10], xmm0
movsd xmm0, qword [esp + 4]
movsd xmm1, qword [esp + 0xc]
movsd qword [ebp + 8], xmm1
movsd qword [ebp], xmm0
xor edx, edx
mov eax, dword [edi]
nop word [eax + eax]
test bl, bl
je 0x1003c080
test al, 2
mov ecx, eax
jne 0x1003c085
jmp 0x1003c116
mov ecx, eax
or ecx, 2
cmp ecx, 0x3f
jbe 0x1003c105
add ecx, 0xffffffc0
lock cmpxchg dword [edi], ecx
jne 0x1003c070
cmp ecx, 0x3f
ja 0x1003c0eb
mov eax, dword [edi + 0x18]
mov ebp, edx
cmp eax, 1
je 0x1003c0c3
test eax, eax
jne 0x1003c0cb
mov ebx, dword [edi + 0x1c]
test ebx, ebx
je 0x1003c0cb
cmp dword [edi + 0x20], 0
je 0x1003c0cb
call sub.KERNEL32.dll_GetProcessHeap
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x1003c0cb
lea ecx, [edi + 0x1c]
call fcn.1003be10
mov eax, dword [edi + 0x3c]
test eax, eax
je 0x1003c0db
push dword [edi + 0x38]
call dword [eax + 0xc]
add esp, 4
call sub.KERNEL32.dll_GetProcessHeap
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov edx, ebp
test dl, dl
je 0x1003c0fd
mov ecx, esi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
jmp fcn.1003be10
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, str.assertion_failed:_self.ref_count_____0
mov edx, 0x26
push 0x10423c50
jmp 0x1003c125
mov ecx, str.assertion_failed:_snapshot.is_complete____B
mov edx, 0x28
push 0x10423c18
call fcn.100ff9a0
add esp, 4
ud2
mov ecx, str.assertion_failed:_prev.is_running__
mov edx, 0x23
push 0x10423b88
jmp 0x1003c125
mov ecx, str.assertion_failed:__prev.is_complete__
mov edx, 0x25
push 0x10423bc0
jmp 0x1003c125
mov ecx, str.waker_missing
mov edx, 0xd
push 0x10423be0
call fcn.10036e90
add esp, 4
ud2