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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x98
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push edi
push dword [0x8d7860]
mov edi, ecx
mov dword [esp + 0x20], edi
call esi
test eax, eax
jne 0x64fabb
mov ecx, dword [edi + 0x54]
jmp 0x64facb
push dword [0x8d7860]
call esi
movsx ecx, byte [eax + edi + 0x11c]
mov esi, dword [ebp + 0xc]
lea eax, [ecx*8]
sub eax, ecx
add eax, 0x24
lea ecx, [edi + eax*4]
movsx eax, byte [ecx]
mov dword [esp + 0x10], eax
test eax, eax
js 0x64fb12
nop dword [eax + eax]
lea edx, [eax + 4]
lea edx, [eax + edx*4]
cmp dword [esi + edx*4 + 0x10], 0
lea edx, [esi + edx*4]
mov dword [esp + 0x14], edx
lea ecx, [ecx + 1]
jne 0x64fb4b
movsx eax, byte [ecx]
mov dword [esp + 0x10], eax
test eax, eax
jns 0x64faf0
or eax, 0xffffffff
mov dword [esp + 0x10], eax
mov ecx, dword [ebp + 8]
cmp ecx, 0xffffffff
je 0x64fb2e
cmp ecx, eax
je 0x64fb2e
push esi
push ecx
mov ecx, edi
call fcn.0064f4d0
cmp dword [esp + 0x10], 0
jl 0x64fbb9
push esi
mov ecx, edi
call fcn.0064f5f0
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [edx + 8]
lea edi, [esp + 0x20]
push dword [ebp + 0x14]
mov esi, eax
mov ecx, 0x20
shl esi, 7
inc eax
add esi, dword [edx]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x20]
xor ecx, ecx
cmp eax, dword [edx + 4]
mov esi, dword [ebp + 0xc]
cmove eax, ecx
dec dword [edx + 0x10]
mov dword [edx + 8], eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [edi + 0x1c]
push esi
push edi
call eax
add esp, 0x10
cmp eax, 1
jne 0x64fba7
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.0064fa40
push esi
push dword [esp + 0x14]
mov ecx, edi
call fcn.0064f4d0
movzx eax, byte [esp + 0x21]
inc word [esi + eax*2]
mov eax, dword [esp + 0x10]
jmp 0x64fb19
mov eax, dword [edi + 0x50]
xor ecx, ecx
mov dword [esp + 0x18], eax
xor edx, edx
mov eax, dword [edi + 0x4c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], eax
cmp eax, dword [edi + 0x50]
jge 0x64fc3c
mov eax, dword [edi + 0x50]
sub eax, dword [edi + 0x4c]
cmp eax, 2
jl 0x64fc1b
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
sub ecx, edi
sub ecx, 2
shr ecx, 1
lea eax, [edi + 5]
inc ecx
lea eax, [eax + eax*4]
lea eax, [esi + eax*4]
lea edi, [edi + ecx*2]
mov dword [esp + 0x10], edi
xor edi, edi
add edx, dword [eax - 0x14]
lea eax, [eax + 0x28]
add edi, dword [eax - 0x28]
sub ecx, 1
jne 0x64fc01
mov dword [esp + 0x18], edi
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
cmp eax, dword [edi + 0x50]
jge 0x64fc2f
lea eax, [eax + eax*4]
mov eax, dword [esi + eax*4 + 0x50]
mov dword [esp + 0x14], eax
lea eax, [edx + ecx]
add dword [esp + 0x14], eax
jne 0x64fcee
xor ecx, ecx
xor edx, edx
cmp dword [edi + 0x24], ecx
jle 0x64fc70
cmp word [esi + ecx*2], 0
jg 0x64fc61
mov eax, dword [edi + 0x30]
add eax, 4
add eax, ecx
lea eax, [eax + eax*4]
cmp dword [esi + eax*4], 0
jne 0x64fc61
xor eax, eax
jmp 0x64fc66
mov eax, 1
shl eax, cl
inc ecx
or edx, eax
cmp ecx, dword [edi + 0x24]
jl 0x64fc45
test dword [esi + 0x2c], edx
sete al
test edx, edx
sete byte [esp + 0xf]
test al, al
je 0x64fce1
push dword [0x8d7860]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x64fcb4
cmp byte [esp + 0xf], al
je 0x64fc9f
push esi
mov ecx, edi
call fcn.0064f520
push esi
mov ecx, edi
call fcn.0064f5f0
mov eax, 2
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
movsx eax, byte [edi + 0x11c]
lea ecx, [esi + eax*2]
movzx eax, word [ecx + 0x36]
test ax, ax
je 0x64fce1
dec eax
mov word [ecx + 0x36], ax
movsx eax, byte [edi + 0x11c]
push 1
push dword [edi + eax*4 + 0x78]
call fcn.00650180
add esp, 8
cmp byte [esp + 0xf], 0
je 0x64fcee
cmp dword [esi + 0x30], 1
jne 0x64fc97
cmp dword [ebp + 0x10], 1
jne 0x64fd09
push esi
mov ecx, edi
call fcn.0064f5f0
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push dword [0x8d7860]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push esi
mov ecx, edi
movsx eax, byte [eax + edi + 0x11c]
mov dword [esp + 0x18], eax
inc word [esi + eax*2 + 0x36]
call fcn.0064f5f0
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x1c], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x64fd63
mov dword [esi], str.TtNoJobAvailable
rdtsc
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x14]
push dword [edi + eax*4 + 0x78]
call fcn.00650170
add esp, 4
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x64fda2
mov dword [esi], 0x77f5ec
rdtsc
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
pop edi
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret 0x10