Function at 0xc186d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x14], 0
mov eax, dword [eax]
mov dword [ebp - 0x44], eax
call fcn.00c18160
test edi, edi
mov dword [ebp - 0x40], 0xffffffff
je 0xc18774
mov eax, 0x3e8
imul dword [edi]
mov ebx, eax
mov eax, dword [edi + 4]
mov esi, edx
mov dword [esp + 8], 0xf4240
mov dword [esp + 0xc], 0
mov edx, eax
sar edx, 0x1f
add eax, 0x7a120
adc edx, 0
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00de3110
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x30]
add dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], edx
mov dword [esp], eax
adc dword [ebp - 0x34], esi
call sub.msvcrt.dll__ftime_1
mov eax, 0x3e8
imul dword [ebp - 0x30]
mov ecx, eax
movsx eax, word [ebp - 0x2c]
mov ebx, edx
mov edx, eax
sar edx, 0x1f
add ecx, eax
adc ebx, edx
cmp dword [ebp - 0x34], ebx
jle 0xc187d0
mov edx, dword [ebp - 0x38]
sub edx, ecx
mov dword [ebp - 0x40], edx
add edx, 1
je 0xc187e7
mov esi, dword [ebp - 0x44]
add esi, 4
mov dword [esp], esi
call fcn.00c13b40
test eax, eax
mov dword [ebp - 0x14], eax
jne 0xc187b5
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
test ebx, ebx
je 0xc1899f
mov edx, dword [ebp - 0x44]
mov ebx, dword [edx]
sub ebx, 1
mov dword [edx], ebx
mov dword [esp], esi
call fcn.00c14250
test ebx, ebx
js 0xc187f2
mov edx, dword [ebp - 0x14]
xor eax, eax
test edx, edx
je 0xc187c4
call sub.msvcrt.dll__errno
mov edx, dword [ebp - 0x14]
mov dword [eax], edx
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
jge 0xc187e0
mov dword [ebp - 0x40], 0
jmp 0xc18774
cmp dword [ebp - 0x38], ecx
ja 0xc18767
jmp 0xc187d2
mov dword [ebp - 0x40], 0xfffffffe
nop
jmp 0xc18774
mov eax, dword [ebp - 0x44]
mov ebx, dword [0x1765a68]
mov dword [ebp - 0x30], 0xc14da0
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
xor eax, eax
test ebx, ebx
je 0xc18856
call sub.KERNEL32.dll_GetLastError
mov esi, eax
call sub.WS2_32.DLL_WSAGetLastError
mov dword [ebp - 0x3c], eax
mov eax, dword [ebx]
mov dword [esp], eax
call sub.KERNEL32.dll_TlsGetValue
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call sub.KERNEL32.dll_SetLastError
mov edx, dword [ebp - 0x3c]
sub esp, 4
mov dword [esp], edx
call sub.WS2_32.DLL_WSASetLastError
mov eax, ebx
mov ebx, dword [0x1765a68]
sub esp, 4
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x30]
mov dword [esp], ebx
mov dword [esp + 4], eax
call fcn.00c13f00
mov edx, dword [ebp - 0x44]
mov eax, dword [edx + 8]
mov dword [ebp - 0x24], eax
call fcn.00c140a0
test eax, eax
mov edi, eax
mov ebx, eax
je 0xc1896a
mov ecx, dword [eax + 0x34]
test ecx, ecx
jne 0xc18929
mov eax, dword [eax + 0x3c]
mov edx, 2
test eax, eax
mov dword [ebp - 0x20], eax
je 0xc18929
mov eax, dword [ebp - 0x40]
xor esi, esi
mov dword [esp + 8], 0
mov dword [esp], edx
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
call sub.KERNEL32.dll_WaitForMultipleObjects
sub esp, 0x10
test eax, eax
je 0xc188e0
cmp eax, 1
je 0xc18933
cmp eax, 0x102
mov esi, 0x274c
je 0xc188e0
mov esi, 0x16
lea esi, [esi]
mov eax, dword [0x1765a68]
mov dword [ebp - 0x14], esi
mov dword [esp], eax
call fcn.00c12300
test eax, eax
mov ebx, eax
je 0xc187ac
test esi, esi
je 0xc18910
mov edx, dword [eax]
test edx, edx
je 0xc18910
mov eax, dword [eax + 4]
mov dword [esp], eax
call edx
lea esi, [esi]
mov eax, dword [ebx + 8]
mov dword [esp + 4], eax
mov eax, dword [0x1765a68]
mov dword [esp], eax
call fcn.00c13f00
jmp 0xc187ac
mov edx, 1
jmp 0xc188a0
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sub.KERNEL32.dll_ResetEvent
sub esp, 4
test edi, edi
je 0xc188d8
lea esi, [ebx + 0x30]
mov dword [esp], esi
call fcn.00c13b40
mov eax, dword [ebx + 0x14]
cmp eax, 3
jbe 0xc1897b
mov dword [esp], esi
mov esi, 0x16
call fcn.00c14250
jmp 0xc188e0
mov edx, 1
mov dword [ebp - 0x20], 0
jmp 0xc188a0
mov dword [ebx + 0x14], 4
mov dword [ebx + 0x34], 1
mov dword [esp], esi
call fcn.00c14250
mov dword [esp], 2
call fcn.00c17de0
jmp 0xc18958
mov dword [esp], esi
call fcn.00c14250
call sub.msvcrt.dll__errno
mov dword [eax], 0x16
mov eax, 0xffffffff
jmp 0xc187c4