Function at 0x4f42c0
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x254
push ebx
push esi
mov esi, eax
mov eax, dword [ebp + 0xc]
push edi
mov edi, dword [eax + 0x3c]
mov eax, 1
add dword [esi + 8], eax
mov ebx, ecx
xor ecx, ecx
and edi, 0xfffff
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], 2
mov dword [esp + 0x1c], 3
cmp byte [esi], cl
je 0x4f451a
push 0x80
push ecx
lea ecx, [esp + 0xa8]
push ecx
call sub.msvcrt.dll_memset
add esp, 0xc
push 0x80
lea edx, [esp + 0x24]
push 0
push edx
call sub.msvcrt.dll_memset
mov eax, dword [ebp + 0x10]
add esp, 0xc
push eax
push edi
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x12c]
push edx
mov edx, dword [ebx]
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0xb4]
push ecx
mov ecx, dword [ebp + 8]
push edx
push eax
call fcn.004f3a10
mov edi, eax
test edi, edi
jl 0x4f44b9
jne 0x4f448e
cmp byte [esi], 0
jne 0x4f4389
mov edi, 1
add dword [esi + 4], edi
jmp 0x4f4492
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
inc dword [esi + 4]
lea ecx, [esp + 0xa0]
push ecx
push edx
push ebx
push eax
lea esi, [esp + 0x1d0]
call fcn.004f3080
mov edi, eax
test edi, edi
jl 0x4f44b9
xor esi, esi
cmp dword [ebx + 4], esi
jbe 0x4f4408
lea ecx, [esp + 0x20]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0xc]
push edx
lea eax, [esp + 0xa4]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [ebp + 0xc]
lea edx, [esp + 0x12c]
push edx
lea eax, [esp + 0x1d0]
push eax
push ebx
push ecx
mov ecx, dword [ebp + 8]
mov eax, esi
call fcn.004f34a0
mov edi, eax
test edi, edi
jl 0x4f44b9
add dword [esp + 0xc], 4
inc esi
cmp esi, dword [ebx + 4]
jb 0x4f43c2
mov eax, dword [ebx + 4]
cmp eax, 1
jne 0x4f4434
mov edx, dword [esp + 0x20]
mov esi, dword [ebp + 0xc]
push edx
push esi
call fcn.0050b3a0
mov edi, eax
test edi, edi
jl 0x4f44b9
or edx, 0xffffffff
mov ecx, esi
call fcn.004670b0
jmp 0x4f448e
mov dword [esp + 0xc], 0
test eax, eax
jbe 0x4f4475
mov eax, dword [esp + 0xc]
mov eax, dword [esp + eax*4 + 0x20]
mov esi, dword [ebp + 8]
push eax
call fcn.00508740
mov edi, eax
test edi, edi
jl 0x4f44b9
mov ecx, dword [esp + 0xc]
mov ecx, dword [esp + ecx*4 + 0x20]
or edx, 0xffffffff
call fcn.004670b0
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, dword [ebx + 4]
jb 0x4f4440
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebx + 4]
mov edi, dword [ebp + 8]
push 1
push edx
lea eax, [esp + 0x28]
push eax
push ecx
call fcn.00508f00
mov edi, eax
test edi, edi
jl 0x4f44b9
cmp dword [ebx + 4], 1
jne 0x4f4518
mov esi, dword [esp + 0x20]
test esi, esi
je 0x4f4518
call fcn.0050a890
call fcn.0050cb90
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor eax, eax
mov dword [esp + 0xc], eax
nop
mov esi, dword [esp + eax*4 + 0x20]
test esi, esi
je 0x4f450a
call fcn.0050a890
mov eax, dword [0x551d48]
test eax, eax
jl 0x4f450a
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
je 0x4f450a
push 0x44
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [ebx + 0x18]
add esp, 0xc
test eax, eax
je 0x4f4504
mov dword [eax], esi
jmp 0x4f4507
mov dword [ebx + 0x14], esi
mov dword [ebx + 0x18], esi
mov eax, dword [esp + 0xc]
inc eax
mov dword [esp + 0xc], eax
cmp eax, 0x20
jb 0x4f44c0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc