Function at 0x40eeb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x4c
test edx, edx
je 0x40f498
mov eax, dword [esp + 0x60]
test eax, eax
jle 0x40f468
mov dword [esp + 4], 0x45
mov esi, edx
mov dword [esp], 0x472020
call fcn.00408420
mov dword [eax + 4], 0x3c
mov edi, eax
lea eax, [eax + 8]
mov dword [eax - 8], 0x3c
mov dword [esp + 8], esi
mov dword [esp + 4], 0x4731a0
mov dword [esp], eax
call fcn.00403100
mov ecx, edi
mov edx, eax
call fcn.00408790
mov edi, eax
test eax, eax
je 0x40f4d0
mov edx, dword [eax]
mov ecx, dword [ebx]
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
mov ebp, dword [ebx]
lea ecx, [edi + 8]
mov eax, dword [ebp]
lea edx, [ebp + eax + 8]
mov eax, dword [edi]
mov dword [esp + 4], ecx
mov dword [esp], edx
add eax, 1
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [edi]
add dword [ebp], eax
mov ecx, dword [ebx]
mov edx, 1
mov ebp, esi
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
mov eax, dword [ebx]
mov ecx, 0x22
mov edx, dword [eax]
mov word [eax + edx + 8], cx
add dword [eax], 1
mov eax, dword [esp + 0x60]
add eax, esi
mov dword [esp + 0x1c], eax
jmp 0x40f11a
jbe 0x40f21b
lea eax, [edx - 0xb]
cmp al, 0x14
ja 0x40f221
mov dword [esp + 4], 0x29
mov dword [esp], 0x472020
mov byte [esp + 0x20], dl
call fcn.00408420
movzx edx, byte [esp + 0x20]
lea ecx, [esp + 0x3c]
mov dword [eax + 4], 0x20
mov dword [eax], 0
mov dword [esp], edx
mov dword [esp + 4], 0
mov dword [esp + 0x3c], eax
call fcn.004088d0
sub esp, 8
mov edi, dword [esp + 0x3c]
test edi, edi
je 0x40f428
mov eax, dword [edi]
mov dword [esp], 0x472020
lea edx, [eax + 1]
mov eax, 7
cmp edx, eax
cmovl edx, eax
lea eax, [edx + 9]
mov dword [esp + 0x20], edx
mov dword [esp + 4], eax
call fcn.00408420
mov edx, dword [esp + 0x20]
lea ecx, [edi + 8]
mov esi, eax
lea eax, [eax + 8]
mov dword [eax - 4], edx
lea edx, [esi + 9]
mov dword [esp + 0x20], eax
mov eax, 0x5c
mov word [esi + 8], ax
mov dword [esi], 1
mov eax, dword [edi]
mov dword [esp], edx
add eax, 1
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call sub.msvcrt.dll_memcpy
mov edx, dword [edi]
add edx, 1
mov dword [esi], edx
mov ecx, dword [ebx]
call fcn.00408ef0
mov dword [esp], ebx
mov edi, eax
call fcn.00406db0
test al, al
jne 0x40f0e8
test edi, edi
je 0x40f076
add dword [edi - 8], 8
mov eax, dword [ebx]
cmp eax, 0xfff
jbe 0x40f0e8
mov ecx, dword [eax - 8]
lea edx, [eax - 8]
mov dword [esp + 0x24], edx
sub ecx, 8
mov dword [eax - 8], ecx
cmp ecx, 7
ja 0x40f0e8
mov eax, dword [0x49c308]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x28], eax
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
add eax, 0x2c
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.00405190
lea esi, [esi]
mov dword [ebx], edi
mov eax, dword [edi]
lea ecx, [edi + eax + 8]
mov eax, dword [esi]
mov dword [esp], ecx
add eax, 1
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 4], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [esi]
add dword [edi], eax
add ebp, 1
cmp dword [esp + 0x1c], ebp
je 0x40f1eb
movsx edx, byte [ebp]
cmp dl, 0x22
je 0x40f380
ja 0x40f2b0
cmp dl, 0xa
jne 0x40ef90
mov ecx, dword [ebx]
mov edx, 6
call fcn.00408ef0
mov dword [esp], ebx
mov esi, eax
call fcn.00406db0
test al, al
jne 0x40f1c0
test esi, esi
je 0x40f158
add dword [esi - 8], 8
mov eax, dword [ebx]
cmp eax, 0xfff
jbe 0x40f1c0
mov edi, dword [eax - 8]
lea ecx, [eax - 8]
mov dword [esp + 0x20], ecx
lea edx, [edi - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40f1c0
mov edi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x24], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x24]
add edi, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.00405190
lea esi, [esi]
nop
mov dword [ebx], esi
mov eax, dword [esi]
mov edx, 0x220a
add ebp, 1
lea eax, [esi + eax + 8]
mov dword [eax], 0x2230315c
mov word [eax + 4], dx
mov byte [eax + 6], 0
add dword [esi], 6
cmp dword [esp + 0x1c], ebp
jne 0x40f11a
mov ecx, dword [ebx]
mov edx, 1
mov ebp, 0x22
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
mov eax, dword [ebx]
mov edx, dword [eax]
mov word [eax + edx + 8], bp
add dword [eax], 1
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 4
jne 0x40efa1
mov ecx, dword [ebx]
call fcn.00408ff0
mov dword [esp], ebx
mov esi, eax
call fcn.00406db0
test al, al
jne 0x40f2a0
test esi, esi
je 0x40f23e
add dword [esi - 8], 8
mov eax, dword [ebx]
cmp eax, 0xfff
jbe 0x40f2a0
mov edi, dword [eax - 8]
lea ecx, [eax - 8]
mov dword [esp + 0x20], ecx
lea edx, [edi - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40f2a0
mov edi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x24], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x24]
add edi, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.00405190
lea esi, [esi]
mov dword [ebx], esi
jmp 0x40f10d
cmp dl, 0x5c
jne 0x40f360
mov ecx, dword [ebx]
mov edx, 2
call fcn.00408c60
mov dword [esp], ebx
mov esi, eax
call fcn.00406db0
test al, al
jne 0x40f340
test esi, esi
je 0x40f2db
add dword [esi - 8], 8
mov eax, dword [ebx]
cmp eax, 0xfff
jbe 0x40f340
mov edi, dword [eax - 8]
lea ecx, [eax - 8]
mov dword [esp + 0x20], ecx
lea edx, [edi - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40f340
mov edi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x24], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x24]
add edi, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.00405190
lea esi, [esi]
mov dword [ebx], esi
mov eax, dword [esi]
mov ecx, 0x5c5c
lea eax, [esi + eax + 8]
mov word [eax], cx
mov byte [eax + 2], 0
add dword [esi], 2
jmp 0x40f10d
cmp dl, 0x5b
jbe 0x40f221
cmp dl, 0x7e
ja 0x40efa1
jmp 0x40f221
mov ecx, dword [ebx]
mov edx, 2
call fcn.00408c60
mov dword [esp], ebx
mov esi, eax
call fcn.00406db0
test al, al
jne 0x40f408
test esi, esi
je 0x40f3a2
add dword [esi - 8], 8
mov eax, dword [ebx]
cmp eax, 0xfff
jbe 0x40f408
mov edi, dword [eax - 8]
lea ecx, [eax - 8]
mov dword [esp + 0x20], ecx
lea edx, [edi - 8]
mov dword [eax - 8], edx
cmp edx, 7
ja 0x40f408
mov edi, dword [0x49c308]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x24], eax
mov dword [esp], edi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x24]
add edi, 0x2c
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov ecx, dword [esp + 0x20]
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.00405190
lea esi, [esi]
mov dword [ebx], esi
mov eax, dword [esi]
mov edi, 0x225c
lea eax, [esi + eax + 8]
mov word [eax], di
mov byte [eax + 2], 0
add dword [esi], 2
jmp 0x40f10d
mov dword [esp + 4], 0x10
mov edi, 0x5c
mov dword [esp], 0x472020
call fcn.00408420
mov edx, 1
mov dword [eax + 4], 7
mov esi, eax
lea eax, [eax + 8]
mov dword [esp + 0x20], eax
mov word [esi + 8], di
mov dword [esi], 1
jmp 0x40f059
mov ecx, dword [ecx]
mov edx, 1
mov esi, 0x22
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
mov eax, dword [ebx]
mov edx, dword [eax]
mov word [eax + edx + 8], si
add dword [eax], 1
jmp 0x40f1eb
mov ecx, dword [ecx]
mov edx, 3
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
mov eax, dword [ebx]
mov edx, dword [eax]
mov dword [eax + edx + 8], 0x6c696e
add dword [eax], 3
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov ecx, dword [ebx]
xor edx, edx
call fcn.00408ef0
mov ecx, ebx
mov edx, eax
call fcn.00406e10
jmp 0x40ef55