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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x68
push esi
push edi
push dword [0x884c50]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x18], ecx
call edi
mov ecx, eax
mov esi, dword [ecx + 4]
cmp esi, dword [ecx + 0xc]
jae 0x5980d7
mov dword [esi], str.LthkbBehaviorGraph::generate
mov dword [esi + 0xc], str.StpreGenerate
rdtsc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 4], eax
lea eax, [esi + 0x10]
mov dword [ecx + 4], eax
push dword [0x884adc]
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], connect
mov dword [esp + 0x34], 0xa
call edi
cmp dword [eax + 8], 0x80
mov ecx, dword [eax + 0xc]
lea edx, [ecx + 0x80]
jl 0x59811b
cmp edx, dword [eax + 0x10]
ja 0x59811b
mov dword [eax + 0xc], edx
jmp 0x598129
push 0x80
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], reloc.WSOCK32.dll_inet_addr
mov dword [esp + 0x2c], ecx
mov eax, dword [eax + 0x58]
mov esi, dword [eax + 4]
mov edi, esi
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], connect
mov dword [esp + 0x44], edi
test esi, esi
je 0x5981a4
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi*4 + 0x7f]
and edx, 0xffffff80
mov ecx, dword [eax + 0xc]
lea edi, [ecx + edx]
cmp edx, dword [eax + 8]
jg 0x598194
cmp edi, dword [eax + 0x10]
ja 0x598194
mov dword [eax + 0xc], edi
mov edi, dword [esp + 0x44]
jmp 0x5981a6
push edx
mov ecx, eax
call fcn.0046a3c0
mov edi, dword [esp + 0x44]
mov ecx, eax
jmp 0x5981a6
xor ecx, ecx
mov eax, dword [esp + 0x14]
or esi, 0x80000000
movss xmm0, dword [ebp + 0x14]
mov dword [esp + 0x48], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x3c], esi
and esi, 0x3fffffff
mov dword [esp + 0x50], eax
or eax, 0xffffffff
mov dword [esp + 0x34], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
movss dword [esp + 0x60], xmm0
mov dword [esp + 0x64], 0
mov word [esp + 0x68], ax
mov word [esp + 0x6a], 0x101
cmp esi, edi
jge 0x598235
lea ecx, [esi + esi]
mov eax, edi
cmp edi, ecx
push 4
cmovl eax, ecx
push eax
lea eax, [esp + 0x3c]
push eax
push 0x7d8954
call fcn.00467b80
mov ecx, dword [esp + 0x50]
add esp, 0x10
mov esi, dword [esp + 0x14]
mov dword [esp + 0x38], edi
mov eax, dword [esi + 0x58]
mov eax, dword [eax + 4]
shl eax, 2
push eax
push 0
push ecx
call fcn.0045d830
mov al, byte [ebp + 0x10]
add esp, 0xc
mov byte [esp + 0x6a], al
mov ecx, esi
lea eax, [esp + 0x20]
push 1
push dword [ebp + 0x18]
push eax
call fcn.005985d0
push dword [0x884c50]
mov edi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call edi
mov dword [esp + 0x1c], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x5982a1
mov dword [esi], str.StgenerateInternal
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 ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.00599a90
push dword [0x884c50]
call edi
mov dword [esp + 0x18], eax
mov esi, dword [eax + 4]
cmp esi, dword [eax + 0xc]
jae 0x5982e0
mov dword [esi], str.StpostGenerate
rdtsc
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov ecx, dword [esp + 0x18]
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x20]
push eax
call fcn.00598980
push dword [0x884c50]
call edi
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x598319
mov dword [esi], 0x77f784
rdtsc
mov dword [esp + 0x1c], eax
mov ecx, dword [esp + 0x1c]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [edi + 4], eax
lea ecx, [esp + 0x20]
call fcn.0059b8f0
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x14