Function at 0x180004a70
Capabilities:
Create thread

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x18], rbp
mov qword [rsp + 0x20], rsi
push rdi
sub rsp, 0x30
mov esi, ecx
xor ebx, ebx
lea rcx, [0x180332b80]
xor edi, edi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x180332ced], bl
mov ebp, dword [0x180332bc0]
je 0x180004ae4
lea rax, str.start_bootstrap
mov r9d, 0x27b
lea r8, str..._src_bootstrap.c
mov qword [rsp + 0x20], rax
lea rdx, str.__s:_d___s:_suspended_n
lea ecx, [rbx + 2]
call fcn.18002b690
lea rcx, [0x180332b80]
mov ebx, 0x2bd
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180004b9a
test ebp, ebp
je 0x180004b7b
mov rbx, qword [0x180327328]
call qword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, eax
sub eax, ebx
mov dword [rsp + 0x48], eax
cmp ecx, ebx
jae 0x180004b19
mov eax, dword [rsp + 0x48]
dec eax
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x48]
inc eax
mov dword [rsp + 0x48], eax
mov ecx, dword [rsp + 0x48]
cmp esi, 1
jne 0x180004c4e
mov eax, dword [0x180327338]
cmp dword [0x180327330], eax
jae 0x180004c4e
cmp ecx, eax
jae 0x180004c4e
mov dword [rsp + 0x28], eax
lea r8, str..._src_bootstrap.c
lea rax, str.start_bootstrap
mov r9d, 0x283
lea rdx, str.__s:_d___s:_a_new_bootstrap_was_postponed__d_n
mov qword [rsp + 0x20], rax
lea ecx, [rsi + 1]
call fcn.18002b690
or dword [0x18032e4e0], esi
lea ebx, [rsi + 0xa]
mov edi, dword [0x180327338]
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test edi, edi
je 0x180004b9a
mov rcx, qword [0x180332c00]
mov edx, edi
call fcn.180008ee0
test ebp, ebp
je 0x180004cf0
test ebx, ebx
jne 0x180004cf0
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x180332c90]
lea rcx, [0x180332b80]
mov ebx, eax
and eax, 0xffffffdf
mov dword [0x180332c90], eax
shr ebx, 5
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
bt ebx, 0
jae 0x180004bfd
mov rcx, qword [0x180332be8]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [0x180332be8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor r9d, r9d
mov qword [rsp + 0x28], 0
lea r8, [0x180006760]
mov dword [rsp + 0x20], 0x10000
mov edx, 0x200000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180332be8], rax
test rax, rax
je 0x180004ccc
or dword [0x180332c90], 0x20
jmp 0x180004cd3
or dword [0x18032e4e0], esi
mov eax, dword [0x180332c90]
test al, 0x10
je 0x180004c65
mov ebx, WSACleanup
jmp 0x180004ce3
cmp qword [0x180332ce0], rdi
jne 0x180004cb1
cmp byte [0x180332ceb], dil
jne 0x180004c80
cmp qword [0x180332cd8], rdi
jne 0x180004cb1
lea rax, str.start_bootstrap
mov r9d, 0x28e
lea r8, str..._src_bootstrap.c
mov qword [rsp + 0x20], rax
lea rdx, str.__s:_d___s:_skip_bootstrap___null_settings_n
mov ecx, 3
call fcn.18002b690
mov ebx, reloc.WS2_32.dll_shutdown
jmp 0x180004ce3
or eax, 0x10
lea rcx, [0x180332b80]
mov dword [0x180332c90], eax
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x180004baa
and dword [0x180332c90], 0xffffffef
test rax, rax
mov ebx, reloc.WS2_32.dll_WSAStartup
mov ecx, 0x4e38
cmove ebx, ecx
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbp, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x40]
mov rsi, qword [rsp + 0x58]
add rsp, 0x30
pop rdi
ret