Function at 0x4f7d10
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x38
test byte [eax + 0x2990], 4
push ebx
push esi
push edi
je 0x4f7d35
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
cmp dword [eax + 0x10], 1
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], ecx
jbe 0x4f828e
mov edi, 1
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], ecx
jmp 0x4f7d56
mov eax, ecx
mov ebx, dword [eax + 0x14]
mov eax, dword [ebp - 0x18]
mov eax, dword [ebx + eax]
mov ecx, dword [eax + 0x38]
mov dword [ebp - 8], eax
mov eax, ecx
and eax, 0xf0000000
cmp eax, 0x10000000
jb 0x4f8190
cmp eax, 0x40000000
ja 0x4f8190
mov esi, ecx
and esi, 0xfff00000
cmp esi, 0x23400000
je 0x4f8190
cmp esi, 0x23500000
je 0x4f8190
cmp esi, 0x23600000
je 0x4f8190
cmp esi, 0x10600000
ja 0x4f7dd0
je 0x4f8190
cmp esi, 0x10300000
je 0x4f8190
cmp esi, 0x10500000
jmp 0x4f7dd6
cmp esi, 0x10700000
je 0x4f8190
mov ecx, dword [ebp + 8]
cmp edi, dword [ecx + 0x10]
mov edx, edi
jae 0x4f8190
lea eax, [ebx + edi*4]
mov ebx, ecx
nop
mov ecx, dword [eax]
test dword [ecx + 0x38], 0xfff00000
mov dword [ebp - 0x2c], ecx
jne 0x4f7e0e
add edx, 1
add eax, 4
cmp edx, dword [ebx + 0x10]
jb 0x4f7df0
jmp 0x4f8190
mov edx, dword [ecx + 0x38]
and edx, 0xfff00000
cmp edx, esi
jne 0x4f8190
add dword [ebx + 0x1980], 1
mov al, byte [ebx + 0x1978]
mov edx, dword [ebp - 8]
mov ecx, dword [ecx + 0xc]
mov edi, dword [ecx]
mov byte [ebp - 1], al
mov eax, dword [edx + 0xc]
mov esi, dword [eax]
call fcn.004fb7a0
test al, al
je 0x4f818d
mov ebx, dword [ebp - 0x2c]
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx]
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0xc]
mov edx, dword [edx]
mov ecx, dword [ecx + 0x48]
cmp ecx, dword [edx + 0x48]
jne 0x4f818d
mov ecx, dword [eax + 0x38]
mov eax, dword [eax]
and ecx, 0xfffff
xor edx, edx
div ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebx + 0x38]
and ecx, 0xfffff
mov dword [ebp - 0x2c], ecx
xor ecx, ecx
mov dword [ebp - 0xc], ecx
cmp eax, ecx
mov dword [ebp - 0x10], eax
jbe 0x4f7ef6
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + 8]
mov edx, dword [ebx + 4]
push eax
mov eax, dword [ebp - 0x20]
mov esi, dword [edx + eax]
mov edx, dword [ebp - 0x24]
mov edi, dword [ecx + edx]
call fcn.005004a0
test al, al
je 0x4f7ef6
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 0x20]
mov edx, dword [eax + ecx]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ecx + eax]
mov eax, dword [ecx + 0x48]
cmp eax, dword [edx + 0x48]
jne 0x4f7ef6
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
add ecx, ecx
add ecx, ecx
add dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x14]
add ecx, ecx
add ecx, ecx
add dword [ebp - 0x24], ecx
add eax, 1
cmp eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
jb 0x4f7e95
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x10]
jne 0x4f818d
mov esi, dword [ebp - 8]
xor edi, edi
cmp dword [ebx], edi
jbe 0x4f7f32
jmp 0x4f7f10
mov edx, dword [esi + 8]
mov ecx, dword [ebx + 4]
mov eax, dword [esi + 0xc]
push edx
mov edx, dword [ecx + edi*4]
mov ecx, dword [ebp + 8]
push eax
push edx
call fcn.004f7c70
test al, al
jne 0x4f7f32
add edi, 1
cmp edi, dword [ebx]
jb 0x4f7f10
cmp edi, dword [ebx]
jne 0x4f818d
mov edx, dword [esi + 8]
test edx, edx
mov dword [ebp - 0x24], 0
jbe 0x4f7f67
mov eax, dword [esi + 0xc]
jmp 0x4f7f50
mov ecx, dword [eax]
mov ecx, dword [ecx + 0x2c]
mov edi, 1
shl edi, cl
add eax, 4
or dword [ebp - 0x24], edi
sub edx, 1
jne 0x4f7f50
xor eax, eax
cmp dword [ebx + 8], eax
jbe 0x4f7f8f
mov edx, dword [ebx + 0xc]
mov ecx, dword [edx]
mov ecx, dword [ecx + 0x2c]
mov edi, 1
shl edi, cl
mov ecx, dword [ebp - 0x24]
test ecx, edi
jne 0x4f7f8f
add eax, 1
add edx, 4
cmp eax, dword [ebx + 8]
jb 0x4f7f71
cmp eax, dword [ebx + 8]
jne 0x4f818d
mov eax, dword [ebp + 8]
add dword [eax + 0x197c], 1
cmp byte [ebp - 1], 0
je 0x4f818d
test byte [eax + 0xa8], 2
je 0x4f8049
xor ecx, ecx
cmp dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
jbe 0x4f8040
mov edx, dword [ebp - 0x14]
xor eax, eax
test edx, edx
jbe 0x4f7ff6
mov edi, dword [esi + 0x38]
and edi, 0xfffff
imul edi, ecx
mov ecx, dword [esi + 4]
lea ecx, [ecx + edi*4]
mov edi, dword [ecx]
cmp dword [edi + 0x2c], eax
jne 0x4f7ff3
add eax, 1
add ecx, 4
cmp eax, edx
jb 0x4f7fe2
mov ecx, dword [ebp - 0xc]
cmp eax, edx
jne 0x4f8040
mov edx, dword [ebp - 0x2c]
xor eax, eax
test edx, edx
jbe 0x4f8031
mov esi, dword [ebx + 0x38]
and esi, 0xfffff
imul esi, ecx
mov ecx, dword [ebx + 4]
lea ecx, [ecx + esi*4]
mov esi, dword [ebp - 0x14]
mov edi, dword [ecx]
add esi, eax
cmp dword [edi + 0x2c], esi
jne 0x4f802b
add eax, 1
add ecx, 4
cmp eax, edx
jb 0x4f8015
mov ecx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
cmp eax, edx
jne 0x4f8040
add ecx, 1
cmp ecx, dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
jb 0x4f7fc7
cmp ecx, dword [ebp - 0x10]
jne 0x4f818d
mov eax, dword [esi + 0x38]
mov edi, dword [ebx + 8]
add edi, dword [esi + 8]
mov ecx, dword [ebx]
add ecx, dword [esi]
and eax, 0xfff00000
mov edx, eax
push edi
xor edx, edi
push ecx
mov ecx, dword [ebp + 8]
and edx, 0xfffff
xor edx, eax
push edx
lea eax, [ebp - 0x28]
push eax
push ecx
call fcn.004ca530
test eax, eax
mov esi, dword [ebp - 0x28]
mov dword [ebp - 0x30], eax
jl 0x4f81b2
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x30]
mov dword [esi + 0x30], edx
mov ecx, dword [eax + 0x34]
mov dword [esi + 0x34], ecx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov ecx, dword [esi + 0xc]
add edx, edx
add edx, edx
push edx
push eax
push ecx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebp - 8]
add edx, edx
add esp, 0xc
add edx, edx
push edx
mov edx, dword [ecx + 8]
push eax
mov eax, dword [esi + 0xc]
lea ecx, [eax + edx*4]
push ecx
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x10], 0
jbe 0x4f815c
mov edx, dword [ebp - 0x2c]
xor eax, eax
lea ecx, [edi*4]
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x24], eax
lea eax, [edx*4]
mov edx, dword [ebp - 0x10]
add edi, edi
add edi, edi
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x14], edx
lea esp, [esp]
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 4]
add ecx, dword [ebp - 0x24]
mov edx, dword [esi + 4]
add edx, dword [ebp - 0xc]
push edi
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebx + 4]
mov eax, dword [ebp - 0x30]
add ecx, dword [ebp - 0x20]
mov edx, dword [esi + 4]
add edx, dword [ebp - 0x2c]
add esp, 0xc
push eax
push ecx
push edx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x30]
add dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x34]
add dword [ebp - 0x24], edi
add dword [ebp - 0xc], eax
add dword [ebp - 0x2c], eax
add esp, 0xc
sub dword [ebp - 0x14], 1
jne 0x4f8110
mov ecx, dword [ebp - 8]
mov eax, dword [ebp + 8]
push 1
push ecx
lea edx, [ebp - 0x28]
push edx
push 1
push eax
call fcn.004caa20
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 0x30], eax
jl 0x4f81b2
sub dword [ebp - 0x18], 4
sub dword [ebp - 0x1c], 1
mov dword [ebp - 0x28], ecx
mov dword [ebx + 0x38], ecx
mov dword [ebx], ecx
mov dword [ebx + 8], ecx
mov edi, dword [ebp - 0x1c]
mov ecx, dword [ebp + 8]
add dword [ebp - 0x18], 4
add edi, 1
cmp edi, dword [ecx + 0x10]
mov dword [ebp - 0x1c], edi
jb 0x4f7d54
mov eax, dword [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ebx, ebx
cmp esi, ebx
je 0x4f828e
cmp word [esi + 0x3c], bx
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
je 0x4f8207
mov eax, dword [0x776138]
cmp eax, ebx
jge 0x4f81d5
xor eax, eax
jmp 0x4f81d8
push eax
call edi
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x4f8200
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, ebx
lea eax, [ecx + eax - 0x10]
je 0x4f8200
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3c], bx
mov dword [esi + 4], ebx
cmp word [esi + 0x3e], bx
je 0x4f824c
mov eax, dword [0x776138]
cmp eax, ebx
jge 0x4f821a
xor eax, eax
jmp 0x4f821d
push eax
call edi
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x4f8245
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, ebx
lea eax, [ecx + eax - 0x10]
je 0x4f8245
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3e], bx
mov dword [esi + 0xc], ebx
mov eax, dword [0x776138]
cmp eax, ebx
jl 0x4f828e
push eax
call edi
mov edi, eax
cmp edi, ebx
je 0x4f828e
push 0x40
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], ebx
mov eax, dword [edi + 0x14]
add esp, 0xc
cmp eax, ebx
je 0x4f8288
mov dword [eax], esi
mov eax, dword [ebp - 0x30]
mov dword [edi + 0x14], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], esi
mov eax, dword [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4