Function at 0x50abf0
Capabilities:
Execute anti-debugging instructions
Get thread local storage value

Disassembly:
sub esp, 0x24
push ebx
push ebp
mov ebp, dword [esp + 0x34]
mov ebx, ecx
test ebp, ebp
jle 0x50afb5
cmp dword [ebx + 0x94], 0
je 0x50ac30
mov eax, dword [esp + 0x30]
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc]
push eax
mov byte [esp + 0x10], 8
mov word [esp + 0x18], bp
call fcn.00510450
pop ebp
pop ebx
add esp, 0x24
ret 8
push esi
push edi
mov dword [ebx + 0x94], 1
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 0xc]
jae 0x50ac72
mov dword [ecx], str.LtRemEntities
mov dword [ecx + 0xc], str.StInitCallBck
rdtsc
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x3c]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [esi + 4], eax
mov ecx, dword [ebx + 8]
mov edi, dword [esp + 0x38]
push 1
push ebx
mov eax, dword [ecx]
push ebp
push edi
call dword [eax + 0x30]
xor esi, esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], connect
test ebp, ebp
jle 0x50acb6
push 4
push ebp
lea eax, [esp + 0x1c]
push eax
push 0x7d8950
call fcn.00467b80
mov esi, dword [esp + 0x28]
add esp, 0x10
lea ebp, [edi + ebp*4]
mov edx, edi
mov dword [esp + 0x38], ebp
cmp edi, ebp
je 0x50ace5
mov ecx, dword [edx]
cmp dword [ecx + 0x10], 0
je 0x50acde
mov eax, dword [esp + 0x14]
add ecx, 0x24
mov dword [eax + esi*4], ecx
mov esi, dword [esp + 0x18]
inc esi
mov dword [esp + 0x18], esi
add edx, 4
cmp edx, ebp
jne 0x50acc3
test esi, esi
je 0x50ae8c
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x10], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x50ad22
mov dword [esi], str.StBroadPhase
rdtsc
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x3c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov esi, dword [ebx + 0x348]
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], connect
mov dword [esp + 0x30], esi
test esi, esi
je 0x50ad90
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
lea edx, [esi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea ebp, [eax + edx]
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0x38]
cmp edx, dword [ecx + 8]
jg 0x50ad88
lea ebp, [eax + edx]
cmp ebp, dword [ecx + 0x10]
mov ebp, dword [esp + 0x38]
ja 0x50ad88
mov edx, dword [esp + 0x3c]
mov dword [ecx + 0xc], edx
jmp 0x50ad92
push edx
call fcn.0046a3c0
jmp 0x50ad92
xor eax, eax
mov ecx, dword [ebx + 0x58]
lea edx, [esp + 0x20]
or esi, 0x80000000
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x18]
push edx
call dword [eax + 0x24]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x10], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x50adeb
mov dword [esi], str.StDelAgents
rdtsc
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x3c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
push dword [esp + 0x24]
mov ecx, dword [ebx + 0x64]
push dword [esp + 0x24]
call fcn.006af340
mov ecx, dword [esp + 0x2c]
xor edx, edx
mov eax, dword [esp + 0x24]
cmp ecx, dword [esp + 0x20]
push dword [0x884adc]
cmove eax, edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x34]
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edx, eax
lea eax, [esi + 0xf]
and eax, 0xfffffff0
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x3c]
cmp esi, dword [edx + 8]
mov esi, dword [esp + 0x10]
jg 0x50ae59
lea ecx, [esi + eax]
cmp ecx, dword [edx + 0xc]
jne 0x50ae59
cmp dword [edx + 0x14], eax
je 0x50ae59
mov dword [edx + 0xc], eax
jmp 0x50ae62
push esi
push eax
mov ecx, edx
call fcn.0046a590
mov eax, dword [esp + 0x28]
mov dword [esp + 0x24], 0
test eax, eax
js 0x50ae8c
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x24]
call dword [eax + 0x10]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x18], 0
test eax, eax
js 0x50aeb6
and eax, 0x3fffffff
mov ecx, 0x7d8950
shl eax, 2
push eax
mov eax, dword [0x7d8950]
push dword [esp + 0x18]
call dword [eax + 0x10]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x10], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x50aeeb
mov dword [esi], str.StRemoveCb
rdtsc
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x3c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
sub ebp, edi
xor eax, eax
add ebp, 3
xor esi, esi
shr ebp, 2
cmp edi, dword [esp + 0x38]
cmova ebp, eax
test ebp, ebp
je 0x50af49
push dword [edi]
push ebx
call fcn.00527be0
push dword [edi]
call fcn.00534c70
push dword [edi]
push ebx
call fcn.00529c90
mov ecx, dword [edi]
add esp, 0x14
cmp dword [ecx + 0x54], 0
je 0x50af2c
add ecx, 0x30
call fcn.004f4910
mov ecx, dword [edi]
cmp word [ecx + 4], 0
jne 0x50af3a
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [edi]
call fcn.0045c160
inc esi
add edi, 4
cmp esi, ebp
jne 0x50af02
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50af78
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x38]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
add dword [ebx + 0x94], 0xffffffff
pop edi
pop esi
jne 0x50afb5
cmp byte [ebx + 0x9c], 0
jne 0x50afb5
cmp dword [ebx + 0x8c], 0
je 0x50af9c
mov ecx, ebx
call fcn.00510540
cmp dword [ebx + 0xa4], 1
jne 0x50afb5
cmp dword [ebx + 0x90], 0
je 0x50afb5
mov ecx, ebx
call fcn.00510560
pop ebp
pop ebx
add esp, 0x24
ret 8