Function at 0x51a300
Capabilities:
Create thread

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
xor eax, eax
mov ebp, ecx
push edi
inc eax
lock xadd dword [0x7343f0], eax
inc eax
xor ebx, ebx
mov dword [ebp + 0x78], 7
mov esi, ebx
mov dword [ebp], ebx
mov dword [ebp + 4], ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0x58], ebx
mov dword [ebp + 0x5c], ebx
mov dword [ebp + 0x60], ebx
mov dword [ebp + 0x64], ebx
mov dword [ebp + 0x68], ebx
mov dword [ebp + 0x6c], ebx
mov dword [ebp + 0x70], ebx
mov dword [ebp + 0x74], ebx
mov dword [ebp + 0x7c], ebx
mov dword [ebp + 0x80], ebx
mov dword [ebp + 0x84], ebx
mov dword [ebp + 0x88], ebx
mov dword [esp + 0x10], eax
mov byte [ebp + 0x8c], bl
mov dword [ebp + 0xa8], ebx
mov dword [ebp + 0xac], ebx
mov dword [ebp + 0xb0], ebx
mov dword [ebp + 0xb4], ebx
mov dword [ebp + 0xb8], ebx
mov word [ebp + 0xbc], bx
mov byte [ebp + 0xbe], bl
cmp dword [esp + 0x48], ebx
je 0x51a3f7
push 0x364
call fcn.00634eb5
pop ecx
push dword [esp + 0x58]
mov ecx, eax
push dword [esp + 0x58]
push dword [ebp + 0x6c]
push dword [esp + 0x54]
call fcn.0051b248
mov edi, eax
test edi, edi
je 0x51a3f7
mov esi, edi
cmp dword [edi + 0x28], ebx
jne 0x51a3e8
mov ecx, edi
call fcn.0051b2d9
mov dword [esp + 0x48], eax
test eax, eax
je 0x51a3f7
push eax
mov ecx, edi
call fcn.0051b36c
push dword [esp + 0x48]
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x51a3f5
xor ebx, ebx
push edi
lea ecx, [ebp + 0xc]
mov esi, ebx
call fcn.0051afa8
jmp 0x51a3f7
xor ebx, ebx
cmp dword [ebp + 0xc], 0
jne 0x51a4b4
lea eax, [ebp + 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov edi, dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
push ebx
push 1
push ebx
push ebx
call edi
push ebx
push 1
push ebx
push ebx
mov dword [ebp + 0xa8], eax
call edi
mov dword [ebp + 0xac], eax
test eax, eax
je 0x51a458
cmp dword [ebp + 0xa8], ebx
je 0x51a458
lea eax, [esp + 0x18]
push eax
push ebx
push ebp
push 0x51a72d
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp + 0x88], eax
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0x6de158
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp + 0x64], eax
test eax, eax
je 0x51a47d
push str.MiniDumpWriteDump
push eax
call edi
mov dword [ebp + 0x68], eax
push str.rpcrt4.dll
call ebx
mov dword [ebp + 0x70], eax
test eax, eax
je 0x51a496
push str.UuidCreate
push eax
call edi
mov dword [ebp + 0x74], eax
push dword [esp + 0x30]
lea ecx, [ebp + 0x10]
call fcn.00414300
lea ecx, [ebp + 0x10]
call fcn.00405860
mov ecx, ebp
mov dword [ebp + 0x58], eax
call fcn.0051ae9e
lea eax, [esp + 0x1c]
xorps xmm0, xmm0
xor ebx, ebx
movlpd qword [esp + 0x1c], xmm0
push eax
lea ecx, [ebp + 0xc0]
mov dword [esp + 0x28], ebx
call fcn.0051afc7
cmp dword [esp + 0x10], 1
mov edi, 0x7343d8
jne 0x51a4e6
push edi
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [0x7343f8]
test edi, edi
jne 0x51a50f
push 0xc
call fcn.00634eb5
mov edi, eax
pop ecx
mov dword [0x7343f8], edi
mov dword [edi], ebx
mov dword [edi + 4], ebx
mov dword [edi + 8], ebx
mov eax, dword [edi + 4]
mov dword [esp + 0x14], ebp
cmp dword [edi + 8], eax
je 0x51a52d
push eax
push 4
call fcn.004024a0
pop ecx
pop ecx
mov dword [eax], ebp
add dword [edi + 4], 4
jmp 0x51a53a
lea ecx, [esp + 0x14]
push ecx
push eax
mov ecx, edi
call fcn.0051b0ff
push 0x51a825
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x51a8ce
mov dword [ebp + 0x7c], eax
call fcn.00655fb4
mov dword [ebp + 0x80], eax
mov dword [esp], 0x51aa4a
call fcn.0064c181
mov dword [ebp + 0x84], eax
mov dword [esp], 0x7343d8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x51a583
push ecx
mov ecx, esi
call fcn.0051b06d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x2c