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

Disassembly:
sub esp, 0x24
push esi
mov esi, ecx
cmp dword [esi + 0x94], 0
je 0x50c825
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xc], eax
mov al, byte [esp + 0x30]
mov byte [esp + 0x10], al
lea eax, [esp + 8]
push eax
mov byte [esp + 0xc], 0x15
call fcn.00510450
pop esi
add esp, 0x24
ret 8
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
mov dword [esi + 0x94], 1
push dword [0x884c50]
call ebp
mov edi, eax
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 0xc]
jae 0x50c869
mov dword [ecx], str.LtUpdateFilterOnPhantom
mov dword [ecx + 0xc], str.Stbroadphase
rdtsc
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0xc]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [edi + 4], eax
mov edi, dword [esi + 0x348]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], connect
mov dword [esp + 0x2c], edi
push ebx
mov ebx, dword [esp + 0x38]
test edi, edi
je 0x50c8da
push dword [0x884adc]
call ebp
mov ecx, eax
lea edx, [edi*8 + 0x7f]
and edx, 0xffffff80
mov eax, dword [ecx + 0xc]
lea ebx, [eax + edx]
mov dword [esp + 0x10], ebx
mov ebx, dword [esp + 0x38]
cmp edx, dword [ecx + 8]
jg 0x50c8d2
lea ebp, [eax + edx]
cmp ebp, dword [ecx + 0x10]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
ja 0x50c8d2
mov edx, dword [esp + 0x10]
mov dword [ecx + 0xc], edx
jmp 0x50c8dc
push edx
call fcn.0046a3c0
jmp 0x50c8dc
xor eax, eax
mov ecx, dword [esi + 0x58]
lea edx, [ebx + 0x24]
or edi, 0x80000000
mov dword [esp + 0x20], eax
mov dword [esp + 0x28], edi
lea edi, [esp + 0x20]
mov dword [esp + 0x2c], eax
mov eax, dword [ecx]
push edi
push edx
call dword [eax + 0x4c]
push dword [0x884c50]
call ebp
mov dword [esp + 0x10], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x50c930
mov dword [edi], str.StUpdateOverlaps
rdtsc
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x38]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [ecx + 4], eax
mov edx, dword [esp + 0x24]
xor edi, edi
test edx, edx
jle 0x50c96e
lea ebp, [ebx + 0x24]
nop dword [eax]
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + edi*8 + 4]
cmp ecx, ebp
je 0x50c963
push dword [esi + 0x7c]
movsx eax, byte [ecx + 5]
add eax, ecx
push eax
push ebx
call fcn.00511500
mov edx, dword [esp + 0x30]
add esp, 0xc
inc edi
cmp edi, edx
jl 0x50c940
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp dword [esp + 0x3c], 0
je 0x50c9a7
push dword [0x884c50]
call ebp
mov edi, eax
mov ecx, dword [edi + 4]
cmp ecx, dword [edi + 0xc]
jae 0x50c9a0
mov dword [ecx], str.StcollectionFilter
rdtsc
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x38]
lea eax, [ecx + 0xc]
mov dword [ecx + 4], edx
mov dword [edi + 4], eax
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x34]
add dword [esi + 0x94], 0xffffffff
pop ebx
jne 0x50c9e3
cmp byte [esi + 0x9c], 0
jne 0x50c9e3
cmp dword [esi + 0x8c], 0
je 0x50c9ca
mov ecx, esi
call fcn.00510540
cmp dword [esi + 0xa4], 1
jne 0x50c9e3
cmp dword [esi + 0x90], 0
je 0x50c9e3
mov ecx, esi
call fcn.00510560
push dword [0x884c50]
call ebp
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50ca0e
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x34], eax
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov edi, dword [esp + 0x28]
xor ecx, ecx
mov eax, dword [esp + 0x20]
cmp edi, dword [esp + 0x1c]
push dword [0x884adc]
cmove eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x30]
lea esi, [eax*8 + 0x7f]
and esi, 0xffffff80
call ebp
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x50ca56
lea ecx, [edx + edi]
cmp ecx, dword [eax + 0xc]
jne 0x50ca56
cmp dword [eax + 0x14], edi
je 0x50ca56
mov dword [eax + 0xc], edi
jmp 0x50ca5f
push edx
push edi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x24]
mov dword [esp + 0x20], 0
pop edi
pop ebp
test eax, eax
js 0x50ca8b
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x18]
call dword [eax + 0x10]
pop esi
add esp, 0x24
ret 8