Function at 0x1000bae2
Capabilities:
Create thread

Disassembly:
push 0xc
mov eax, 0x100354d0
call fcn.10034947
mov ebx, ecx
lea eax, [ebx + 0x158]
push 0x8001fa0
push eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_InitializeCriticalSectionAndSpinCount]
mov ecx, 0x8007000e
xor edi, edi
mov dword [ebp - 0x10], ecx
test eax, eax
jne 0x1000bb1a
mov esi, ecx
mov dword [ebp - 0x14], edi
jmp 0x1000bc1a
mov eax, dword [ebx + 0x10]
mov edx, eax
mov dword [ebp - 0x14], 1
test eax, eax
jne 0x1000bb63
push 0x118
call fcn.10033443
pop ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], edi
test eax, eax
je 0x1000bb48
mov ecx, eax
call fcn.10007779
jmp 0x1000bb4a
mov eax, edi
or dword [ebp - 4], 0xffffffff
mov edx, eax
mov dword [ebx + 0x10], eax
mov ecx, 0x8007000e
test eax, eax
jne 0x1000bb63
mov esi, ecx
jmp 0x1000bc1a
mov ecx, edx
mov dword [edx + 0x114], edi
call fcn.1001a61a
mov esi, eax
test esi, esi
js 0x1000bc1a
cmp dword [ebx + 0xc], 0
jne 0x1000bbbb
push 0x20
call fcn.10033443
mov dword [ebp - 0x18], eax
pop ecx
test eax, eax
je 0x1000bba9
mov dword [eax], 0x10001990
mov dword [eax + 4], edi
mov dword [eax + 0x10], edi
mov dword [eax + 0xc], edi
mov dword [eax + 8], edi
mov dword [eax + 0x14], edi
mov dword [eax + 0x1c], edi
jmp 0x1000bbab
mov eax, edi
mov ecx, ebx
mov dword [ebx + 0xc], eax
call fcn.1000ba5d
mov esi, eax
test esi, esi
js 0x1000bc1a
push edi
push edi
push 1
push edi
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov dword [ebx + 0x170], eax
test eax, eax
je 0x1000bbf6
push edi
push edi
push edi
push edi
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_CreateEventW]
mov dword [ebx + 0x174], eax
test eax, eax
je 0x1000bbf6
push 0x10
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemAlloc]
mov dword [ebx + 0x178], eax
test eax, eax
jne 0x1000bbfd
mov esi, 0x8007000e
jmp 0x1000bc1a
mov dword [eax], edi
mov eax, dword [ebx + 0x178]
mov dword [eax + 4], edi
mov eax, dword [ebx + 0x178]
mov dword [eax + 8], edi
mov eax, dword [ebx + 0x178]
mov dword [eax + 0xc], edi
lea eax, [ebx + 0x17c]
push eax
push edi
push ebx
push 0x1000c670
push edi
push edi
call dword [sym.imp.msvcrt.dll__beginthreadex]
add esp, 0x18
mov dword [ebx + 0x154], eax
test eax, eax
je 0x1000bc4a
mov eax, esi
mov dword [ebp - 0x10], eax
test esi, esi
jns 0x1000bcdd
cmp dword [ebp - 0x14], 0
je 0x1000bc5d
lea eax, [ebx + 0x158]
push eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_DeleteCriticalSection]
mov eax, dword [ebx + 0x170]
test eax, eax
je 0x1000bc74
push eax
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov dword [ebx + 0x170], edi
mov eax, dword [ebx + 0x174]
test eax, eax
je 0x1000bc8b
push eax
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov dword [ebx + 0x174], edi
mov eax, dword [ebx + 0x178]
test eax, eax
je 0x1000bca2
push eax
call dword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov dword [ebx + 0x178], edi
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x1000bcc2
mov eax, dword [eax]
push 1
mov esi, dword [eax]
mov ecx, esi
call dword [0x1003c29c]
mov ecx, dword [ebp - 0x18]
call esi
mov dword [ebx + 0xc], edi
mov esi, dword [ebx + 0x10]
test esi, esi
je 0x1000bcda
mov ecx, esi
call fcn.100077d9
push esi
call fcn.10033472
pop ecx
mov dword [ebx + 0x10], edi
mov eax, dword [ebp - 0x10]
call fcn.10034918
ret