Function at 0x4873ed
Capabilities:
Set thread local storage value

Disassembly:
push 0x74
mov eax, 0x521728
call fcn.004d8abf
mov dword [ebp - 0x2c], ecx
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov edx, dword [0x57d3ec]
mov eax, dword [ecx]
add edx, 0xc
add eax, 0x10
lea ecx, [ebp - 0x10]
push edx
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00485f03
mov byte [ebp - 4], 1
cmp dword [ebp - 0x5c], ebx
jge 0x4874b3
cmp dword [ebp - 0x58], ebx
mov eax, 0x2f12
cmovne eax, dword [ebp - 0x58]
push eax
push dword [ebp - 0x5c]
push ecx
mov esi, esp
mov dword [ebp + 0xc], esi
mov ecx, dword [ebp - 0x54]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x80]
mov dword [esi], eax
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x54]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x487984
push ebx
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x487984
push ebx
jmp 0x4878f3
mov ecx, dword [ebp - 0x54]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x14]
call fcn.0040687a
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 3
push eax
push ecx
mov ecx, esp
push str.report
call fcn.00406fea
mov edi, dword [ebp + 0xc]
mov ecx, edi
call fcn.0044df9d
test al, al
jne 0x487528
push 0x2f15
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x80]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x14]
jmp 0x48747b
lea ecx, [ebp - 0x1c]
call fcn.0040687a
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 5
push eax
push ecx
mov ecx, esp
push 0x54bc0c
call fcn.00406fea
mov ecx, edi
call fcn.0044df9d
test al, al
jne 0x48758c
push 0x2f18
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x80]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 6
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x1c]
jmp 0x487518
push ecx
mov esi, esp
mov dword [ebp + 0xc], esi
mov ebx, dword [ebp - 0x1c]
add ebx, 0xfffffff0
mov ecx, ebx
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x68]
mov dword [esi], eax
call fcn.0042c8ea
pop ecx
lea ecx, [ebp + 0xc]
call fcn.0040687a
lea eax, [ebp + 0xc]
mov byte [ebp - 4], 8
push eax
push ecx
mov ecx, esp
push 0x54bc14
call fcn.00406fea
mov ecx, edi
call fcn.0044df9d
test al, al
jne 0x48765f
push 0x2f1d
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x80]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 9
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp + 0xc]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, ebx
call fcn.00407189
mov ecx, dword [ebp - 0x14]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x487984
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
jmp 0x4878e8
lea ecx, [ebp - 0x18]
call fcn.0040687a
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0xa
push eax
push ecx
mov ecx, esp
push 0x545768
call fcn.00406fea
mov ecx, edi
call fcn.0044df9d
test al, al
jne 0x4876c6
push 0x2f20
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x80]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xb
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x18]
jmp 0x487608
lea ecx, [ebp - 0x20]
call fcn.0040687a
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 0xc
push eax
push ecx
mov ecx, esp
push str.client_info
call fcn.00406fea
mov ecx, edi
call fcn.0044df9d
test al, al
jne 0x48772a
push 0x2f23
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x80]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xd
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x20]
jmp 0x4876b6
mov edi, dword [ebp - 0x2c]
mov ecx, dword [edi]
add ecx, 0x70
push ecx
mov esi, esp
mov dword [ebp - 0x38], esp
mov dword [ebp - 0x30], esi
mov ecx, dword [ecx]
sub ecx, 0x10
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xe
mov ecx, dword [edi]
add ecx, 0x68
push ecx
mov esi, esp
mov dword [ebp - 0x3c], esp
mov dword [ebp - 0x30], esi
mov ecx, dword [ecx]
sub ecx, 0x10
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0xf
mov edi, dword [ebp - 0x20]
push ecx
add edi, 0xfffffff0
mov dword [ebp - 0x40], esp
mov esi, esp
mov ecx, edi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x30], edi
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0x10
mov eax, dword [ebp - 0x18]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x44], esp
mov esi, esp
mov dword [ebp - 0x24], eax
mov ecx, eax
mov dword [ebp - 0x2c], esi
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0x11
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x48], esp
mov esi, esp
mov dword [ebp - 0x28], eax
mov ecx, eax
mov dword [ebp - 0x2c], esi
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
mov byte [ebp - 4], 0x12
mov eax, dword [ebp - 0x14]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x4c], esp
mov esi, esp
mov ecx, eax
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x2c], eax
call fcn.004070e7
add eax, 0x10
mov dword [esi], eax
sub esp, 0xc
mov byte [ebp - 4], 0x13
mov ecx, esp
lea eax, [ebp - 0x68]
push eax
call fcn.0040121b
mov dl, 1
mov byte [ebp - 4], 0xc
lea ecx, [ebp - 0x74]
call fcn.004802de
add esp, 0x24
lea eax, [ebp - 0x74]
mov byte [ebp - 4], 0x14
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040121b
mov byte [ebp - 4], 0x15
cmp dword [ebp - 0x5c], 0
jge 0x4878ff
cmp dword [ebp - 0x58], 0
mov eax, 0x2f28
mov edi, dword [ebp - 0x54]
cmovne eax, dword [ebp - 0x58]
push eax
push dword [ebp - 0x5c]
push ecx
mov esi, esp
lea ecx, [edi - 0x10]
mov dword [ebp - 0x50], esi
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x80]
mov dword [esi], eax
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
mov ecx, esi
mov byte [ebp - 4], 0x16
call fcn.0040121b
mov ecx, dword [ebp - 0x78]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [edi - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x6c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x30]
call fcn.00407189
mov ecx, dword [ebp - 0x24]
call fcn.00407189
mov ecx, dword [ebp - 0x28]
call fcn.00407189
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, ebx
call fcn.00407189
mov ecx, dword [ebp - 0x2c]
call fcn.00407189
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x487984
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov ecx, dword [0x57d3ec]
mov eax, dword [ecx + 0xf8]
cmp eax, 0xffffffff
je 0x487984
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x487984
mov ecx, dword [ebp - 0x54]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x6c]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, edi
call fcn.00407189
mov ecx, dword [ebp - 0x24]
call fcn.00407189
mov ecx, dword [ebp - 0x28]
call fcn.00407189
mov ecx, dword [ebp - 0x60]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, ebx
call fcn.00407189
mov ecx, dword [ebp - 0x2c]
call fcn.00407189
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x487972
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
cmp eax, 0xffffffff
je 0x487972
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [ebp + 8]
and dword [esi], 0
lea ecx, [esi + 8]
and dword [esi + 4], 0
call fcn.0040687a
mov eax, esi
call fcn.004d8a8d
ret 0xc