Function at 0x409e90
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x8c
mov edx, dword [0x49846c]
mov dword [ebp - 0x6c], ecx
mov byte [ebp - 0x61], 1
test edx, edx
je 0x409fcf
mov ebx, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x10]
sub esp, 4
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
mov dword [ebx + 0x10], eax
lea eax, [ebp - 0x58]
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll__setjmp3
mov dword [ebp - 0x5c], eax
test eax, eax
jne 0x409fe8
mov eax, dword [ebp - 0x6c]
xor esi, esi
test eax, eax
je 0x409f88
mov dword [esp], eax
mov edi, 7
call sub.msvcrt.dll_strlen
mov esi, dword [0x49c308]
cmp eax, edi
mov ebx, eax
cmovge edi, eax
lea edx, [edi + 9]
mov dword [ebp - 0x7c], edx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], esi
mov dword [ebp - 0x78], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp - 0x78]
sub esp, 4
mov esi, eax
mov dword [esp], ecx
add esi, 0x20
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x7c]
mov ecx, 0x472020
sub esp, 4
mov dword [esp], esi
call fcn.004082e0
mov dword [eax + 4], edi
mov edi, dword [ebp - 0x6c]
sub esp, 4
mov esi, eax
mov dword [eax], ebx
lea eax, [eax + 8]
add ebx, 1
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_memcpy
mov ecx, esi
call dword [0x49846c]
mov ebx, dword [0x49c308]
mov byte [ebp - 0x61], 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebx + 0x10]
sub esp, 4
mov eax, dword [eax]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x5c]
test eax, eax
jne 0x40a0de
movzx eax, byte [ebp - 0x61]
test al, al
jne 0x40a0ef
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [0x49c308]
mov dword [ebp - 0x74], ecx
call ecx
mov edx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], ebx
mov esi, eax
mov dword [ebp - 0x70], edx
call edx
mov edi, dword [sym.imp.KERNEL32.dll_SetLastError]
mov ebx, eax
sub esp, 4
mov dword [esp], esi
call edi
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebp - 0x74]
sub esp, 4
mov eax, dword [eax]
mov dword [ebp - 0x5c], 0
mov dword [ebx + 0x10], eax
mov ebx, dword [0x49c308]
call ecx
mov edx, dword [ebp - 0x70]
mov esi, eax
mov dword [esp], ebx
call edx
sub esp, 4
mov ebx, eax
mov dword [esp], esi
call edi
mov eax, dword [ebx + 0x14]
sub esp, 4
mov esi, dword [eax + 0x14]
lea eax, [ebx + 0x14]
mov dword [esp], eax
call fcn.00406db0
test al, al
jne 0x40a0d0
test esi, esi
je 0x40a06a
add dword [esi - 8], 8
mov eax, dword [ebx + 0x14]
cmp eax, 0xfff
jbe 0x40a0d0
lea edx, [eax - 8]
mov dword [ebp - 0x80], edx
mov edx, dword [eax - 8]
lea ecx, [edx - 8]
mov dword [eax - 8], ecx
cmp ecx, 7
ja 0x40a0d0
mov edi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x84], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [ebp - 0x84]
sub esp, 4
mov edi, eax
mov dword [esp], ecx
add edi, 0x2c
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x80]
sub esp, 4
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.00405190
lea esi, [esi]
mov eax, dword [ebp - 0x5c]
mov dword [ebx + 0x14], esi
test eax, eax
je 0x409fcf
call fcn.00409de0
movzx eax, byte [ebp - 0x61]
test al, al
je 0x409fdb
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov dword [esp], 0
call dword [sym.imp.USER32.dll_MessageBoxA]
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret