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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x398
movaps xmm0, xmmword [0x785e70]
lea edx, [esp + 0x40]
mov eax, ecx
mov dword [esp + 0x60], 0
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ecx, dword [eax + 0x48]
lea edi, [eax + 0x30]
movups xmmword [esp + 0x48], xmm0
mov dword [esp + 0x18], eax
movaps xmm0, xmmword [0x785e60]
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x6c], 0
mov eax, dword [ecx]
push edx
push edi
push esi
mov eax, dword [eax + 0xc]
mov dword [esp + 0x34], edi
call eax
cmp eax, 1
je 0x500511
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 0xc]
inc dword [eax + 0x94]
lea eax, [esp + 0x7c]
movss xmm0, dword [esi]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0x80000040
movss dword [esp + 0x30], xmm0
call fcn.0050f830
movss xmm0, dword [0x718824]
lea ecx, [esp + 0x180]
fstp dword [esp + 0x34]
movss xmm1, dword [esp + 0x34]
subss xmm1, dword [esp + 0x30]
mov eax, dword [ebp + 8]
add eax, 0x1f0
push eax
divss xmm0, xmm1
movss dword [esp + 0x3c], xmm1
movss dword [esp + 0x40], xmm0
call fcn.00502580
movss xmm0, dword [ebp + 0x10]
lea ecx, [esp + 0x320]
movss xmm1, dword [0x718824]
mov eax, dword [ebp + 8]
divss xmm1, xmm0
mov dword [esp + 0x294], 1
mov dword [esp + 0x298], 1
mov dword [esp + 0x2a0], 0x3f800000
mov dword [esp + 0x184], 0x3f000000
mov dword [esp + 0x18c], 0x3e800000
mov dword [esp + 0x188], 0x3fb33333
mov dword [esp + 0x1d0], 0x40333333
mov dword [esp + 0x1d8], 0x40b33333
mov dword [esp + 0x1d4], 0x3eb6db6e
mov dword [esp + 0x1dc], 0x3e36db6e
movss dword [esp + 0x28c], xmm0
xorps xmm0, xmm0
push dword [eax + 0x1d0]
movaps xmmword [esp + 0x194], xmm0
lea eax, [esp + 0x34]
movaps xmmword [esp + 0x1a4], xmm0
movaps xmm0, xmmword [str.n_n_n_n_333_333_333_333_0]
push eax
movaps xmmword [esp + 0x1b8], xmm0
lea eax, [esp + 0x188]
movaps xmm0, xmmword [0x785e90]
push eax
movss dword [esp + 0x29c], xmm1
movaps xmmword [esp + 0x1cc], xmm0
call fcn.004fd630
lea eax, [esp + 0x2b8]
push eax
push dword [esp + 0x70]
lea eax, [esp + 0x328]
push dword [esp + 0x70]
push dword [esp + 0x70]
push dword [esp + 0x70]
push eax
lea eax, [esp + 0x198]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.00525770
add esp, 0x20
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x1c], eax
mov ecx, dword [eax + 4]
cmp ecx, dword [eax + 0xc]
jae 0x500139
mov dword [ecx], str.LtTOI
mov dword [ecx + 0xc], str.StSolveToi
rdtsc
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0xc]
cmp byte [eax + 0xe8], 5
jne 0x500148
mov eax, dword [esi + 0x10]
mov eax, dword [eax + 0xcc]
push dword [0x884adc]
mov dword [esp + 0x20], eax
mov esi, dword [eax + 0x50]
mov dword [esp + 0x14], esi
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi + 0x7f]
and edx, 0xffffff80
mov dword [esp + 0x14], edx
mov esi, dword [eax + 0xc]
mov dword [esp + 0x2c], esi
lea ecx, [edx + esi]
cmp edx, dword [eax + 8]
jg 0x500188
cmp ecx, dword [eax + 0x10]
ja 0x500188
mov dword [eax + 0xc], ecx
jmp 0x500196
push edx
mov ecx, eax
call fcn.0046a3c0
mov esi, eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x10]
push eax
push 0
push esi
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], eax
call fcn.0045d830
movss xmm0, dword [ebp + 0x14]
lea eax, [esp + 0x2c]
add esp, 8
movss dword [esp], xmm0
push eax
lea eax, [esp + 0x78]
push eax
push dword [ebp + 8]
mov eax, dword [esp + 0x28]
push dword [eax + 0x48]
lea eax, [esp + 0x2cc]
push dword [ebp + 0xc]
push eax
lea eax, [esp + 0x64]
push eax
call fcn.005006b0
mov dword [esp + 0x30], eax
lea eax, [esp + 0x2d8]
push eax
call fcn.00525890
mov eax, dword [ebp + 0xc]
add esp, 0x24
mov ecx, dword [eax + 0xc]
cmp byte [ecx + 0xe8], 5
je 0x500210
mov ecx, dword [ecx + 0xcc]
mov dword [esp + 0x20], ecx
jmp 0x500220
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0xcc]
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x14]
add eax, 0x18
push eax
push dword [esp + 0x24]
mov edx, dword [ecx]
call dword [edx + 0x20]
cmp dword [esp + 0x10], 0
jne 0x50032a
mov ecx, dword [edi + 4]
sub ecx, 1
mov dword [esp + 0x20], ecx
js 0x500316
imul esi, ecx, 0x70
nop
mov edi, dword [edi]
mov edx, dword [esp + 0x1c]
mov eax, dword [edi + esi + 0xc]
cmp dword [eax + 0xcc], edx
mov edx, dword [esp + 0x2c]
jne 0x500273
movzx eax, word [eax + 0xa8]
cmp byte [eax + edx], 0x10
je 0x500294
mov eax, dword [edi + esi + 0x10]
mov ecx, dword [esp + 0x1c]
cmp dword [eax + 0xcc], ecx
mov ecx, dword [esp + 0x20]
jne 0x5002fe
movzx eax, word [eax + 0xa8]
cmp byte [eax + edx], 0x10
jne 0x5002fe
mov eax, dword [edi + esi + 0xc]
cmp byte [eax + 0xe8], 5
jne 0x5002a5
mov eax, dword [edi + esi + 0x10]
mov eax, dword [eax + 0xcc]
mov ecx, dword [edi + esi + 0x14]
mov dword [esp + 0x10], eax
lea eax, [edi + 0x18]
add eax, esi
push eax
mov edx, dword [ecx]
push dword [esp + 0x14]
call dword [edx + 0x20]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x20]
dec dword [edi + 4]
mov edx, dword [edi + 4]
cmp edx, ecx
je 0x500302
mov eax, dword [edi]
mov edi, 0xe
imul edx, edx, 0x70
lea ecx, [esi + eax]
add edx, eax
sub edx, ecx
mov eax, dword [edx + ecx]
lea ecx, [ecx + 8]
mov dword [ecx - 8], eax
mov eax, dword [edx + ecx - 4]
mov dword [ecx - 4], eax
sub edi, 1
jne 0x5002e5
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x28]
dec ecx
sub esi, 0x70
mov dword [esp + 0x20], ecx
test ecx, ecx
jns 0x500250
mov esi, dword [esp + 0x2c]
push 4
push dword [esp + 0x78]
push dword [esp + 0x78]
call fcn.0045c260
add esp, 0xc
jmp 0x500332
mov dword [esp + 0x74], 0
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 0x14]
lea edx, [ecx + 0xf]
and edx, 0xfffffff0
cmp ecx, dword [eax + 8]
jg 0x50035f
lea ecx, [edx + esi]
cmp ecx, dword [eax + 0xc]
jne 0x50035f
cmp dword [eax + 0x14], esi
je 0x50035f
mov dword [eax + 0xc], esi
jmp 0x500368
push edx
push esi
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x48]
push edx
push edi
push dword [ebp + 0xc]
mov ecx, dword [eax + 0x48]
mov eax, dword [ecx]
call dword [eax + 0x18]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x5003ac
mov dword [esi], str.StPendingOperations
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
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x5003db
mov dword [esi], str.StCollide
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 esi, dword [esp + 0x74]
test esi, esi
je 0x500476
mov edi, dword [esp + 0x70]
lea ecx, [esi - 1]
mov dword [esp + 0x10], ecx
test ecx, ecx
js 0x50042a
mov edx, dword [edi + ecx*4]
cmp dword [edx + 8], 0
jne 0x500421
dec esi
mov dword [esp + 0x74], esi
cmp esi, ecx
je 0x50040e
mov eax, dword [edi + esi*4]
mov dword [edi + ecx*4], eax
mov ecx, edx
call fcn.0045c160
mov esi, dword [esp + 0x74]
mov edi, dword [esp + 0x70]
mov ecx, dword [esp + 0x10]
sub ecx, 1
mov dword [esp + 0x10], ecx
jns 0x5003f6
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x78]
mov dword [esp + 0x14], eax
test esi, esi
je 0x50046a
push 0
push ecx
mov ecx, dword [esp + 0x20]
push esi
push edi
call fcn.004fdc70
cmp dword [0x8d7868], 1
je 0x500462
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx]
lea eax, [ecx + 0x3c]
push eax
push dword [esp + 0x18]
push esi
push edi
call dword [edx + 0x4c]
mov edi, dword [esp + 0x70]
mov esi, dword [esp + 0x74]
push 4
push esi
push edi
call fcn.0045c340
add esp, 0xc
mov eax, dword [esp + 0x18]
mov esi, dword [eax + 0xc]
add dword [esi + 0x94], 0xffffffff
jne 0x5004b8
cmp byte [esi + 0x9c], 0
jne 0x5004b8
cmp dword [esi + 0x8c], 0
je 0x50049f
mov ecx, esi
call fcn.00510540
cmp dword [esi + 0xa4], 1
jne 0x5004b8
cmp dword [esi + 0x90], 0
je 0x5004b8
mov ecx, esi
call fcn.00510560
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x5004e7
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
mov eax, dword [esp + 0x78]
mov dword [esp + 0x74], 0
test eax, eax
js 0x500511
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x74]
call dword [eax + 0x10]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10