Function at 0x4912d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x7d8230]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
call fcn.0046d3e0
mov esi, eax
test si, si
je 0x4912fd
mov eax, 0xffff
jmp 0x4915cb
xor si, si
cmp dword [0x7be2a0], 0
je 0x491310
xor eax, eax
jmp 0x4915cb
mov eax, dword [0x7da158]
mov dword [ebp - 4], eax
mov dword [0x7da158], 1
call fcn.0048d8d0
mov eax, dword [ebp - 4]
mov dword [0x7da158], eax
xor di, di
mov eax, dword [ebp + 8]
test eax, eax
je 0x4915b7
mov eax, dword [ebx + 0x88]
push eax
call fcn.004a0870
pop ecx
cmp eax, 0x1000
je 0x49136e
mov eax, dword [ebp + 8]
push eax
call fcn.0049f7d0
pop ecx
push 0
push 0
push 0
push 0x232a
call fcn.00492ef0
add esp, 0x10
mov eax, dword [0x7d80f0]
cmp dword [ebx + 0x8c], eax
jne 0x491398
mov eax, dword [ebp + 8]
push eax
call fcn.0049f7d0
pop ecx
push 0
push 0
push 0
push 0x232b
call fcn.00492ef0
add esp, 0x10
lea eax, [ebx + 0x8c]
inc dword [eax]
mov eax, dword [ebp + 8]
push eax
call fcn.00491ae0
pop ecx
mov word [ebx + 0x90], ax
mov eax, dword [ebx + 0x84]
test eax, eax
je 0x4913ec
mov edx, dword [ebp + 8]
mov dword [eax + 4], edx
mov eax, dword [ebx + 0x84]
mov edx, dword [ebx + 0x88]
mov dword [eax + 0x10], edx
mov eax, dword [ebx + 0x84]
push eax
call dword [eax]
pop ecx
mov dword [ebp - 8], eax
mov eax, dword [ebx + 0x84]
mov dword [eax + 4], 0
jmp 0x491444
cmp dword [0x7be2a4], 0
je 0x49142c
mov eax, dword [ebx + 0x88]
mov eax, dword [eax + 0x10]
mov edx, dword [0x7be2a8]
mov edx, dword [edx + 0x10]
cmp eax, edx
jne 0x49142c
mov eax, dword [ebp + 8]
push eax
call fcn.0046d240
pop ecx
lea eax, [ebx + 0x8c]
dec dword [eax]
call fcn.0048d9a0
mov eax, 0xffff
jmp 0x4915cb
mov eax, dword [ebp + 8]
push eax
push 1
mov eax, dword [ebx + 0x88]
push eax
call fcn.0048fb60
add esp, 0xc
mov dword [ebp - 8], eax
lea eax, [ebx + 0x8c]
dec dword [eax]
call fcn.0046d3e0
mov edi, eax
movzx eax, di
cmp eax, 1
jne 0x491493
mov eax, dword [ebp - 8]
test eax, eax
je 0x491469
push eax
call fcn.0049f7d0
pop ecx
mov eax, dword [ebp + 8]
push eax
call fcn.0049f7d0
pop ecx
mov dword [0x7d80f4], 0
call fcn.0048d9a0
call fcn.0045b7d0
push eax
call fcn.00533dc0
pop ecx
jmp 0x4915bb
movzx eax, di
cmp eax, 2
je 0x4914a0
cmp eax, 4
jne 0x4914b7
mov eax, dword [ebp - 8]
test eax, eax
je 0x4914ae
push eax
call fcn.0049f7d0
pop ecx
mov si, 0xffff
jmp 0x4915bb
mov eax, dword [ebp - 8]
test eax, eax
je 0x491598
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
push eax
call fcn.004920f0
pop ecx
mov word [ebp - 0xa], ax
mov eax, dword [ebp - 8]
push eax
call fcn.004a0870
pop ecx
cmp eax, 0x80
jne 0x4914f1
movzx eax, word [ebp - 0xa]
and eax, 2
je 0x4914fa
mov dword [ebp - 0x10], 1
jmp 0x491543
mov eax, dword [ebp - 8]
push eax
call fcn.0049fc50
pop ecx
test eax, eax
je 0x491511
mov dword [ebp - 0x14], 1
jmp 0x491518
mov dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x14]
mov esi, eax
test si, si
jne 0x49152b
movzx eax, word [ebp - 0xa]
and eax, 4
je 0x49153c
movzx eax, si
cmp eax, 1
jne 0x491543
movzx eax, word [ebp - 0xa]
and eax, 1
jne 0x491543
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 8]
push eax
call fcn.0049f7d0
pop ecx
cmp dword [ebp - 0x10], 0
je 0x491570
mov eax, dword [ebp + 8]
push eax
call fcn.0049f7d0
pop ecx
push 0
push 0
push 0
push 0x2329
call fcn.00492ef0
add esp, 0x10
movzx eax, si
cmp eax, 1
jne 0x4915bb
mov eax, dword [ebp + 8]
push eax
call fcn.00492060
pop ecx
movzx eax, ax
inc eax
movzx eax, ax
push eax
mov eax, dword [ebp + 8]
push eax
call fcn.004920b0
add esp, 8
jmp 0x4915bb
mov eax, dword [ebp + 8]
push eax
call fcn.0049f7d0
pop ecx
push 0
push 0
push 0
push 0x2329
call fcn.00492ef0
add esp, 0x10
jmp 0x4915bb
mov si, 1
movzx eax, di
cmp eax, 1
je 0x4915c8
call fcn.0048d9a0
movzx eax, si
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret