Function at 0x51960d
Capabilities:
Create thread

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x4c]
mov ebx, ecx
push 0x60db50
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x3c]
mov dword [ebx + 8], ecx
xor ecx, ecx
mov dword [ebx], edx
mov esi, ecx
mov edx, dword [esp + 0x34]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x40]
mov dword [ebx + 4], edx
mov dword [ebx + 0x58], ecx
mov dword [ebx + 0x5c], ecx
mov dword [ebx + 0x60], ecx
mov dword [ebx + 0x64], ecx
mov dword [ebx + 0x68], ecx
mov dword [ebx + 0x6c], eax
mov dword [ebx + 0x70], ecx
mov dword [ebx + 0x74], ecx
mov dword [ebx + 0x78], ebp
mov dword [ebx + 0x7c], ecx
mov dword [ebx + 0x80], ecx
mov dword [ebx + 0x84], ecx
mov dword [ebx + 0x88], ecx
mov byte [ebx + 0x8c], cl
mov dword [ebx + 0xa8], ecx
mov dword [ebx + 0xac], ecx
mov dword [ebx + 0xb0], ecx
mov dword [ebx + 0xb4], ecx
mov dword [ebx + 0xb8], ecx
mov word [ebx + 0xbc], cx
mov byte [ebx + 0xbe], cl
mov dword [esp + 0x4c], esi
test edi, edi
jne 0x5196db
cmp dword [esp + 0x44], ecx
je 0x519703
push 0x364
call fcn.0053c458
pop ecx
push dword [esp + 0x54]
mov ecx, eax
push dword [esp + 0x54]
push dword [ebx + 0x6c]
push dword [esp + 0x50]
call fcn.0051b0f2
mov edi, eax
push edi
lea ecx, [esp + 0x50]
call fcn.0051a6d7
mov esi, dword [esp + 0x4c]
test esi, esi
je 0x519703
mov ecx, esi
call fcn.0051b226
test al, al
je 0x519703
push esi
lea ecx, [ebx + 0xc]
xor esi, esi
call fcn.0051a6d7
cmp dword [ebx + 0xc], 0
jne 0x5197b6
lea eax, [ebx + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
push 0
push 1
push 0
push 0
call edi
mov dword [ebx + 0xa8], eax
xor eax, eax
push eax
push 1
push eax
push eax
call edi
mov dword [ebx + 0xac], eax
test eax, eax
je 0x51976b
xor ecx, ecx
cmp dword [ebx + 0xa8], ecx
je 0x51976b
lea eax, [esp + 0x34]
push eax
push ecx
push ebx
push 0x519a35
push 0x10000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x88], eax
push 0x5dd0d4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebx + 0x64], eax
test eax, eax
je 0x51978e
push str.MiniDumpWriteDump
push eax
call edi
mov dword [ebx + 0x68], eax
push str.rpcrt4.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebx + 0x70], eax
test eax, eax
je 0x5197ab
push str.UuidCreate
push eax
call edi
mov dword [ebx + 0x74], eax
push dword [esp + 0x2c]
mov ecx, ebx
call fcn.00519453
lea eax, [esp + 0x18]
xorps xmm0, xmm0
lea ecx, [ebx + 0xc0]
movlpd qword [esp + 0x18], xmm0
push eax
push dword [ecx]
xor edi, edi
mov dword [esp + 0x28], edi
call fcn.0051ab68
cmp dword [esp + 0x14], 1
jne 0x5197e9
push 0x60db38
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
test ebp, ebp
je 0x51987d
push 0x60db38
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x60db58]
test eax, eax
jne 0x51981a
push 0xc
call fcn.0053c458
pop ecx
mov dword [0x60db58], eax
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 8], edi
lea ecx, [esp + 0x30]
mov dword [esp + 0x30], ebx
push ecx
mov ecx, eax
call fcn.0051a632
mov eax, dword [esp + 0x3c]
test al, 1
je 0x519844
push 0x519b24
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
mov dword [ebx + 0x7c], eax
mov eax, dword [esp + 0x3c]
test al, 2
je 0x51985d
push 0x519bcd
call fcn.00549c3d
mov dword [ebx + 0x80], eax
mov eax, dword [esp + 0x40]
pop ecx
test al, 4
je 0x519872
push 0x519d49
call fcn.0053ef5a
pop ecx
mov dword [ebx + 0x84], eax
push 0x60db38
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x519889
push ecx
mov ecx, esi
call fcn.0051a79e
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x2c