Function at 0x10001dd3
Capabilities:
Create thread

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
push 0x1009d4e8
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 0x10001f11
push 0x350
call fcn.10017f27
pop ecx
push ebx
push edi
push dword [esp + 0x54]
mov ecx, eax
push dword [ebp + 0x2016c]
push dword [esp + 0x50]
call fcn.1000639a
push eax
lea ecx, [esp + 0x30]
call fcn.10002ee9
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x10001f0f
cmp dword [esi + 0x28], 0
jne 0x10001f01
mov ecx, esi
call fcn.10006441
mov edi, eax
test edi, edi
je 0x10001f0f
push edi
mov ecx, esi
call fcn.100064d9
push edi
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x10001f0f
push esi
lea ecx, [ebp + 0x2010c]
xor esi, esi
call fcn.10002ee9
xor ecx, ecx
cmp dword [ebp + 0x2010c], ecx
jne 0x10001feb
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 0x10001f76
cmp dword [ebp + 0x201a8], ebx
je 0x10001f76
lea eax, [esp + 0x40]
push eax
push ebx
push ebp
push 0x10002278
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 0x10001fa1
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 0x10001fc0
push str.UuidCreate
push eax
call edi
mov dword [ebp + 0x20174], eax
lea edi, [ebp + 0x20110]
cmp edi, dword [esp + 0x28]
je 0x10001fdb
push 0xffffffffffffffff
push 0
push dword [esp + 0x30]
mov ecx, edi
call fcn.10001a1c
cmp dword [edi + 0x14], 8
jb 0x10001fe3
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.10002f35
cmp dword [esp + 0x10], 1
mov edi, 0x1009d4d0
jne 0x1000201a
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x100020a0
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x1009d4f0], 0
jne 0x10002049
push 0xc
call fcn.10017f27
pop ecx
xor ecx, ecx
mov dword [0x1009d4f0], 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.10002e68
test bl, 1
je 0x1000206d
push 0x10002376
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [ebp + 0x2017c], eax
test bl, 2
je 0x10002083
push 0x1000241c
call fcn.1001c28b
pop ecx
mov dword [ebp + 0x20180], eax
test bl, 4
je 0x10002099
push 0x100025a2
call fcn.10019379
pop ecx
mov dword [ebp + 0x20184], eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x100020b8
mov ecx, esi
call fcn.10006408
push 0x350
push esi
call fcn.10017f57
pop ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x28