Function at 0x10001e63
Capabilities:
Create thread

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push 0x1009d528
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov edx, dword [esp + 0x2c]
lea edi, [ebp + 0xc]
xor ecx, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
lea ebx, [ebp + 0x2000c]
mov dword [ebp + 0x2016c], eax
mov esi, ecx
mov eax, dword [esp + 0x38]
mov dword [ebp], edx
mov edx, dword [esp + 0x30]
mov dword [ebp + 0x20178], eax
xor eax, eax
mov dword [ebp + 4], edx
mov edx, dword [esp + 0x34]
mov dword [ebp + 0x20158], ecx
mov dword [ebp + 0x20164], ecx
mov dword [ebp + 0x20168], ecx
mov dword [ebp + 0x20170], ecx
mov dword [ebp + 0x20174], ecx
mov dword [ebp + 0x2017c], ecx
mov dword [ebp + 0x20180], ecx
mov dword [ebp + 0x20184], ecx
mov dword [ebp + 0x20188], ecx
mov dword [ebp + 0x201a8], ecx
mov dword [ebp + 0x201ac], ecx
mov dword [ebp + 8], edx
mov dword [ebp + 0x2015c], ecx
mov dword [ebp + 0x20160], ecx
mov byte [ebp + 0x2018c], cl
mov dword [ebp + 0x201b0], ecx
mov dword [ebp + 0x201b4], ecx
mov dword [ebp + 0x201b8], ecx
mov word [ebp + 0x201bc], cx
mov byte [ebp + 0x201be], cl
mov byte [edi], cl
mov word [ebx], ax
mov dword [esp + 0x2c], esi
cmp dword [esp + 0x40], eax
je 0x10001fa1
push 0x350
call fcn.10018007
pop ecx
push ebx
push edi
push dword [esp + 0x54]
mov ecx, eax
push dword [ebp + 0x2016c]
push dword [esp + 0x50]
call fcn.1000642a
push eax
lea ecx, [esp + 0x30]
call fcn.10002f79
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x10001f9f
cmp dword [esi + 0x28], 0
jne 0x10001f91
mov ecx, esi
call fcn.100064d1
mov edi, eax
test edi, edi
je 0x10001f9f
push edi
mov ecx, esi
call fcn.10006569
push edi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x10001f9f
push esi
lea ecx, [ebp + 0x2010c]
xor esi, esi
call fcn.10002f79
xor ecx, ecx
cmp dword [ebp + 0x2010c], ecx
jne 0x1000207b
lea eax, [ebp + 0x20190]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
xor ebx, ebx
push ebx
push 1
push ebx
push ebx
call edi
push ebx
push 1
push ebx
push ebx
mov dword [ebp + 0x201a8], eax
call edi
mov dword [ebp + 0x201ac], eax
test eax, eax
je 0x10002006
cmp dword [ebp + 0x201a8], ebx
je 0x10002006
lea eax, [esp + 0x40]
push eax
push ebx
push ebp
push 0x10002308
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 0x20188], eax
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.dbghelp.dll
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp + 0x20164], eax
test eax, eax
je 0x10002031
push str.MiniDumpWriteDump
push eax
call edi
mov dword [ebp + 0x20168], eax
push str.rpcrt4.dll
call ebx
mov dword [ebp + 0x20170], eax
test eax, eax
je 0x10002050
push str.UuidCreate
push eax
call edi
mov dword [ebp + 0x20174], eax
lea edi, [ebp + 0x20110]
cmp edi, dword [esp + 0x28]
je 0x1000206b
push 0xffffffffffffffff
push 0
push dword [esp + 0x30]
mov ecx, edi
call fcn.10001aac
cmp dword [edi + 0x14], 8
jb 0x10002073
mov edi, dword [edi]
mov dword [ebp + 0x20158], edi
xor ecx, ecx
lea eax, [esp + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], ecx
lea ecx, [ebp + 0x201c0]
push eax
call fcn.10002fc5
cmp dword [esp + 0x10], 1
mov edi, 0x1009d510
jne 0x100020aa
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x10002130
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1009d530], 0
jne 0x100020d9
push 0xc
call fcn.10018007
pop ecx
xor ecx, ecx
mov dword [0x1009d530], eax
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
lea eax, [esp + 0x40]
mov dword [esp + 0x40], ebp
push eax
call fcn.10002ef8
test bl, 1
je 0x100020fd
push 0x10002406
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [ebp + 0x2017c], eax
test bl, 2
je 0x10002113
push 0x100024ac
call fcn.1001c37b
pop ecx
mov dword [ebp + 0x20180], eax
test bl, 4
je 0x10002129
push 0x10002632
call fcn.10019459
pop ecx
mov dword [ebp + 0x20184], eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x10002148
mov ecx, esi
call fcn.10006498
push 0x350
push esi
call fcn.10018037
pop ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x28