Function at 0x1004b7f0
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x10]
mov ebx, dword [ebp + 0xf8]
test ebx, ebx
je 0x1004ba44
cmp word [ebx + 0x2c], 0
je 0x1004ba44
mov eax, dword [ebx + 0x38]
push esi
xor esi, esi
test eax, eax
push edi
je 0x1004b883
lea ebx, [ebx]
mov ecx, dword [eax + 0x240]
mov edi, dword [eax + 0x2c]
and ecx, 0x7fff
cmp ecx, 0x11
ja case.0x1004b83b.4
movzx ecx, byte [ecx + 0x1004ba74]
jmp dword [ecx*4 + 0x1004ba58]
mov edx, dword [eax + 0x248]
push edx
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
add eax, 7
shr eax, 2
lea esi, [esi + eax*4]
jmp case.0x1004b83b.1
add esi, 0x10
jmp case.0x1004b83b.1
add esi, 4
jmp case.0x1004b83b.1
mov eax, dword [eax + 0x248]
mov ecx, dword [eax]
add ecx, 0xa
shr ecx, 2
lea esi, [esi + ecx*4]
jmp case.0x1004b83b.1
add esi, 8
add esi, 4
test edi, edi
mov eax, edi
jne 0x1004b820
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push esi
push ebp
push ecx
mov dword [eax], esi
call fcn.1004af50
test eax, eax
jne 0x1004ba3d
mov edx, dword [0x1007eed0]
push edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [ebx + 0x38]
test edi, edi
mov esi, dword [eax + 0x38]
je 0x1004ba3b
jmp 0x1004b8c0
mov eax, dword [edi + 0x240]
mov ebp, dword [edi + 0x2c]
and eax, 0x7fff
cmp eax, 1
jne 0x1004b8f4
mov dword [esi], 0
add esi, 4
jmp 0x1004ba31
mov edx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov dword [edx], 0
xor eax, eax
pop ebx
ret 0xc
movsx ecx, word [edi + 0x23a]
mov dword [esi], ecx
movsx eax, word [edi + 0x23a]
add eax, 0xffffffff
add esi, 4
cmp eax, 0xe
mov ebx, 4
ja case.0x1004b918.12
jmp dword [eax*4 + 0x1004ba88]
mov dx, word [edi + 0x248]
neg dx
sbb edx, edx
and edx, 0xff
mov word [esi], dx
jmp case.0x1004b918.12
mov ax, word [edi + 0x248]
mov word [esi], ax
jmp case.0x1004b918.12
mov cx, word [edi + 0x248]
mov word [esi], cx
jmp case.0x1004b918.12
mov edx, dword [edi + 0x248]
mov dword [esi], edx
jmp case.0x1004b918.12
fld dword [edi + 0x248]
fstp dword [esi]
jmp case.0x1004b918.12
fld qword [edi + 0x248]
mov ebx, 8
fstp qword [esi]
jmp case.0x1004b918.12
mov eax, dword [edi + 0x248]
push eax
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ebx, eax
mov dword [esi], ebx
mov ecx, dword [edi + 0x248]
push ebx
push ecx
add esi, 4
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp case.0x1004b918.12
mov edx, dword [edi + 0x248]
push edx
call dword [sym.imp.OLEAUT32.dll_SysAllocStringByteLen]
mov ebx, eax
mov dword [esi], ebx
mov eax, dword [edi + 0x248]
add esi, 4
mov dword [esi], eax
jmp case.0x1004b918.12
mov ecx, dword [edi + 0x248]
movzx ebx, word [ecx]
mov dword [esi], ebx
mov edx, dword [edi + 0x248]
add esi, 4
add edx, 4
mov dword [esi], edx
jmp case.0x1004b918.12
mov eax, dword [edi + 0x248]
movzx ebx, word [eax]
mov dword [esi], ebx
mov ecx, dword [edi + 0x248]
push ebx
add ecx, 4
push ecx
add esi, 4
push esi
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp case.0x1004b918.12
mov edi, dword [edi + 0x248]
mov edx, dword [edi]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
mov edx, dword [edi + 0xc]
mov ebx, 0x10
mov dword [esi + 0xc], edx
add ebx, 3
shr ebx, 2
lea esi, [esi + ebx*4]
test ebp, ebp
mov edi, ebp
jne 0x1004b8c0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x14]
pop ebp
mov dword [eax], 0
xor eax, eax
pop ebx
ret 0xc