Function at 0x50c200
Capabilities:
Execute anti-debugging instructions
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x834
push ebx
mov ebx, ecx
cmp dword [ebx + 0x94], 0
je 0x50c24c
mov eax, dword [esp + 0x83c]
mov dword [esp + 0x18], eax
mov al, byte [esp + 0x840]
mov byte [esp + 0x1c], al
mov al, byte [esp + 0x844]
mov byte [esp + 0x1d], al
lea eax, [esp + 0x14]
push eax
mov byte [esp + 0x18], 0x13
call fcn.00510450
pop ebx
add esp, 0x834
ret 0xc
push esi
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 0xc]
jae 0x50c283
mov dword [ecx], str.LtUpdateFilterOnEntity
mov dword [ecx + 0xc], str.Stinit
rdtsc
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [esi + 4], eax
inc dword [ebx + 0x94]
push ebp
mov ebp, dword [esp + 0x844]
push edi
cmp byte [ebp + 0xe8], 5
jne 0x50c2a3
lea ecx, [ebp + 0x10]
call fcn.006ad050
cmp dword [esp + 0x84c], 0
lea eax, [esp + 0x38]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], 0
mov dword [esp + 0x34], 0x80000080
jne 0x50c4ab
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50c2f8
mov dword [esi], str.Stbroadphase
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov ecx, dword [ebx + 0x58]
lea eax, [esp + 0x2c]
push eax
lea eax, [ebp + 0x24]
push eax
mov edx, dword [ecx]
call dword [edx + 0x4c]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50c338
mov dword [esi], str.Stphantom
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov ecx, dword [esp + 0x30]
xor esi, esi
test ecx, ecx
jle 0x50c3b8
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + esi*8 + 4]
movsx edx, byte [eax + 5]
add edx, eax
cmp byte [edx + 0x18], 2
jne 0x50c3b3
movsx edi, byte [edx + 0x10]
add edi, edx
je 0x50c3b3
push dword [ebx + 0x7c]
lea eax, [ebp + 0x10]
push eax
push edi
call fcn.00511500
add esp, 0xc
cmp dword [esp + 0x850], 0
je 0x50c380
mov eax, dword [edi]
mov ecx, edi
call dword [eax + 0x34]
nop
mov ecx, dword [esp + 0x30]
dec ecx
mov dword [esp + 0x30], ecx
cmp ecx, esi
je 0x50c3b2
mov eax, dword [esp + 0x2c]
mov edx, 2
lea edi, [eax + ecx*8]
lea eax, [eax + esi*8]
sub edi, eax
nop
mov ecx, dword [edi + eax]
lea eax, [eax + 4]
mov dword [eax - 4], ecx
sub edx, 1
jne 0x50c3a0
mov ecx, dword [esp + 0x30]
dec esi
inc esi
cmp esi, ecx
jl 0x50c342
lea ecx, [ebp + 0x10]
call fcn.006ad040
mov edi, eax
xor edx, edx
lea eax, [esp + 0x444]
mov dword [esp + 0x43c], edx
mov ecx, 0x80000080
mov dword [esp + 0x438], eax
mov dword [esp + 0x440], ecx
xor esi, esi
cmp dword [edi + 4], edx
jle 0x50c463
nop dword [eax]
and ecx, 0x3fffffff
cmp edx, ecx
jne 0x50c420
push 8
lea eax, [esp + 0x43c]
push eax
push 0x7d8954
call fcn.00467c00
mov edx, dword [esp + 0x448]
add esp, 0xc
nop dword [eax + eax]
mov eax, dword [esp + 0x438]
lea ecx, [eax + edx*8]
inc edx
mov dword [esp + 0x43c], edx
mov eax, dword [edi]
mov eax, dword [eax + esi*8]
mov eax, dword [eax + 0x10]
add eax, 0x14
mov dword [ecx], eax
mov eax, dword [edi]
mov eax, dword [eax + esi*8]
inc esi
mov eax, dword [eax + 0x14]
add eax, 0x14
mov dword [ecx + 4], eax
cmp esi, dword [edi + 4]
jge 0x50c463
mov ecx, dword [esp + 0x440]
mov edx, dword [esp + 0x43c]
jmp 0x50c3f0
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x43c]
push eax
call fcn.006aef90
mov eax, dword [esp + 0x448]
add esp, 8
mov dword [esp + 0x43c], 0
test eax, eax
js 0x50c4ab
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x43c]
call dword [eax + 0x10]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50c4da
mov dword [esi], str.StcheckAgts
rdtsc
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x10]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
movsx eax, byte [ebp + 0x2a]
lea ecx, [ebp + 0x10]
mov dword [esp + 0x1c], eax
call fcn.006ad040
xor esi, esi
mov dword [esp + 0x10], eax
cmp dword [eax + 4], esi
jle 0x50c5e4
nop dword [eax]
mov edi, dword [eax]
lea ecx, [esi*8]
add edi, ecx
lea edx, [ebp + 0x10]
mov ecx, dword [ebx + 0x7c]
add ecx, 8
push dword [edi + 4]
mov eax, dword [ecx]
push edx
lea edx, [esp + 0x23]
push edx
call dword [eax + 4]
cmp byte [eax], 0
je 0x50c5bb
mov edx, dword [edi + 4]
mov eax, dword [esp + 0x1c]
movsx ecx, byte [edx + 0x1a]
lea eax, [eax + eax*4]
lea ecx, [ecx + eax*2]
mov eax, dword [ebx + 0x80]
movsx eax, byte [ecx + eax + 0x1c50]
mov dword [esp + 0x14], eax
test eax, eax
je 0x50c5bb
mov ecx, dword [edi]
movzx eax, byte [ecx + 0xc]
cmp dword [esp + 0x14], eax
je 0x50c62c
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
and eax, 0x3fffffff
cmp edx, eax
jne 0x50c590
push 8
lea eax, [esp + 0x30]
push eax
push 0x7d8954
call fcn.00467c00
mov edx, dword [esp + 0x3c]
add esp, 0xc
nop dword [eax + eax]
mov eax, dword [esp + 0x2c]
lea ecx, [eax + edx*8]
inc edx
mov dword [esp + 0x30], edx
mov edx, dword [esp + 0x10]
mov eax, dword [edx]
mov eax, dword [eax + esi*8]
mov eax, dword [eax + 0x10]
add eax, 0x14
mov dword [ecx], eax
mov eax, dword [edx]
mov eax, dword [eax + esi*8]
mov eax, dword [eax + 0x14]
add eax, 0x14
mov dword [ecx + 4], eax
push dword [edi]
call fcn.0052dac0
mov ecx, dword [ebp + 0xcc]
add esp, 4
dec esi
mov al, byte [ecx + 0x25]
and al, 0xfd
or al, 1
mov byte [ecx + 0x25], al
mov eax, dword [esp + 0x10]
inc esi
cmp esi, dword [eax + 4]
jl 0x50c500
cmp dword [esp + 0x30], 0
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jle 0x50c687
push dword [0x884c50]
call ebp
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50c620
mov dword [esi], str.StaddAgts
rdtsc
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
mov eax, dword [ebx + 0x7c]
test eax, eax
je 0x50c674
add eax, 8
jmp 0x50c676
cmp dword [esp + 0x850], 1
jne 0x50c5d6
cmp byte [ebp + 0xe8], 5
jne 0x50c65c
movsx eax, byte [edx + 0x10]
mov eax, dword [eax + edx + 0xcc]
push eax
push dword [ebx + 0x78]
push ecx
call fcn.006ad710
add esp, 0xc
jmp 0x50c5d6
mov eax, dword [ebp + 0xcc]
push eax
push dword [ebx + 0x78]
push ecx
call fcn.006ad710
add esp, 0xc
jmp 0x50c5d6
xor eax, eax
mov ecx, dword [ebx + 0x64]
push eax
push dword [esp + 0x34]
push dword [esp + 0x34]
call fcn.006af2d0
add dword [ebx + 0x94], 0xffffffff
jne 0x50c6c2
cmp byte [ebx + 0x9c], 0
jne 0x50c6c2
cmp dword [ebx + 0x8c], 0
je 0x50c6a9
mov ecx, ebx
call fcn.00510540
cmp dword [ebx + 0xa4], 1
jne 0x50c6c2
cmp dword [ebx + 0x90], 0
je 0x50c6c2
mov ecx, ebx
call fcn.00510560
mov eax, dword [esp + 0x34]
mov dword [esp + 0x30], 0
test eax, eax
js 0x50c6ec
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 3
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x30]
call dword [eax + 0x10]
push dword [0x884c50]
call ebp
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x50c717
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x14]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x834
ret 0xc