Function at 0x1005b730
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x24
mov edi, dword [ebp + 8]
cmp dword [edi + 4], 0
je 0x1005b7ae
lea ebx, [edi + 0xc]
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x14]
push 0
push eax
push 0
push ebx
call sub.KERNEL32.dll_InitOnceBeginInitialize
cmp eax, 1
mov dword [ebp - 0x30], eax
jne 0x1005b7e8
cmp dword [ebp - 0x14], 0
je 0x1005b7cf
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
je 0x1005b805
mov esi, eax
mov eax, dword [entry1]
mov eax, dword [0x100fc110]
nop word cs:[eax + eax]
mov dword [edi + 8], eax
lock cmpxchg dword [0x100fc110], edi
jne 0x1005b790
mov eax, esi
inc eax
mov dword [edi], eax
push 0
push 0
push ebx
call sub.KERNEL32.dll_InitOnceComplete
jmp 0x1005b7de
call sub.KERNEL32.dll_TlsAlloc
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x1005b840
mov ecx, eax
xor eax, eax
inc ecx
lock cmpxchg dword [edi], ecx
jne 0x1005b7d3
mov esi, dword [ebp - 0x10]
jmp 0x1005b7de
mov esi, dword [edi]
jmp 0x1005b7dd
mov esi, eax
push dword [ebp - 0x10]
call sub.KERNEL32.dll_TlsFree
dec esi
mov eax, esi
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x2c], 0
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x30]
mov edx, 0x100c7ea8
push 0x100c8864
push eax
call fcn.10018390
push 0
push 4
push ebx
call sub.KERNEL32.dll_InitOnceComplete
mov dword [ebp - 0x2c], 0x100c881c
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x2c]
push 0x100c8854
push eax
call fcn.10089dd0
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x2c], 0x100c881c
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], 4
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
call fcn.10018360
nop
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [ecx + 4]
test edx, edx
je 0x1005b8b0
nop word cs:[eax + eax]
mov esi, dword [edx + 0x18]
mov edi, dword [edx + 0x1c]
movzx ebx, word [esi]
cmp ebx, 0x17
je 0x1005b8f2
cmp ebx, 2
je 0x1005b8ba
test edi, edi
mov edx, edi
jne 0x1005b890
mov dword [ecx + 4], 0
mov word [eax], 2
jmp 0x1005b97f
mov edx, dword [edx + 0x10]
mov dword [ecx + 4], edi
cmp edx, 0xf
jbe 0x1005b987
mov ebx, dword [esi + 4]
movzx ecx, word [esi + 2]
mov dword [ebp - 0x18], 0x100c8960
mov dword [ebp - 0x10], 0
mov edi, ebx
movzx edx, bx
rol cx, 8
shr ebx, 0x10
shr edi, 0x18
mov dword [ebp - 0x14], edx
jmp 0x1005b942
mov edx, dword [edx + 0x10]
mov dword [ecx + 4], edi
cmp edx, 0x1b
jbe 0x1005b998
mov ecx, dword [esi + 4]
mov edi, dword [esi + 0xc]
movzx edx, word [esi + 2]
movzx ebx, word [esi + 8]
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x18], edi
mov edi, dword [esi + 0x14]
rol dx, 8
mov dword [ebp - 0x28], ecx
movzx ecx, word [esi + 0xa]
mov esi, dword [esi + 0x10]
mov dword [ebp - 0x24], edi
mov edi, ebx
shr edi, 8
mov dword [ebp - 0x20], esi
mov si, 1
mov dword [ebp - 0x10], esi
mov esi, dword [ebp - 0x10]
movzx ebx, bl
shl edi, 0x18
shl ebx, 0x10
or ebx, edi
mov edi, dword [ebp - 0x20]
add ebx, dword [ebp - 0x14]
mov word [eax], si
mov esi, dword [ebp - 0x18]
mov dword [eax + 2], ebx
mov word [eax + 6], cx
mov dword [eax + 8], esi
mov esi, dword [ebp - 0x24]
mov dword [eax + 0xc], edi
mov edi, dword [ebp - 0x1c]
mov dword [eax + 0x10], esi
mov esi, dword [ebp - 0x28]
mov dword [eax + 0x14], edi
mov dword [eax + 0x18], esi
mov word [eax + 0x1c], dx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x100c88f4
push 0x39
push 0x100c8898
call fcn.10089e60
push 0x100c8940
push 0x3a
push 0x100c8904
call fcn.10089e60
nop dword [eax]
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push dword [eax]
call sub.WS2_32.dll_freeaddrinfo
pop ebp
ret