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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4a1348
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0xc], esi
call fcn.0041dc20
cmp eax, 2
jne 0x41d89d
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x41d8a3
jmp 0x41d8a2
cmp eax, 3
jne 0x41d8a3
int3
mov eax, dword [0x4da0cc]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x28], eax
cmp eax, esi
jne 0x41d8bf
mov dword [esp + 0x28], 0x4d79e4
mov ecx, dword [0x4da0cc]
push 0x4d79e4
push ecx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, 0x4da0d0
mov dword [esp + 0x3c], esi
call fcn.00434680
mov dl, byte [eax]
mov byte [esp + 0x2c], dl
mov al, byte [eax + 1]
mov byte [esp + 0x2d], al
mov eax, 0x4da0d0
call fcn.00434680
xor ebx, ebx
cmp byte [esp + 0x2d], bl
mov eax, 0x4da0d0
setne bl
call fcn.00434680
mov byte [eax + 1], bl
mov eax, 0x4da0d0
call fcn.00434680
mov byte [eax], 1
mov edi, 1
mov dword [esp + 0x3c], edi
cmp byte [0x4d746e], 0
je 0x41d93f
mov eax, 0x4da0f8
call fcn.00434680
cmp byte [eax + 1], 0
je 0x41da94
mov edx, dword [ebp + 0x14]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d947
sub eax, esi
sar eax, 1
push edx
lea ecx, [esp + 0x18]
push ecx
mov esi, eax
call fcn.00419c10
mov edx, dword [ebp + 0x10]
mov eax, edx
mov byte [esp + 0x3c], 2
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d970
sub eax, esi
push edx
sar eax, 1
lea edx, [esp + 0x14]
push edx
mov esi, eax
call fcn.00419c10
mov edx, dword [ebp + 0xc]
mov eax, edx
mov byte [esp + 0x3c], 3
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41d9a0
sub eax, esi
sar eax, 1
push edx
lea ecx, [esp + 0x10]
push ecx
mov esi, eax
call fcn.00419c10
mov ecx, dword [ebp + 8]
lea edx, [esp + 0xc]
push edx
lea eax, [esp + 0x1c]
push eax
push ecx
mov bl, 4
lea ecx, [esp + 0x20]
lea edx, [esp + 0x1c]
mov byte [esp + 0x48], bl
call fcn.004229f0
push eax
mov byte [esp + 0x40], 5
call fcn.0041cfa0
mov byte [esp + 0x40], bl
mov eax, dword [esp + 0x1c]
add esp, 4
push eax
mov edi, eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41da0d
mov ebx, dword [edi + 8]
mov esi, 0x4da170
call fcn.00432310
mov byte [esp + 0x3c], 3
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41da2e
mov ebx, dword [edi + 8]
mov esi, 0x4da170
call fcn.00432310
mov byte [esp + 0x3c], 2
mov edi, dword [esp + 0x10]
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41da4f
mov ebx, dword [edi + 8]
mov esi, 0x4da170
call fcn.00432310
mov byte [esp + 0x3c], 1
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x41da70
mov ebx, dword [edi + 8]
mov esi, 0x4da170
call fcn.00432310
lea edx, [esp + 0x28]
push edx
mov dword [esp + 0x40], 0xffffffff
call fcn.00434620
mov ecx, dword [esp + 0x34]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
push 0x14
call fcn.00445fb4
add esp, 4
mov dword [esp + 0x1c], eax
cmp eax, esi
jne 0x41daab
call fcn.0041cdf0
mov dword [esp + 0x24], eax
mov edx, dword [ebp + 0x14]
mov eax, edx
mov byte [esp + 0x3c], 6
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41dac0
sub eax, esi
sar eax, 1
push edx
lea ecx, [esp + 0x1c]
push ecx
mov esi, eax
call fcn.00419c10
mov edx, dword [ebp + 0x10]
mov ebx, 7
mov eax, edx
mov byte [esp + 0x3c], bl
mov dword [esp + 0xc], edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41daf1
sub eax, esi
push edx
sar eax, 1
lea edx, [esp + 0x18]
push edx
mov esi, eax
call fcn.00419c10
mov edx, dword [ebp + 0xc]
mov eax, edx
mov dword [esp + 0x3c], 8
mov dword [esp + 0xc], 3
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41db25
sub eax, esi
sar eax, 1
push edx
lea ecx, [esp + 0x14]
push ecx
mov esi, eax
call fcn.00419c10
lea edx, [esp + 0x18]
push edx
mov edx, dword [ebp + 8]
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push ecx
push edx
mov dword [esp + 0x4c], 9
push eax
mov dword [esp + 0x20], ebx
call fcn.0041c170
push 0x4cac0c
lea ecx, [esp + 0x24]
mov dword [esp + 0x40], 0xc
push ecx
mov dword [esp + 0x28], eax
call fcn.00452eff
int3