Function at 0x50b630
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x50
push ebp
mov ebp, dword [esp + 0x5c]
push edi
mov edi, ecx
test ebp, ebp
jle 0x50ba7e
mov eax, dword [edi + 0x98]
mov ecx, dword [edi + 0x94]
add eax, ecx
je 0x50b679
mov eax, dword [esp + 0x5c]
mov ecx, edi
mov dword [esp + 0x14], eax
lea eax, [esp + 0x10]
push eax
mov byte [esp + 0x14], 0x10
mov word [esp + 0x1c], bp
call fcn.00510450
pop edi
pop ebp
add esp, 0x50
ret 8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea eax, [ecx + 1]
push esi
mov dword [edi + 0x94], eax
push dword [0x884adc]
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], connect
mov dword [esp + 0x60], ebp
call ebx
lea ecx, [ebp*4 + 0x7f]
and ecx, 0xffffff80
mov edx, dword [eax + 0xc]
lea esi, [edx + ecx]
cmp ecx, dword [eax + 8]
jg 0x50b6cd
cmp esi, dword [eax + 0x10]
ja 0x50b6cd
mov dword [eax + 0xc], esi
jmp 0x50b6d7
push ecx
mov ecx, eax
call fcn.0046a3c0
mov edx, eax
push dword [0x884adc]
mov esi, ebp
mov dword [esp + 0x50], edx
or esi, 0x80000000
mov dword [esp + 0x5c], edx
mov dword [esp + 0x58], esi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], connect
mov dword [esp + 0x4c], ebp
call ebx
mov ecx, ebp
shl ecx, 5
add ecx, 0x7f
mov edx, dword [eax + 0xc]
and ecx, 0xffffff80
lea ebx, [edx + ecx]
cmp ecx, dword [eax + 8]
jg 0x50b72f
cmp ebx, dword [eax + 0x10]
ja 0x50b72f
mov dword [eax + 0xc], ebx
jmp 0x50b739
push ecx
mov ecx, eax
call fcn.0046a3c0
mov edx, eax
xor eax, eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], edx
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x50], ebp
mov dword [esp + 0x10], eax
test ebp, ebp
jle 0x50b80a
lea ebx, [edi + 0x11c]
mov dword [esp + 0x68], eax
mov ecx, dword [esp + 0x64]
shl eax, 2
mov dword [esp + 0x14], eax
mov esi, dword [eax + ecx]
cmp dword [esi + 0x18], 0
jne 0x50b783
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x14]
mov dword [esi + 0x18], eax
mov edx, dword [esp + 0x14]
lea ecx, [esi + 0x24]
mov dword [esi + 8], edi
mov eax, dword [esp + 0x4c]
mov dword [edx + eax], ecx
mov ecx, esi
mov eax, dword [esp + 0x38]
mov edx, dword [esi]
add eax, dword [esp + 0x68]
push eax
call dword [edx + 0x1c]
mov eax, dword [esp + 0x38]
mov ecx, esi
add eax, dword [esp + 0x68]
push eax
call fcn.0051ef30
mov ecx, esi
call fcn.0045c0c0
mov eax, dword [ebx + 8]
and eax, 0x3fffffff
cmp dword [ebx + 4], eax
jne 0x50b7d8
push 4
push ebx
push 0x7d8954
call fcn.00467c00
add esp, 0xc
mov edx, dword [ebx + 4]
mov eax, dword [ebx]
push esi
push edi
mov dword [eax + edx*4], esi
inc dword [ebx + 4]
call fcn.00527df0
add esp, 8
mov ecx, esi
call fcn.0051eb00
mov eax, dword [esp + 0x10]
add dword [esp + 0x68], 0x20
inc eax
mov dword [esp + 0x10], eax
cmp eax, ebp
jl 0x50b765
mov esi, dword [edi + 0x348]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], connect
mov dword [esp + 0x34], esi
test esi, esi
je 0x50b867
push dword [0x884adc]
call ebp
mov ecx, eax
lea edx, [esi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea ebx, [edx + eax]
cmp edx, dword [ecx + 8]
jg 0x50b85f
cmp ebx, dword [ecx + 0x10]
ja 0x50b85f
mov dword [ecx + 0xc], ebx
jmp 0x50b869
push edx
call fcn.0046a3c0
jmp 0x50b869
xor eax, eax
mov ecx, dword [edi + 0x58]
lea edx, [esp + 0x24]
push edx
or esi, 0x80000000
mov dword [esp + 0x28], eax
lea edx, [esp + 0x3c]
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], eax
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x54]
push edx
call dword [eax + 0x1c]
mov eax, dword [edi + 0x7c]
test eax, eax
je 0x50b89e
add eax, 8
jmp 0x50b8a0
xor eax, eax
mov ecx, dword [edi + 0x64]
push eax
push dword [esp + 0x2c]
push dword [esp + 0x2c]
call fcn.006af2d0
add dword [edi + 0x94], 0xffffffff
jne 0x50b8ec
cmp byte [edi + 0x9c], 0
jne 0x50b8ec
cmp dword [edi + 0x8c], 0
je 0x50b8d3
mov ecx, edi
call fcn.00510540
cmp dword [edi + 0xa4], 1
jne 0x50b8ec
cmp dword [edi + 0x90], 0
je 0x50b8ec
mov ecx, edi
call fcn.00510560
mov edi, dword [esp + 0x30]
xor ecx, ecx
mov eax, dword [esp + 0x28]
cmp edi, dword [esp + 0x24]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x38]
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x50b934
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x50b934
cmp dword [eax + 0x14], edi
je 0x50b934
mov dword [eax + 0xc], edi
jmp 0x50b93d
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x28], 0
test eax, eax
js 0x50b967
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x28]
call dword [eax + 0x10]
mov edi, dword [esp + 0x44]
xor ecx, ecx
mov eax, dword [esp + 0x3c]
cmp edi, dword [esp + 0x38]
mov esi, dword [esp + 0x48]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x28], 0
shl esi, 5
add esi, 0x7f
mov dword [esp + 0x30], connect
mov dword [esp + 0x40], eax
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x50b9be
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x50b9be
cmp dword [eax + 0x14], edi
je 0x50b9be
mov dword [eax + 0xc], edi
jmp 0x50b9c7
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x40]
mov dword [esp + 0x3c], 0
test eax, eax
js 0x50b9f1
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 5
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x3c]
call dword [eax + 0x10]
mov edi, dword [esp + 0x58]
xor ecx, ecx
mov eax, dword [esp + 0x50]
cmp edi, dword [esp + 0x4c]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x44], connect
lea esi, [eax*4 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
pop esi
pop ebx
jg 0x50ba4b
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x50ba4b
cmp dword [eax + 0x14], edi
je 0x50ba4b
mov dword [eax + 0xc], edi
jmp 0x50ba54
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x48], 0
test eax, eax
js 0x50ba7e
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x48]
call dword [eax + 0x10]
pop edi
pop ebp
add esp, 0x50
ret 8