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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ab05f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x288
mov eax, dword [0x4eb358]
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
xor esi, esi
cmp eax, 0xffffffff
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x28], edi
je 0x419656
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
jne 0x419656
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [ebp - 0x14], eax
cmp eax, ebx
mov dword [ebp - 4], ebx
je 0x4195ef
mov ecx, eax
call fcn.00418520
mov esi, eax
jmp 0x4195f1
xor esi, esi
mov eax, dword [0x4eb358]
push esi
push eax
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, ebx
jne 0x419620
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x18]
push 0x4cb060
push ecx
mov dword [ebp - 0x18], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov edi, eax
push 0x4eb360
mov dword [edi], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [edi + 4], edx
mov dword [0x4eb35c], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [ebp - 0x28]
mov al, byte [esi + 0xa8]
push eax
call fcn.00429a20
mov eax, dword [ebp + 0xc]
add esp, 4
cmp eax, ebx
mov dword [edi], ebx
jne 0x419689
mov dword [edi], 5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ebp + 0x10]
cmp eax, ebx
jne 0x4196ab
mov dword [edi], 5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov esi, dword [ebp + 0x14]
cmp esi, ebx
jne 0x4196cd
mov dword [edi], 5
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, dword [ebp + 0x18]
mov edi, 1
cmp ecx, ebx
jne 0x4197d0
mov ecx, esi
mov dword [ebp - 4], edi
imul ecx, eax
push ecx
call fcn.0048b346
add esp, 4
mov dword [ebp - 0x2c], eax
jmp 0x41970d
cmp eax, ebx
mov dword [ebp - 4], 0xffffffff
jne 0x419732
mov edx, dword [ebp - 0x28]
xor eax, eax
mov dword [edx], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
cmp esi, ebx
jbe 0x4197d0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
add ecx, 2
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x18], esi
lea eax, [eax + eax*2]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], ebx
cmp eax, ebx
jbe 0x4197b1
mov esi, dword [ebp - 0x24]
xor edx, edx
xor eax, eax
mov dl, byte [esi - 1]
mov al, byte [esi - 2]
mov dword [ebp - 0x20], edx
xor ecx, ecx
fild dword [ebp - 0x20]
mov dword [ebp - 0x20], eax
mov cl, byte [esi]
fmul qword [0x4b08e8]
fild dword [ebp - 0x20]
mov dword [ebp - 0x20], ecx
fmul qword [0x4b08f0]
fsubp st(1)
fild dword [ebp - 0x20]
fmul qword [0x4b08f8]
fsubp st(1)
call fcn.00471aac
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp - 0x14]
add esi, 3
mov byte [ecx + edx], al
mov eax, dword [ebp + 0x10]
inc ecx
cmp ecx, eax
mov dword [ebp - 0x30], ecx
jb 0x41975f
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14]
add esi, eax
mov eax, dword [ebp - 0x18]
add edx, ecx
dec eax
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x18], eax
jne 0x419752
lea edx, [ebp - 0x298]
mov dword [ebp - 0x24], ebx
push edx
call fcn.00429a30
mov ecx, dword [ebp - 4]
add esp, 4
mov dword [ebp - 0x1d4], eax
lea eax, [ebp - 0x214]
push 0x4cb4c0
push ecx
push 0x471683
push 3
push eax
mov dword [ebp - 0x298], 0x419510
call fcn.00472ad0
add esp, 0x14
test eax, eax
je 0x419863
lea edx, [ebp - 0x1d4]
push edx
call fcn.00429d00
mov eax, dword [ebp - 0x24]
add esp, 4
cmp eax, ebx
je 0x419834
push eax
call fcn.00471ad3
add esp, 4
cmp dword [ebp + 0x18], ebx
jne 0x419845
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0048b36f
add esp, 4
mov ecx, dword [ebp - 0x28]
xor eax, eax
mov dword [ecx], 9
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
push 0x168
lea edx, [ebp - 0x1d4]
push 0x3e
push edx
call fcn.00429c30
mov eax, dword [ebp + 8]
add esp, 0xc
push 0x4d34b8
push eax
call fcn.00471dd0
add esp, 8
cmp eax, ebx
mov dword [ebp - 0x24], eax
jne 0x4198d5
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.00429d00
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp + 0x18]
add esp, 4
cmp eax, ebx
mov dword [edx], 2
jne 0x419f41
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0048b36f
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
lea ecx, [ebp - 0x1d4]
push eax
push ecx
call fcn.0042ab50
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x1b4], eax
mov eax, dword [ebp + 0x18]
add esp, 8
cmp eax, ebx
mov dword [ebp - 0x1b8], edx
je 0x419914
mov dword [ebp - 0x1b0], 3
mov dword [ebp - 0x1ac], 2
jmp 0x419920
mov dword [ebp - 0x1b0], edi
mov dword [ebp - 0x1ac], edi
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.0042a2f0
mov edx, dword [ebp + 0x1c]
add esp, 4
lea eax, [ebp - 0x1d4]
push edi
push edx
push eax
call fcn.0042a2c0
mov eax, dword [ebp + 0x20]
add esp, 0xc
cmp eax, ebx
je 0x419959
lea ecx, [ebp - 0x1d4]
push ecx
call fcn.0042a880
add esp, 4
mov ecx, dword [ebp - 0x28]
lea edx, [ebp - 0x1d4]
push edx
call fcn.0041a1f0
mov ecx, dword [0x4eb358]
xor eax, eax
cmp ecx, 0xffffffff
je 0x419a1e
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x419a1e
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [ebp - 0x18], eax
cmp eax, ebx
mov dword [ebp - 4], 3
je 0x4199ac
mov ecx, eax
call fcn.00418520
jmp 0x4199ae
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], eax
push eax
mov eax, dword [0x4eb358]
push eax
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, ebx
jne 0x4199e6
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x1c]
push 0x4cb060
push ecx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1c], eax
call fcn.00472a64
push 8
call fcn.0048b346
mov edx, dword [ebp - 0x18]
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], eax
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x30]
mov edx, dword [eax + 0x6c]
mov esi, dword [ebp - 0x28]
lea ecx, [ebp - 0x1d4]
push ecx
push edx
mov ecx, esi
call fcn.0041a5c0
lea eax, [ebp - 0x1d4]
push edi
push eax
call fcn.00429f50
add esp, 8
lea ecx, [ebp - 0x1d4]
push ecx
mov ecx, esi
call fcn.0041a290
mov eax, dword [ebp - 0x104]
mov ecx, dword [ebp - 0x1b4]
cmp eax, ecx
jae 0x419eb8
cmp dword [ebp + 0x18], ebx
je 0x419a76
imul eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea ecx, [edx + eax*2]
jmp 0x419a7d
imul eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x2c]
add eax, ecx
mov ecx, dword [0x4eb358]
mov dword [ebp - 0x20], eax
xor eax, eax
cmp ecx, 0xffffffff
je 0x419b48
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x419b42
push 0xb8
call fcn.0048b346
add esp, 4
mov dword [ebp - 0x3c], eax
cmp eax, ebx
mov dword [ebp - 4], 4
je 0x419ac6
mov ecx, eax
call fcn.00418520
jmp 0x419ac8
xor eax, eax
mov edx, dword [0x4eb358]
push eax
push edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, ebx
jne 0x419b01
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
push 0x4cb060
push eax
call fcn.00472a64
push 8
call fcn.0048b346
mov ecx, dword [ebp - 0x18]
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], edx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x4eb358]
mov eax, dword [ebp - 0x1c]
jmp 0x419b48
mov ecx, dword [0x4eb358]
cmp dword [eax + 4], edi
jne 0x419e8a
xor eax, eax
cmp ecx, 0xffffffff
je 0x419ce6
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x419ce0
push 0xb8
call fcn.0048b346
mov esi, eax
add esp, 4
mov dword [ebp - 0x3c], esi
cmp esi, ebx
mov dword [ebp - 4], 5
je 0x419c64
lea eax, [ebp - 0x32]
lea ecx, [esi + 0x34]
push eax
call fcn.00418660
lea ecx, [ebp - 0x38]
mov byte [ebp - 4], 6
push ecx
lea ecx, [esi + 0x44]
call fcn.00418660
lea edx, [ebp - 0x33]
lea ecx, [esi + 0x88]
push edx
mov byte [ebp - 4], 7
call fcn.00418660
lea eax, [ebp - 0x31]
lea ecx, [esi + 0x98]
push eax
mov byte [ebp - 4], 8
call fcn.00418660
mov byte [ebp - 0x54], bl
mov word [ebp - 0x52], bx
mov edx, dword [ebp - 0x54]
lea ecx, [esi + 0x28]
mov word [ebp - 0x50], bx
mov word [ebp - 0x4e], bx
mov eax, dword [ebp - 0x50]
mov dword [ecx], edx
mov dword [esi + 0x20], 0x33333333
mov dword [esi], ebx
mov dword [ecx + 4], eax
mov dword [esi + 4], ebx
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], 0x40073333
mov word [ebp - 0x4c], bx
mov word [ecx + 8], bx
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x84], ebx
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
mov byte [esi + 0xb0], bl
mov dword [esi + 0xb4], ebx
mov dword [ebp - 0x14], esi
mov eax, esi
jmp 0x419c69
xor eax, eax
mov dword [ebp - 0x14], eax
mov ecx, dword [0x4eb358]
push eax
push ecx
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, ebx
jne 0x419c9f
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x58]
push 0x4cb060
push edx
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x58], eax
call fcn.00472a64
push 8
call fcn.0048b346
add esp, 4
mov esi, eax
mov eax, dword [ebp - 0x14]
push 0x4eb360
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], ecx
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [0x4eb358]
mov eax, dword [ebp - 0x1c]
jmp 0x419ce6
mov ecx, dword [0x4eb358]
cmp dword [eax], ebx
je 0x419e8a
xor eax, eax
cmp ecx, 0xffffffff
je 0x419e73
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
jne 0x419e73
push 0xb8
call fcn.0048b346
mov esi, eax
add esp, 4
mov dword [ebp - 0x3c], esi
cmp esi, ebx
mov dword [ebp - 4], 9
je 0x419e01
lea edx, [ebp - 0x35]
lea ecx, [esi + 0x34]
push edx
call fcn.00418660
lea eax, [ebp - 0x36]
lea ecx, [esi + 0x44]
push eax
mov byte [ebp - 4], 0xa
call fcn.00418660
lea ecx, [ebp - 0x37]
mov byte [ebp - 4], 0xb
push ecx
lea ecx, [esi + 0x88]
call fcn.00418660
lea edx, [ebp - 0x34]
lea ecx, [esi + 0x98]
push edx
mov byte [ebp - 4], 0xc
call fcn.00418660
mov byte [ebp - 0x48], bl
mov word [ebp - 0x46], bx
mov ecx, dword [ebp - 0x48]
lea eax, [esi + 0x28]
mov word [ebp - 0x44], bx
mov word [ebp - 0x42], bx
mov edx, dword [ebp - 0x44]
mov dword [eax], ecx
mov dword [esi + 0x20], 0x33333333
mov dword [esi], ebx
mov dword [eax + 4], edx
mov dword [esi + 4], ebx
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov word [eax + 8], bx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x24], 0x40073333
mov word [ebp - 0x40], bx
mov dword [esi + 0x54], edi
mov dword [esi + 0x58], edi
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x64], edi
mov dword [esi + 0x68], edi
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x70], edi
mov dword [esi + 0x74], edi
mov dword [esi + 0x78], ebx
mov dword [esi + 0x7c], edi
mov dword [esi + 0x80], edi
mov dword [esi + 0x84], ebx
mov dword [esi + 0xa8], ebx
mov dword [esi + 0xac], ebx
mov byte [esi + 0xb0], bl
mov dword [esi + 0xb4], ebx
mov dword [ebp - 0x14], esi
mov eax, esi
jmp 0x419e06
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
push eax
mov eax, dword [0x4eb358]
mov dword [ebp - 4], 0xffffffff
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp eax, ebx
jne 0x419e3b
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x5c]
push 0x4cb060
push ecx
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x5c], eax
call fcn.00472a64
push 8
call fcn.0048b346
mov edx, dword [ebp - 0x14]
add esp, 4
mov esi, eax
push 0x4eb360
mov dword [esi], edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4eb35c]
push 0x4eb360
mov dword [esi + 4], eax
mov dword [0x4eb35c], esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x1b4]
mov edx, dword [ebp - 0x104]
push ecx
push edx
call dword [eax]
neg eax
sbb eax, eax
inc eax
jmp 0x419e8c
xor eax, eax
cmp eax, ebx
jne 0x419f0a
lea eax, [ebp - 0x20]
push edi
lea ecx, [ebp - 0x1d4]
push eax
push ecx
call fcn.00429fd0
mov eax, dword [ebp - 0x104]
mov ecx, dword [ebp - 0x1b4]
add esp, 0xc
cmp eax, ecx
jb 0x419a65
lea eax, [ebp - 0x1d4]
push eax
call fcn.00429d60
mov ecx, dword [ebp - 0x24]
add esp, 4
push ecx
call fcn.00471ad3
add esp, 4
lea edx, [ebp - 0x1d4]
push edx
call fcn.00429d00
mov eax, dword [ebp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x419ef5
mov eax, dword [ebp - 0x2c]
push eax
call fcn.0048b36f
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov edx, dword [ebp - 0x28]
lea eax, [ebp - 0x1d4]
push eax
mov dword [edx], 0xe
call fcn.00429d00
mov ecx, dword [ebp - 0x24]
add esp, 4
push ecx
call fcn.00471ad3
mov eax, dword [ebp + 0x18]
add esp, 4
cmp eax, ebx
jne 0x419f41
mov edx, dword [ebp - 0x2c]
push edx
call fcn.0048b36f
add esp, 4
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0x1c