Function at 0x50e870
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
mov ecx, dword [ebp + 0xc]
xor eax, eax
push ebx
mov ebx, dword [ecx + 8]
push esi
mov esi, dword [ebp + 0x10]
xor edx, edx
push edi
mov dword [ebp - 4], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], edx
mov dword [esi], eax
mov dword [ebp - 0x18], eax
cmp ebx, eax
jbe 0x50e94b
mov ecx, dword [ecx + 0xc]
mov edx, dword [ecx + eax*4]
mov eax, dword [edx + 8]
mov ecx, dword [edx + 0xc]
mov ebx, dword [ebp + 8]
mov esi, eax
and esi, 0x800
mov dword [ebp - 0x1c], ecx
xor edi, edi
mov ecx, esi
or ecx, edi
je 0x50e903
test byte [ebx + 0x3734], 8
jne 0x50e903
mov ecx, dword [edx + 0x10]
mov ecx, dword [ecx + 8]
and ecx, 0x40211028
xor ebx, ebx
or ecx, ebx
jne 0x50e900
and eax, 0x100
or eax, ecx
je 0x50e8fb
mov eax, dword [ebp + 8]
inc dword [eax + 0x948]
cmp byte [eax + 0x940], bl
je 0x50e933
inc dword [ebp - 0x14]
jmp 0x50e933
mov ebx, dword [ebp + 8]
or esi, edi
je 0x50e933
mov edx, dword [edx + 0x10]
mov ecx, dword [edx + 8]
and ecx, 0x44210008
xor edx, edx
or ecx, edx
jne 0x50e933
and eax, 0x100
or eax, ecx
je 0x50e930
inc dword [ebx + 0x948]
cmp byte [ebx + 0x940], cl
je 0x50e933
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp + 0xc]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, ebx
jb 0x50e8a4
mov edx, dword [ebp - 0x10]
mov eax, dword [ecx + 0x3c]
and eax, 0xfff00000
cmp eax, 0x10000000
jne 0x50e95e
cmp edx, ebx
je 0x50e967
mov esi, dword [ebp - 0x14]
add esi, edx
cmp esi, ebx
jae 0x50e9c2
xor edi, edi
cmp eax, 0x10000000
jne 0x50e9b4
test ebx, ebx
jbe 0x50e9a6
mov esi, dword [ecx + 4]
mov ecx, dword [esi]
cmp ecx, 0xffffffff
je 0x50e99e
mov eax, dword [ecx + 0x10]
mov eax, dword [eax + 8]
and eax, 0x100
xor edx, edx
or eax, edx
je 0x50e99e
mov eax, dword [ecx + 8]
and eax, 0x800
xor ecx, ecx
or eax, ecx
je 0x50e99e
inc edi
add esi, 4
sub ebx, 1
jne 0x50e977
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
cmp edx, eax
jne 0x50e9b4
cmp edi, eax
jne 0x50e9c2
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ebx, dword [ebp + 8]
inc dword [ebx + 0x944]
test edx, edx
jbe 0x50eaf3
mov eax, dword [0x551d48]
test eax, eax
jge 0x50e9e0
xor eax, eax
jmp 0x50e9e7
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [eax + 0x14], 0
je 0x50ea10
mov ecx, dword [eax + 0x14]
xor esi, esi
cmp ecx, esi
jne 0x50e9fa
xor eax, eax
jmp 0x50ea1e
mov edx, dword [ecx]
mov dword [eax + 0x14], edx
cmp edx, esi
jne 0x50ea06
mov dword [eax + 0x18], esi
mov dword [ecx], 0xfefefefe
mov eax, ecx
jmp 0x50ea1e
mov ecx, dword [eax + 0x10]
push 0x10
push 0x44
call fcn.00547721
xor esi, esi
cmp eax, esi
je 0x50ea5a
or ecx, 0xffffffff
xor edx, edx
mov dword [eax], esi
mov dword [eax + 8], esi
mov dword [eax + 0x10], ecx
mov dword [eax + 0x3c], esi
mov dword [eax + 4], esi
mov word [eax + 0x40], dx
mov dword [eax + 0xc], esi
mov word [eax + 0x42], dx
mov dword [eax + 0x14], esi
mov dword [eax + 0x18], esi
mov dword [eax + 0x1c], esi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], esi
mov dword [eax + 0x34], esi
mov dword [eax + 0x38], esi
mov dword [ebp - 8], eax
jmp 0x50ea5d
mov dword [ebp - 8], esi
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 8]
mov eax, ecx
push esi
and eax, 0xfffff
push edx
or eax, 0x10000000
mov edx, ecx
call fcn.0050a980
mov edi, eax
cmp edi, esi
jl 0x50eb71
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x34]
mov eax, dword [ebp - 8]
mov dword [eax + 0x34], edx
mov ecx, dword [ecx + 0x38]
xor ebx, ebx
mov dword [eax + 0x38], ecx
mov dword [ebp - 4], esi
cmp dword [ebp - 0xc], ebx
jbe 0x50eaf0
xor edi, edi
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0xc]
mov edx, dword [ebp + 8]
test byte [edx + 0x3734], 8
mov esi, dword [eax + ebx*4]
jne 0x50eac6
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 8]
and eax, 0x1020
xor ecx, ecx
or eax, ecx
je 0x50eaea
mov eax, dword [ebp - 8]
mov ecx, dword [eax + 0xc]
mov dword [edi + ecx], esi
mov eax, dword [eax + 4]
add eax, edi
push eax
mov eax, edx
call fcn.0050e800
mov dword [ebp - 4], eax
test eax, eax
jl 0x50eb6c
add edi, 4
inc ebx
cmp ebx, dword [ebp - 0xc]
jb 0x50eaa0
mov ebx, dword [ebp + 8]
test byte [ebx + 0x3734], 8
jne 0x50eb35
xor edi, edi
cmp dword [ebp - 0xc], edi
jbe 0x50eb35
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov esi, dword [edx + edi*4]
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 8]
and eax, 0x1020
xor ecx, ecx
or eax, ecx
jne 0x50eb2f
lea eax, [esi + 0x3c]
push eax
mov eax, ebx
call fcn.0050e800
mov dword [ebp - 4], eax
test eax, eax
jl 0x50eb6c
inc edi
cmp edi, dword [ebp - 0xc]
jb 0x50eb03
mov eax, dword [ebp - 8]
test eax, eax
je 0x50eb4b
push eax
mov esi, ebx
call fcn.00508740
mov dword [ebp - 4], eax
test eax, eax
jl 0x50eb6c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
xor ecx, ecx
mov dword [eax + 0x3c], ecx
mov dword [eax], ecx
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 4]
mov dword [edx], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov edi, dword [ebp - 4]
xor esi, esi
mov ebx, dword [ebp - 8]
cmp ebx, esi
je 0x50ebc8
mov esi, ebx
call fcn.0050a890
mov eax, dword [0x551d48]
test eax, eax
jl 0x50ebc8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
test esi, esi
je 0x50ebc8
push 0x44
push 0xfe
push ebx
call sub.msvcrt.dll_memset
mov dword [ebx], 0
mov eax, dword [esi + 0x18]
add esp, 0xc
test eax, eax
je 0x50ebc2
mov dword [eax], ebx
mov dword [esi + 0x18], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [esi + 0x14], ebx
mov dword [esi + 0x18], ebx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc