Function at 0x10070b70
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x108
cmp byte [ebp + 8], 0
mov edi, ecx
mov al, 1
mov dword [esp + 4], edx
je 0x10070d18
mov eax, dword [edx + 0x10]
movsd xmm0, qword [edx]
movsd xmm1, qword [edx + 8]
lea esi, [edi + 0x18]
mov dword [esp + 0x18], eax
movsd qword [esp + 0x10], xmm1
movsd qword [esp + 8], xmm0
mov eax, dword [edi + 0x18]
cmp eax, 1
je 0x10070be5
test eax, eax
jne 0x10070c88
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x24]
add eax, 0xfffffffd
adc ecx, 0xffffffff
cmp eax, 2
sbb ecx, 0
jb 0x10070c88
lea ecx, [edi + 0x20]
call fcn.10065b00
jmp 0x10070c88
cmp dword [esi + 4], 0
je 0x10070c88
mov ebx, dword [edi + 0x20]
test ebx, ebx
je 0x10070c88
mov eax, dword [0x10551f24]
test eax, eax
jne 0x10070c21
mov ecx, 0x103a03b9
mov edx, 0x17
call fcn.100f2fc0
test eax, eax
mov eax, 0x100f3390
cmovne eax, edx
mov dword [0x10551f24], eax
cmp eax, 0x100f3390
jne 0x10070c42
mov ebx, dword [ebx]
test ebx, ebx
je 0x10070c42
push ebx
call sub.KERNEL32.dll_DeleteCriticalSection
call sub.KERNEL32.dll_GetProcessHeap
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov ebx, dword [edi + 0x20]
call sub.KERNEL32.dll_GetProcessHeap
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov eax, dword [edi + 0x2c]
push dword [edi + 0x28]
call dword [eax]
add esp, 4
mov eax, dword [edi + 0x2c]
cmp dword [eax + 4], 0
je 0x10070c88
mov ebx, dword [edi + 0x28]
cmp dword [eax + 8], 9
jae 0x10070c78
call sub.KERNEL32.dll_GetProcessHeap
push ebx
jmp 0x10070c80
call sub.KERNEL32.dll_GetProcessHeap
push dword [ebx - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov dword [edi + 0x18], 1
lea ecx, [esp + 0x20]
mov eax, dword [esp + 0x18]
mov dword [esi + 0x14], eax
lea eax, [edi + 0x30]
movsd xmm0, qword [esp + 8]
movsd xmm1, qword [esp + 0x10]
movsd qword [esi + 0xc], xmm1
movsd qword [esi + 4], xmm0
push 0xe0
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [edi]
nop word cs:[eax + eax]
nop
mov ecx, eax
xor ecx, 3
lock cmpxchg dword [edi], ecx
jne 0x10070cd0
test al, 1
je 0x10070eb9
test al, 2
jne 0x10070eca
test al, 8
jne 0x10070cf8
mov ecx, esi
call fcn.10070a60
jmp 0x10070d16
test al, 0x10
je 0x10070d16
mov eax, dword [edi + 0x11c]
test eax, eax
je 0x10070edb
push dword [edi + 0x118]
call dword [eax + 8]
add esp, 4
xor eax, eax
cmp dword [edi + 0x110], 0
mov dword [esp], eax
je 0x10070d38
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], edi
call fcn.10107e70
test eax, eax
setne dl
jmp 0x10070d3a
xor edx, edx
mov eax, dword [edi]
lea ecx, [edi + 0x110]
jmp 0x10070d56
lock cmpxchg dword [edi], ebx
je 0x10070d95
cmp byte [ebp + 8], 0
je 0x10070d70
test al, 2
mov esi, eax
jne 0x10070d75
jmp 0x10070ea0
mov esi, eax
or esi, 2
cmp esi, 0x3f
jbe 0x10070e8f
lea ebx, [esi - 0x40]
test dl, dl
je 0x10070d50
cmp ebx, 0x3f
jbe 0x10070e8f
add esi, 0xffffff80
mov ebx, esi
jmp 0x10070d50
cmp ebx, 0x3f
ja 0x10070ddc
mov eax, dword [edi + 0x110]
lea ebx, [edi + 0x18]
test eax, eax
je 0x10070db1
lock dec dword [eax]
jne 0x10070db1
call fcn.10069f30
mov ecx, ebx
call fcn.10070f00
mov eax, dword [edi + 0x11c]
test eax, eax
je 0x10070dce
push dword [edi + 0x118]
call dword [eax + 0xc]
add esp, 4
call sub.KERNEL32.dll_GetProcessHeap
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
cmp byte [esp], 0
mov edi, dword [esp + 4]
je 0x10070e87
cmp dword [edi], 0
je 0x10070e87
mov esi, dword [edi + 4]
test esi, esi
je 0x10070e87
mov eax, dword [0x10551f24]
test eax, eax
jne 0x10070e25
mov ecx, 0x103a03b9
mov edx, 0x17
call fcn.100f2fc0
test eax, eax
mov eax, 0x100f3390
cmovne eax, edx
mov dword [0x10551f24], eax
cmp eax, 0x100f3390
jne 0x10070e46
mov esi, dword [esi]
test esi, esi
je 0x10070e46
push esi
call sub.KERNEL32.dll_DeleteCriticalSection
call sub.KERNEL32.dll_GetProcessHeap
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov esi, dword [edi + 4]
call sub.KERNEL32.dll_GetProcessHeap
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov esi, dword [edi + 0xc]
mov edi, dword [edi + 0x10]
push esi
call dword [edi]
add esp, 4
cmp dword [edi + 4], 0
je 0x10070e87
cmp dword [edi + 8], 9
jae 0x10070e77
call sub.KERNEL32.dll_GetProcessHeap
push esi
jmp 0x10070e7f
call sub.KERNEL32.dll_GetProcessHeap
push dword [esi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, str.assertion_failed:_self.ref_count_____0
mov edx, 0x26
push 0x103a29e0
jmp 0x10070eaf
mov ecx, str.assertion_failed:_snapshot.is_complete__
mov edx, 0x28
push 0x103a29a8
call fcn.100ffc80
add esp, 4
ud2
mov ecx, str.assertion_failed:_prev.is_running__
mov edx, 0x23
push 0x103a2918
jmp 0x10070eaf
mov ecx, str.assertion_failed:__prev.is_complete__
mov edx, 0x25
push 0x103a2950
jmp 0x10070eaf
mov ecx, str.waker_missing
mov edx, 0xd
push 0x103a2970
call fcn.1004d820
add esp, 4
ud2