Function at 0x18000c840
Capabilities:
Allocate thread local storage
Create thread

Disassembly:
mov qword [rsp + 0x18], rbx
push rdi
sub rsp, 0x30
xor edi, edi
lea rcx, [0x180332b80]
mov ebx, edi
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea rcx, [0x18000e8c0]
call fcn.1800629d0
lea rcx, [0x18000e920]
call fcn.1800629e0
lea rcx, [0x18000e880]
call fcn.180058e20
call fcn.18002b5f0
cmp eax, 5
jl 0x18000c893
mov ecx, 0xffffffff
call fcn.1800629f0
mov eax, dword [0x180332c90]
test al, 4
je 0x18000c936
test al, 8
jne 0x18000c8cb
or eax, 8
mov dword [0x180332e18], edi
xor r9d, r9d
mov dword [0x180332c90], eax
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov qword [0x180332e10], rax
inc dword [0x180332e18]
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rcx, qword [0x180332e10]
mov edx, 0xffffffff
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
add dword [0x180332e18], 0xffffffff
je 0x18000c913
mov rcx, qword [0x180332e10]
call qword [sym.imp.KERNEL32.dll_SetEvent]
cmp dword [0x180332e18], ebx
jne 0x18000c928
mov rcx, qword [0x180332e10]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x180332c90]
test al, 4
jne 0x18000c8a1
inc dword [0x180332bc8]
and eax, 0xfffffff7
mov ecx, dword [0x180332bc0]
mov dword [0x180332c90], eax
mov eax, dword [0x180332bc4]
cmp ecx, eax
jne 0x18000c95d
inc eax
mov dword [0x180332bc4], eax
mov eax, ecx
inc ecx
mov dword [0x180332bc0], ecx
test eax, eax
jne 0x18000cc14
mov qword [rsp + 0x48], rsi
call fcn.18001dc10
call fcn.18003cee0
mov rcx, rax
call fcn.18003d2f0
lea rsi, str.global_state_init
mov r9d, 0x89
lea r8, str..._srcglobal_state.c
mov qword [rsp + 0x20], rsi
lea rdx, str.__s:_d___s:_first_time_initialization_n
mov ecx, 2
call fcn.18002b690
mov edx, 0xffffffff
lea rcx, [0x180332c28]
call fcn.18002a480
call fcn.180027820
mov qword [0x180332bf8], rax
test rax, rax
je 0x18000cc05
call qword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x180332e08], eax
cmp eax, 0xffffffff
je 0x18000cc05
mov dword [rsp + 0x28], eax
lea r8, str..._srcglobal_state.c
mov r9d, 0x96
mov qword [rsp + 0x20], rsi
lea rdx, str.__s:_d___s:_tls_key__x_n
mov ecx, 2
call fcn.18002b690
mov rcx, qword [0x180332bf8]
lea rax, [0x180332df8]
mov qword [0x180332e00], rax
lea r9, [0x18000e160]
mov qword [0x180332df8], rax
mov r8d, reloc.WS2_32.dll_recv
lea rax, [0x180332de8]
mov qword [0x180332df0], rcx
mov rdx, 0xffffffffffffffff
mov qword [rsp + 0x20], rax
call fcn.180052250
mov qword [0x180332de8], rax
test rax, rax
je 0x18000cc05
xor edx, edx
mov rcx, rax
call fcn.180052650
mov r9d, 1
mov qword [rsp + 0x28], rdi
lea r8, [0x18000dbc0]
mov dword [rsp + 0x20], 0x10000
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180332be0], rax
test rax, rax
jne 0x18000caae
mov ebx, 0x4e38
jmp 0x18000cc0a
or dword [0x180332c90], 1
cmp byte [0x180332cec], bl
je 0x18000caf4
mov qword [rsp + 0x28], rdi
lea r8, [0x18000ddc0]
xor r9d, r9d
mov dword [rsp + 0x20], 0x10000
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateThread]
mov qword [0x180332bf0], rax
test rax, rax
je 0x18000caa4
or dword [0x180332c90], 0x200
call fcn.180008e80
mov rcx, qword [0x180332bf8]
lea r9, [0x18000df30]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rdi
mov rdx, 0xffffffffffffffff
call fcn.180052250
mov qword [0x180332c08], rax
test rax, rax
je 0x18000cc05
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], 0x1e
mov rcx, rax
call fcn.180052650
mov rcx, qword [0x180332bf8]
lea r9, [0x18000e250]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rdi
mov rdx, 0xffffffffffffffff
call fcn.180052250
mov qword [0x180332c10], rax
test rax, rax
je 0x18000cc05
lea rdx, [rsp + 0x40]
mov qword [rsp + 0x40], 0x708
mov rcx, rax
call fcn.180052650
mov rcx, qword [0x180332bf8]
lea r9, [0x18000e260]
mov r8d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rdi
mov rdx, 0xffffffffffffffff
call fcn.180052250
mov qword [0x180332c18], rax
test rax, rax
je 0x18000cc05
xor edx, edx
mov rcx, rax
call fcn.180052650
call fcn.180025b80
mov qword [rsp + 0x28], rax
lea r8, str..._srcglobal_state.c
mov r9d, 0xbd
mov qword [rsp + 0x20], rsi
lea rdx, str.__s:_d___s:_setup_network_awareness___p_n
mov qword [0x180332d80], rax
mov ecx, 2
call fcn.18002b690
call fcn.180028250
jmp 0x18000cc0f
mov ebx, reloc.WS2_32.dll_inet_ntoa
call fcn.18000e300
mov rsi, qword [rsp + 0x48]
lea rcx, [0x180332b80]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, ebx
mov rbx, qword [rsp + 0x50]
add rsp, 0x30
pop rdi
ret