Function at 0x1018c780
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x102519c8]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
lea ecx, [ebp - 0x140]
push edi
push ecx
mov ecx, esi
mov dword [ebp - 0x144], esi
mov eax, dword [esi]
call dword [eax + 0x1c]
mov eax, dword [eax]
mov dword [ebp - 0x14c], eax
xor eax, eax
cmp dword [ebx + 0x74], 2
sete al
mov dword [ebp - 0x148], eax
mov eax, dword [ebx + 0x40]
mov dword [ebp - 0x150], eax
call fcn.10026170
mov edi, eax
cmp byte [edi + 0x210], 0
jne 0x1018c7e6
xor eax, eax
jmp 0x1018c97e
push 0x1025c02a
push 0x34
call fcn.101c85b0
mov esi, eax
add esp, 8
test esi, esi
je 0x1018c875
mov eax, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x14c]
mov dword [esi + 0x10], eax
xor eax, eax
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 7
mov word [esi + 0x14], ax
lea eax, [ecx + 2]
mov dword [ebp - 0x150], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1018c827
sub ecx, dword [ebp - 0x150]
sar ecx, 1
push ecx
push dword [ebp - 0x14c]
lea ecx, [esi + 0x14]
call fcn.100070c0
mov eax, dword [ebp - 0x148]
mov dword [esi + 0x2c], eax
xor eax, eax
mov dword [esi], eax
mov dword [esi + 4], eax
mov dword [esi + 8], eax
push esi
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
push 0
call sub.msvcrt.dll_time
add esp, 4
mov dword [esi + 0x30], eax
jmp 0x1018c877
xor esi, esi
mov dword [ebp - 0x15c], esi
test esi, esi
jne 0x1018c888
xor eax, eax
jmp 0x1018c978
push 0
push 0
lea ecx, [ebp - 0x158]
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x154], 0
call fcn.100273b0
mov esi, dword [edi]
mov edx, dword [ebp - 0x15c]
mov dword [ebp - 0x158], eax
mov eax, esi
mov ecx, dword [esi + 4]
cmp byte [ecx + 0xd], 0
jne 0x1018c8d8
cmp dword [ecx + 0x10], edx
jae 0x1018c8ce
mov ecx, dword [ecx + 8]
jmp 0x1018c8d2
mov esi, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x1018c8c4
cmp esi, eax
je 0x1018c8e1
cmp edx, dword [esi + 0x10]
jae 0x1018c921
lea eax, [ebp - 0x15c]
mov ecx, edi
mov dword [ebp - 0x148], eax
lea eax, [ebp - 0x139]
push eax
lea eax, [ebp - 0x148]
push eax
push 0x1021bfa8
call fcn.1001d570
push eax
add eax, 0x10
mov ecx, edi
push eax
push esi
lea eax, [ebp - 0x148]
push eax
call fcn.1001ee50
mov esi, dword [ebp - 0x148]
add esi, 0x14
lea eax, [ebp - 0x158]
cmp esi, eax
je 0x1018c957
mov ecx, esi
call fcn.1002a820
mov eax, dword [esi]
mov ecx, dword [ebp - 0x158]
mov dword [esi], ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x158], eax
mov eax, dword [ebp - 0x154]
mov dword [esi + 4], eax
mov dword [ebp - 0x154], ecx
lea ecx, [ebp - 0x158]
call fcn.1002a820
push 0x20
push dword [ebp - 0x158]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
mov eax, dword [ebp - 0x15c]
add esp, 8
mov esi, dword [ebp - 0x144]
mov edx, dword [ebp - 0x140]
lea edi, [esi + 0xc4]
mov dword [edi], eax
add edx, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018c9a4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebx + 0x74]
xor eax, eax
cmp ecx, 2
mov dword [ebp - 0x150], ecx
push ebx
sete al
lea ecx, [ebp - 0x140]
inc eax
push ecx
lea ecx, [esi + 0xd8]
mov dword [ebp - 0x148], eax
call fcn.1002aeb0
mov eax, dword [ebp - 0x140]
cmp eax, dword [esi + 0xd8]
jne 0x1018c9ec
mov dword [ebp - 0x14c], 0
jmp 0x1018cba6
mov eax, dword [ebx]
mov dword [esi + 0xec], eax
mov eax, dword [0x1025b450]
cmp eax, 0xffffffff
je 0x1018ca4d
cmp dword [0x1025b454], 0xffffffff
je 0x1018ca4d
push eax
mov dword [ebp - 0x144], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x1018ca4d
mov eax, dword [0x1025b458]
test eax, eax
je 0x1018ca4d
lea ecx, [ebp - 0x144]
push ecx
call eax
push eax
push dword [0x1025b450]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [ebp - 0x144]
push dword [0x1025b454]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x1018ca5b
mov eax, dword [ecx]
call dword [eax + 0x1c]
jmp 0x1018ca60
mov eax, 0x10202940
push eax
lea ecx, [ebp - 0x138]
call fcn.10183f20
mov eax, dword [esi]
lea ecx, [ebp - 0x140]
push ecx
mov ecx, esi
call dword [eax + 0x1c]
lea ecx, [ebp - 0x120]
push dword [eax]
push dword [ebx + 0x44]
push dword [ebx + 0x40]
push dword [ebx]
push dword [ebx + 0xc]
push dword [ebx + 8]
call fcn.10126970
mov edx, dword [ebp - 0x140]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x1018cab3
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [esi + 0x218], 0
je 0x1018cae2
mov eax, dword [esi + 0x21c]
cmp eax, dword [ebx]
jne 0x1018cae2
lea eax, [ebp - 0x120]
mov ecx, esi
push eax
push dword [ebp - 0x148]
push dword [esi + 0x220]
call fcn.1018ceb0
jmp 0x1018cb3a
cmp dword [ebp - 0x150], 2
je 0x1018cb2b
call fcn.100ddff0
test eax, eax
je 0x1018cb2b
cmp dword [ebx + 0x44], 1
jne 0x1018cb2b
push ebx
lea eax, [ebp - 0x140]
push eax
lea ecx, [esi + 0xd8]
call fcn.1002aeb0
mov eax, dword [ebp - 0x140]
cmp eax, dword [esi + 0xd8]
je 0x1018cb2b
push 1
push dword [eax + 0x18]
lea ecx, [ebp - 0x120]
call fcn.101271d0
lea eax, [ebp - 0x138]
mov ecx, esi
push eax
push ebx
call fcn.10191170
mov eax, dword [0x1025b450]
cmp eax, 0xffffffff
je 0x1018cb84
cmp dword [0x1025b454], 0xffffffff
je 0x1018cb84
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
call esi
test eax, eax
je 0x1018cb84
cmp dword [0x1025b45c], 0
je 0x1018cb84
push dword [0x1025b454]
call esi
push eax
call dword [0x1025b45c]
neg eax
sbb eax, eax
inc eax
push eax
push dword [0x1025b450]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [ebx + 0x74], 2
jne 0x1018cb91
mov dword [ebx + 0x74], 3
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x14c], 1
call fcn.101841c0
test edi, edi
je 0x1018ccbf
mov esi, dword [edi]
test esi, esi
je 0x1018ccbf
call fcn.10026170
mov ebx, eax
lea ecx, [ebp - 0x139]
mov dword [ebp - 0x144], ebx
call fcn.10129b80
cmp byte [ebx + 0x210], 0
je 0x1018ccae
test esi, esi
je 0x1018ccae
lea eax, [ebp - 0x140]
mov dword [ebp - 0x140], esi
push eax
lea eax, [ebp - 0x148]
mov ecx, ebx
push eax
call fcn.1002aeb0
mov esi, dword [eax]
cmp esi, dword [ebx]
je 0x1018ccae
mov ecx, dword [ebp - 0x144]
lea ebx, [esi + 0x14]
push ebx
push dword [esi + 0x10]
call fcn.1002b7c0
mov ecx, ebx
call fcn.1002a820
mov ebx, dword [esi + 0x10]
test ebx, ebx
je 0x1018cc83
mov ecx, dword [ebx + 0x28]
cmp ecx, 8
jb 0x1018cc64
mov eax, dword [ebx + 0x14]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x1018cc5a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1018ccd8
mov eax, edx
push ecx
push eax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
xor eax, eax
mov dword [ebx + 0x24], 0
push 0x34
mov dword [ebx + 0x28], 7
push ebx
mov word [ebx + 0x14], ax
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 8
mov ecx, dword [ebp - 0x144]
push esi
call fcn.100151b0
mov ebx, eax
lea ecx, [ebx + 0x14]
call fcn.1002a820
push 0x20
push dword [ebx + 0x14]
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
push 0x1c
push ebx
call sub.msvcrt.dll_void___cdecl_operator_delete_void__
add esp, 0x10
lea ecx, [ebp - 0x139]
call fcn.10129ba0
mov dword [edi], 0
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x14c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.101f99c6
mov esp, ebp
pop ebp
ret 4
call fcn.101e6c40
int3