Function at 0x486f0a
Capabilities:
Set thread local storage value

Disassembly:
push 0x5c
mov eax, 0x52164e
call fcn.004d8abf
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x14]
mov edx, dword [0x57d3ec]
mov eax, dword [edi]
add edx, 0xc
add eax, 0x20
push edx
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00485f03
mov byte [ebp - 4], 1
cmp dword [ebp - 0x40], ebx
jge 0x486fcf
cmp dword [ebp - 0x3c], ebx
mov eax, 0x2ed5
cmovne eax, dword [ebp - 0x3c]
push eax
push dword [ebp - 0x40]
push ecx
mov esi, esp
mov dword [ebp + 0x10], esi
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x4c]
mov dword [esi], eax
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov byte [ebp - 4], 2
call fcn.0040121b
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4873dd
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 0x4873dd
push ebx
jmp 0x487325
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x18]
call fcn.0040687a
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 3
push eax
push ecx
mov ecx, esp
push str.status
call fcn.00406fea
mov ecx, dword [ebp + 0x10]
call fcn.0044df9d
test al, al
jne 0x487042
push 0x2ed9
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x4c]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov byte [ebp - 4], 4
call fcn.0040121b
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x18]
jmp 0x486f97
lea ecx, [ebp - 0x68]
call fcn.00451c56
push ecx
mov byte [ebp - 4], 5
mov esi, esp
mov dword [ebp + 0x10], esi
mov ebx, dword [ebp - 0x18]
add ebx, 0xfffffff0
mov ecx, ebx
mov dword [ebp - 0x28], ebx
call fcn.004070e7
add eax, 0x10
lea edx, [ebp - 0x68]
lea ecx, [ebp - 0x40]
mov dword [esi], eax
call fcn.004b4115
pop ecx
mov byte [ebp - 4], 6
cmp dword [ebp - 0x40], 0
jge 0x48711b
cmp dword [ebp - 0x3c], 0
mov eax, 0x2edd
cmovne eax, dword [ebp - 0x3c]
push eax
push dword [ebp - 0x40]
push ecx
mov esi, esp
mov dword [ebp + 0x10], esi
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.004070e7
add eax, 0x10
lea ecx, [ebp - 0x4c]
mov dword [esi], eax
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov byte [ebp - 4], 7
call fcn.0040121b
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x60]
call fcn.004a93d1
mov ecx, dword [ebp - 0x64]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, ebx
call fcn.00407189
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4873dd
push 0
push 1
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov eax, dword [0x57d3ec]
mov eax, dword [eax + 0xf8]
jmp 0x48731a
mov ecx, dword [ebp - 0x38]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov eax, dword [edi]
cmp dword [eax + 0x24], 0xa
mov eax, dword [0x57d3ec]
setb byte [ebp + 0x13]
add eax, 0x54
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea ecx, [ebp - 0x34]
mov byte [ebp - 4], 8
call fcn.004acf13
mov byte [ebp - 4], 9
mov byte [ebp - 0xd], 0
call fcn.0044f24f
mov esi, 0x1b8
lea ecx, [esi + eax]
lea eax, [edi + 0x4c]
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.004a9392
call fcn.0044f24f
mov edi, dword [ebp - 0x24]
cmp edi, dword [eax + esi]
jne 0x4871c6
push 0x2ee8
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x4c]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xa
call fcn.0040121b
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x34]
call fcn.004add79
lea ecx, [ebp + 0x13]
call fcn.0044f694
jmp 0x4870da
mov eax, dword [ebp - 0x60]
mov esi, dword [eax]
mov dword [ebp - 0x1c], esi
cmp esi, eax
je 0x487337
lea eax, [edi + 0x24]
mov dword [ebp - 0x20], eax
lea ebx, [esi + 0x10]
mov ecx, eax
push ebx
call fcn.004b59f7
mov edi, eax
mov eax, dword [ebp - 0x20]
cmp edi, dword [eax]
je 0x487295
lea eax, [esi + 0x14]
push eax
lea ecx, [edi + 0x14]
call fcn.00405d6e
mov al, byte [esi + 0x18]
mov byte [edi + 0x18], al
mov al, byte [esi + 0x19]
mov byte [edi + 0x19], al
mov al, byte [esi + 0x1a]
mov byte [edi + 0x1a], al
cmp byte [esi + 0x18], 0
je 0x487279
push ebx
lea eax, [ebp - 0x58]
mov byte [ebp - 0xd], 1
push eax
lea ecx, [ebp - 0x34]
call fcn.00409a0d
mov esi, eax
lea edi, [ebp - 0x4c]
push ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push dword [ebp - 0x44]
call fcn.00409a5e
test al, al
jne 0x487279
cmp dword [ebp - 0x30], 0xccccccc
je 0x4873e7
push ebx
push dword [ebp - 0x34]
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x3c]
call fcn.004c1a6b
lea ecx, [ebp - 0x3c]
mov esi, dword [eax + 4]
and dword [eax + 4], 0
call fcn.004c0cd7
push esi
push dword [ebp - 0x48]
lea ecx, [ebp - 0x34]
push dword [ebp - 0x4c]
call fcn.00409917
lea ecx, [ebp - 0x1c]
call fcn.004094c2
mov esi, dword [ebp - 0x1c]
cmp esi, dword [ebp - 0x60]
je 0x487331
mov eax, dword [ebp - 0x20]
jmp 0x4871dc
push 0x2eeb
push 0x80004005
push ecx
mov ecx, esp
call fcn.0040687a
lea ecx, [ebp - 0x4c]
call fcn.00406620
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
mov byte [ebp - 4], 0xb
call fcn.0040121b
mov ecx, dword [ebp - 0x44]
lea ecx, [ecx - 0x10]
call fcn.00407189
lea ecx, [ebp - 0x34]
call fcn.004add79
lea ecx, [ebp + 0x13]
call fcn.0044f694
lea ecx, [ebp - 0x60]
call fcn.004a93d1
mov ecx, dword [ebp - 0x64]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, dword [ebp - 0x28]
call fcn.00407189
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4873dd
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 0x4873dd
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x4873dd
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x28]
lea eax, [ebp - 0x64]
push eax
lea ecx, [edi + 0x18]
call fcn.00405d6e
cmp byte [ebp - 0xd], 0
mov al, byte [ebp - 0x67]
mov byte [edi + 0x1c], al
mov al, byte [ebp - 0x68]
mov byte [edi + 0x1d], al
je 0x48736d
call fcn.0044f24f
xor edx, edx
lea ecx, [ebp - 0x34]
cmp dword [ebp - 0x30], edx
cmove ecx, edx
push ecx
mov ecx, eax
call fcn.00452892
lea ecx, [ebp - 0x34]
call fcn.004add79
lea ecx, [ebp + 0x13]
call fcn.0044f694
mov ecx, dword [ebp + 0xc]
mov al, byte [ebp - 0x68]
mov byte [ecx], al
lea ecx, [ebp - 0x60]
call fcn.004a93d1
mov ecx, dword [ebp - 0x64]
lea ecx, [ecx - 0x10]
call fcn.00407189
mov ecx, ebx
call fcn.00407189
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4873cb
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 0x4873cb
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 0x10
call fcn.00409e63
int3