Function at 0x40fce5
Capabilities:
Create thread

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push 0x41e8ec
mov ebp, ecx
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
xor ebx, ebx
mov dword [ebp + 0x78], 7
mov dword [ebp], ebx
mov esi, 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
push 0x364
mov dword [esp + 0x14], 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
call fcn.00412c8a
pop ecx
push dword [esp + 0x58]
push dword [esp + 0x58]
push dword [ebp + 0x6c]
push ecx
mov ecx, eax
call fcn.00410b81
mov edi, eax
test edi, edi
je 0x40fdd2
mov esi, edi
cmp dword [edi + 0x28], ebx
jne 0x40fdc3
mov ecx, edi
call fcn.00410c13
mov dword [esp + 0x58], eax
test eax, eax
je 0x40fdd2
push eax
mov ecx, edi
call fcn.00410ca7
push dword [esp + 0x58]
mov bl, al
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bl, bl
je 0x40fdd0
xor ebx, ebx
push edi
lea ecx, [ebp + 0xc]
mov esi, ebx
call fcn.0041098d
jmp 0x40fdd2
xor ebx, ebx
cmp dword [ebp + 0xc], 0
jne 0x40fe91
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 0x40fe33
cmp dword [ebp + 0xa8], ebx
je 0x40fe33
lea eax, [esp + 0x18]
push eax
push ebx
push ebp
push 0x4100fa
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 0x418928
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp + 0x64], eax
test eax, eax
je 0x40fe58
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 0x40fe71
push str.UuidCreate
push eax
call edi
mov dword [ebp + 0x74], eax
push dword [esp + 0x30]
lea edi, [ebp + 0x10]
mov ecx, edi
call fcn.00404100
cmp dword [edi + 0x14], 8
jb 0x40fe87
mov edi, dword [edi]
mov ecx, ebp
mov dword [ebp + 0x58], edi
call fcn.0041087f
lea eax, [esp + 0x1c]
xorps xmm0, xmm0
xor edi, edi
movlpd qword [esp + 0x1c], xmm0
push eax
lea ecx, [ebp + 0xc0]
mov dword [esp + 0x28], edi
call fcn.004109ac
cmp dword [esp + 0x10], 1
mov ebx, 0x41e8f0
jne 0x40fec3
push ebx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x41e908]
test eax, eax
jne 0x40fee8
push 0xc
call fcn.00412c8a
pop ecx
mov dword [0x41e908], eax
mov dword [eax], edi
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov ecx, dword [eax + 4]
mov dword [esp + 0x14], ebp
cmp dword [eax + 8], ecx
je 0x40fefc
mov dword [ecx], ebp
add dword [eax + 4], 4
jmp 0x40ff09
lea edx, [esp + 0x14]
push edx
push ecx
mov ecx, eax
call fcn.00410a9d
push 0x4101f6
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x41029f
mov dword [ebp + 0x7c], eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__set_invalid_parameter_handler]
mov dword [ebp + 0x80], eax
mov dword [esp], 0x41041d
call dword [sym.imp.VCRUNTIME140.dll__set_purecall_handler]
pop ecx
push ebx
mov dword [ebp + 0x84], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test esi, esi
je 0x40ff4f
push ecx
mov ecx, esi
call fcn.00410a40
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x2c