Function at 0x10030310
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100f39a7
mov eax, dword fs:[0]
push eax
sub esp, 0x120
mov eax, dword [0x1013b7e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov eax, dword [ebp + 0xc]
xor esi, esi
mov edi, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
mov al, byte [ebx + 0x84]
test al, al
jne 0x10030648
mov esi, dword [ebx + 0x8c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x10030388
mov ecx, dword [ebx + 0x4c]
test ecx, ecx
je 0x10030388
mov edx, dword [ebp - 0xcc]
mov eax, dword [ecx]
push edx
push edi
push ecx
call dword [eax + 0x18]
mov esi, eax
jmp 0x10030648
mov ecx, edi
mov dword [ebp - 0x30], 0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100303a1
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0x40]
call fcn.1000c350
mov edx, dword [ebp - 0xcc]
xor eax, eax
mov ecx, edx
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100303e0
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.1000c350
lea eax, [ebp - 0x78]
mov byte [ebp - 4], 1
mov dword [ebp - 0xcc], eax
lea ecx, [ebp - 0x78]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x80], 0x10035e60
push eax
mov dword [ebp - 0x7c], 0
call fcn.1000e7b0
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x60]
call fcn.1000e7b0
mov dword [ebp - 0x48], ebx
add ebx, 0x50
mov dword [ebp - 0xd0], ebx
je 0x10030445
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0xc8]
call fcn.1002f600
push 0x38
mov byte [ebp - 4], 5
call fcn.10089997
mov edi, eax
add esp, 4
mov dword [ebp - 0xcc], edi
test edi, edi
je 0x100304c7
lea eax, [ebp - 0xc8]
mov dword [edi + 4], 1
lea esi, [edi + 0x10]
mov dword [edi + 8], 1
push eax
lea ecx, [ebp - 0x12c]
mov dword [edi], vtable.std::_Ref_count_obj_class_std::function_void____cdecl___void___.0
mov dword [ebp - 0xd4], esi
call fcn.1002f600
mov dword [esi + 0x24], 0
lea eax, [ebp - 0x12c]
mov byte [ebp - 4], 8
push eax
call fcn.1002f5d0
add esp, 4
mov dword [esi + 0x24], eax
lea ecx, [ebp - 0x124]
call fcn.10015070
jmp 0x100304c9
xor edi, edi
lea esi, [edi + 0x10]
mov dword [ebp - 0xd8], edi
mov dword [ebp - 0xdc], esi
lea ecx, [ebp - 0xc0]
call fcn.10015070
test edi, edi
je 0x100304ed
lea ecx, [edi + 4]
lock inc dword [ecx]
mov dword [ebp - 0xe4], esi
mov dword [ebp - 0xe0], edi
mov eax, dword [ebx + 0x30]
mov ecx, dword [ebx + 0x28]
inc eax
mov byte [ebp - 4], 0xb
cmp ecx, eax
ja 0x10030515
push 1
lea ecx, [ebx + 0x20]
call fcn.10021a70
mov ecx, dword [ebx + 0x28]
lea eax, [ecx - 1]
and dword [ebx + 0x2c], eax
mov ecx, dword [ebx + 0x30]
add ecx, dword [ebx + 0x2c]
mov eax, dword [ebx + 0x28]
dec eax
and ecx, eax
lea eax, [ecx*4]
mov ecx, dword [ebx + 0x24]
mov dword [ebp - 0xcc], eax
cmp dword [ecx + eax], 0
jne 0x10030558
push 0x28
call fcn.10089997
mov ecx, dword [ebx + 0x24]
add esp, 4
mov edx, dword [ebp - 0xcc]
mov dword [edx + ecx], eax
mov eax, edx
mov ecx, dword [ebx + 0x24]
mov eax, dword [ecx + eax]
lea ecx, [edi + 0x10]
mov dword [eax], vtable.std::_Func_impl_no_alloc_class__lambda_ca10e4af856c57fb96283647937d6ac9___void___.0
mov dword [eax + 4], ecx
mov dword [eax + 8], edi
mov dword [eax + 0x24], eax
inc dword [ebx + 0x30]
cmp dword [ebx + 0x18], 0
jne 0x100305a1
lea eax, [ebx + 0x1c]
push eax
push 0
push ebx
push 0x10020690
push 0
push 0
call fcn.100cd9ef
add esp, 0x18
mov dword [ebx + 0x18], eax
test edi, edi
je 0x100305c8
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edi + 4], eax
jmp 0x100305b1
test edi, edi
je 0x100305c8
or esi, 0xffffffff
lea ecx, [edi + 4]
mov eax, esi
lock xadd dword [ecx], eax
jne 0x100305c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
lock xadd dword [edi + 8], esi
dec esi
jne 0x100305c8
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea ecx, [ebp - 0x78]
call fcn.10015070
mov edx, dword [ebp - 0x14]
mov esi, 1
cmp edx, 8
jb 0x10030612
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x10030608
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10030668
push edx
push ecx
call fcn.100899c7
add esp, 8
mov edx, dword [ebp - 0x2c]
cmp edx, 8
jb 0x10030648
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x1003063e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1003066d
push edx
push ecx
call fcn.100899c7
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10089d41
mov esp, ebp
pop ebp
ret 8
call fcn.100c8c99
call fcn.100c8c99
int3