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

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov esi, ecx
push edi
mov dword [esp + 0x20], esi
call fcn.005b8510
lea ecx, [esi + 0x7c]
push ecx
mov ecx, dword [esi + 0x5c]
mov eax, dword [ecx + eax*4]
mov ecx, esi
push dword [eax + 0x30]
call fcn.005bb2c0
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x5bae51
lea eax, [esi + 0x88]
push eax
push ecx
mov ecx, esi
call fcn.005bb2c0
cmp byte [esi + 0x58], 0
lea ebp, [esi + 0x58]
mov ebx, dword [esp + 0x2c]
je 0x5baf96
push ebx
mov ecx, esi
call fcn.005bbf30
cmp byte [esp + 0x30], 0
je 0x5baf96
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x14], eax
mov edi, dword [eax + 4]
cmp edi, dword [eax + 0xc]
jae 0x5baeaa
mov dword [edi], str.Ttchildexitevents
rdtsc
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x18]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov ecx, dword [esp + 0x14]
mov dword [ecx + 4], eax
mov eax, dword [ebx]
mov ebx, esi
mov edi, dword [esp + 0x2c]
mov ecx, dword [eax + 0x30]
mov edi, dword [edi + 0xc]
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x5baec3
mov edi, dword [eax + 0x44]
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], 1
test edi, edi
je 0x5baee4
cmp byte [edi + 0x18], 0
mov eax, dword [edi + 0x14]
mov dword [esp + 0x18], eax
setne byte [esp + 0x13]
mov esi, dword [esp + 0x2c]
cmp byte [ebp], 0
je 0x5baf46
movzx eax, word [ebx + 0xb2]
shr eax, 1
push eax
push ecx
mov ecx, ebx
call fcn.005bb7c0
test eax, eax
je 0x5baf46
mov ecx, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
je 0x5baf1b
test edi, edi
je 0x5baf1b
mov eax, dword [eax + 0x68]
mov dword [edi + 0x14], eax
mov byte [edi + 0x18], 1
test ecx, ecx
je 0x5baf46
push ecx
mov ecx, dword [esp + 0x18]
call fcn.00598e20
mov ecx, dword [esp + 0x14]
mov ebx, eax
cmp byte [ebx + 0x58], 0
lea ebp, [ebx + 0x58]
je 0x5baf46
push esi
mov ecx, ebx
call fcn.005bbf30
mov ecx, dword [esp + 0x14]
jmp 0x5baee8
mov esi, dword [esp + 0x1c]
test edi, edi
je 0x5baf5c
mov eax, dword [esp + 0x18]
mov dword [edi + 0x14], eax
mov al, byte [esp + 0x13]
mov byte [edi + 0x18], al
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov edi, dword [ebx + 4]
cmp edi, dword [ebx + 0xc]
jae 0x5baf8b
mov dword [edi], 0x77f5ec
rdtsc
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov dword [ebx + 4], eax
mov edi, dword [esp + 0x24]
lea ebp, [esi + 0x58]
mov ebx, dword [esp + 0x2c]
cmp byte [esp + 0x28], 0
je 0x5bafa5
mov dword [esi + 0xa8], edi
jmp 0x5bafae
mov eax, dword [esi + 0x50]
mov dword [esi + 0xa8], eax
push edi
mov ecx, esi
call fcn.005bbee0
push ebx
mov ecx, esi
mov dword [esi + 0xa0], 0
call fcn.005bbf00
cmp byte [esp + 0x30], 0
je 0x5bb0ce
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov edi, dword [ebx + 4]
cmp edi, dword [ebx + 0xc]
jae 0x5bb002
mov dword [edi], str.Ttchildenterevents
rdtsc
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
lea eax, [edi + 0xc]
mov dword [edi + 4], ecx
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax]
mov edi, dword [eax + 0xc]
mov ebx, dword [ecx + 0x30]
test edi, edi
jne 0x5bb015
mov edi, dword [ecx + 0x44]
mov dword [esp + 0x28], 0
mov byte [esp + 0x30], 1
test edi, edi
je 0x5bb036
cmp byte [edi + 0x18], 0
mov eax, dword [edi + 0x14]
mov dword [esp + 0x28], eax
setne byte [esp + 0x30]
cmp byte [ebp], 0
je 0x5bb08d
movzx eax, word [esi + 0xb2]
mov ecx, esi
shr eax, 1
push eax
push ebx
call fcn.005bb7c0
test eax, eax
je 0x5bb08d
mov ecx, dword [eax]
mov eax, dword [eax + 4]
test eax, eax
je 0x5bb069
test edi, edi
je 0x5bb069
mov eax, dword [eax + 0x68]
mov dword [edi + 0x14], eax
mov byte [edi + 0x18], 1
test ecx, ecx
je 0x5bb08d
push ecx
mov ecx, ebx
call fcn.00598e20
mov esi, eax
cmp byte [esi + 0x58], 0
lea ebp, [esi + 0x58]
je 0x5bb08d
push dword [esp + 0x2c]
mov ecx, esi
call fcn.005bbf00
jmp 0x5bb036
test edi, edi
je 0x5bb09f
mov eax, dword [esp + 0x28]
mov dword [edi + 0x14], eax
mov al, byte [esp + 0x30]
mov byte [edi + 0x18], al
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x5bb0ce
mov dword [esi], 0x77f5ec
rdtsc
mov dword [esp + 0x30], eax
mov ecx, dword [esp + 0x30]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10