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

Disassembly:
sub esp, 0x4c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
push ebp
push esi
push edi
push dword [0x884c50]
mov dword [esp + 0x14], ecx
call ebx
mov edi, eax
mov esi, dword [edi + 4]
cmp esi, dword [edi + 0xc]
jae 0x599acc
mov dword [esi], str.Ttexpand_output_pool
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
mov edi, dword [esp + 0x60]
push dword [0x884adc]
mov eax, dword [edi + 0x30]
mov eax, dword [eax]
mov esi, dword [eax]
mov ebp, esi
call ebx
and ebp, 0xfffffff0
add ebp, 0x7f
and ebp, 0xffffff80
mov edx, dword [eax + 0xc]
mov dword [esp + 0x50], ebp
mov dword [esp + 0x28], edx
lea ecx, [edx + ebp]
cmp ebp, dword [eax + 8]
jg 0x599b07
cmp ecx, dword [eax + 0x10]
ja 0x599b07
mov dword [eax + 0xc], ecx
jmp 0x599b15
push ebp
mov ecx, eax
call fcn.0046a3c0
mov edx, eax
mov dword [esp + 0x28], eax
mov dword [edx], esi
lea ebp, [edx + 8]
mov ecx, dword [edi + 0x30]
mov dword [esp + 0x54], edx
mov byte [esp + 0x58], 0
mov ebx, dword [ecx]
mov edi, dword [ebx + 4]
mov dword [esp + 0x30], edi
inc edi
shl edi, 4
sar edi, 4
mov ecx, dword [ebx + 4]
lea ebp, [ebp + 0x10]
mov edx, dword [ebx + 8]
lea ebx, [ebx + 0x10]
mov esi, dword [ebx - 4]
dec edi
mov eax, dword [ebx - 0x10]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], esi
test edi, edi
jg 0x599b36
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x60]
test edx, edx
jle 0x599b84
xor ecx, ecx
nop word [eax + eax]
mov eax, dword [esp + 0x54]
lea ecx, [ecx + 0x10]
mov dword [eax + ecx + 8], 0
sub edx, 1
jne 0x599b70
mov eax, dword [edi + 8]
and eax, 0x3fffffff
cmp dword [edi + 4], eax
jne 0x599ba1
push 4
push edi
push 0x7d8954
call fcn.00467c00
add esp, 0xc
mov ecx, dword [edi + 4]
lea edx, [esp + 0x54]
mov eax, dword [edi]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [eax + ecx*4], edx
inc dword [edi + 4]
push dword [0x884c50]
call ebp
mov ebx, eax
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 0xc]
jae 0x599be1
mov dword [esi], 0x77f5ec
rdtsc
mov dword [esp + 0x60], eax
mov ecx, dword [esp + 0x60]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [ebx + 4], eax
mov eax, dword [edi + 0x28]
mov ecx, dword [edi + 0x44]
mov dword [esp + 0x24], ecx
mov eax, dword [eax + 0x58]
mov dword [esp + 0x14], eax
mov esi, dword [eax + 4]
cmp ecx, esi
jge 0x599d07
nop dword [eax]
mov ebp, dword [edi + 0x44]
cmp ebp, ecx
jne 0x599c46
lea edx, [ebp + 1]
xor bl, bl
cmp edx, esi
jge 0x599c3e
mov ecx, edx
shl ecx, 7
test bl, bl
jne 0x599c46
mov eax, dword [eax]
cmp byte [eax + ecx + 0x79], bl
je 0x599c2e
mov eax, dword [eax + ecx + 0x54]
mov bl, 1
mov dword [esp + 0x24], edx
prefetchnta byte [eax]
mov eax, dword [esp + 0x14]
inc edx
sub ecx, 0xffffff80
cmp edx, esi
jl 0x599c15
test bl, bl
jne 0x599c46
mov dword [esp + 0x24], 0xffffffff
mov eax, dword [esp + 0x14]
mov ebx, ebp
shl ebx, 7
add ebx, dword [eax]
mov dword [esp + 0x2c], ebx
cmp byte [ebx + 0x79], 0
jne 0x599c6c
lea eax, [ebp + 1]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [edi + 0x44], eax
jmp 0x59a0c7
mov edx, dword [ebx + 0x54]
lea eax, [esi - 1]
mov ecx, dword [ebx + 0x64]
mov byte [esp + 0x60], 0
mov dword [esp + 0x30], edx
mov dword [esp + 0x20], ecx
cmp ebp, eax
jne 0x599c92
mov esi, dword [edi + 0x30]
mov dword [esp + 0x1c], esi
jmp 0x599dc8
cmp ecx, 1
jne 0x599cd9
mov eax, dword [edx]
mov ecx, edx
mov eax, dword [eax + 0x60]
call eax
mov edx, dword [esp + 0x10]
test al, al
je 0x599cdd
mov eax, dword [edx + 0x60]
mov ecx, dword [ebx + 0x68]
mov eax, dword [eax]
mov esi, dword [eax + ecx*4]
mov ecx, esi
mov eax, dword [esp + 0x14]
shl ecx, 7
mov eax, dword [eax]
cmp dword [ecx + eax + 0x60], 1
jne 0x599cdd
mov eax, dword [edi + 0x14]
mov byte [esp + 0x60], 1
mov esi, dword [eax + esi*4]
mov dword [esp + 0x1c], esi
jmp 0x599dc8
mov edx, dword [esp + 0x10]
mov ecx, dword [edi + 0x44]
mov eax, dword [edi + 0x14]
mov esi, dword [eax + ecx*4]
mov ecx, dword [edi + 4]
mov dword [esp + 0x1c], esi
test ecx, ecx
jne 0x599d67
test esi, esi
jne 0x599dc8
push edi
mov ecx, edx
call fcn.00599a90
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp byte [esp + 0x58], 0
je 0x599d26
push dword [0x884adc]
mov esi, dword [esp + 0x58]
call ebp
push esi
push dword [eax + 0x2c]
call fcn.00460680
add esp, 8
push dword [0x884adc]
call ebp
mov ecx, dword [esp + 0x50]
mov esi, dword [esp + 0x28]
lea edx, [ecx + 0xf]
and edx, 0xfffffff0
cmp ecx, dword [eax + 8]
jg 0x59a0e0
lea ecx, [edx + esi]
cmp ecx, dword [eax + 0xc]
jne 0x59a0e0
cmp dword [eax + 0x14], esi
je 0x59a0e0
pop edi
mov dword [eax + 0xc], esi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 4
test esi, esi
jne 0x599dc8
mov eax, dword [edi]
xor edx, edx
mov esi, dword [eax + ecx*4 - 4]
lea eax, [ecx - 1]
mov dword [edi + 4], eax
mov dword [esp + 0x1c], esi
mov eax, dword [esi]
cmp dword [eax + 4], edx
jle 0x599dbc
xor ecx, ecx
nop word [eax + eax]
mov eax, dword [esi]
mov dword [eax + ecx + 0x18], 0
mov eax, dword [esi]
and byte [eax + ecx + 0x1c], 0xfe
mov eax, dword [esi]
test byte [eax + ecx + 0x1c], 6
je 0x599db1
xor ebp, ebp
mov word [eax + ecx + 0x12], bp
mov eax, dword [esi]
inc edx
add ecx, 0x10
cmp edx, dword [eax + 4]
jl 0x599d90
push esi
push dword [edi + 0x30]
call fcn.005d3280
add esp, 8
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, dword [esp + 0x20]
mov ecx, dword [eax + 0xc]
lea edx, [ebp*4 + 0x7f]
mov dword [esp + 0x18], ecx
and edx, 0xffffff80
add ecx, edx
mov dword [esp + 0x4c], edx
cmp edx, dword [eax + 8]
jg 0x599e02
cmp ecx, dword [eax + 0x10]
ja 0x599e02
mov dword [eax + 0xc], ecx
mov eax, dword [esp + 0x18]
jmp 0x599e0e
push edx
mov ecx, eax
call fcn.0046a3c0
mov dword [esp + 0x18], eax
xor edx, edx
test ebp, ebp
jle 0x599e5d
mov esi, dword [esp + 0x2c]
mov ebx, eax
nop word [eax + eax]
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x68]
add ecx, edx
mov eax, dword [eax + 0x60]
mov eax, dword [eax]
mov ebp, dword [eax + ecx*4]
mov ecx, ebp
mov eax, dword [esp + 0x14]
shl ecx, 7
mov eax, dword [eax]
cmp byte [ecx + eax + 0x79], 0
je 0x599e4e
mov eax, dword [edi + 0x14]
mov eax, dword [eax + ebp*4]
mov dword [ebx], eax
add ebx, 4
inc edx
cmp edx, dword [esp + 0x20]
jl 0x599e20
mov esi, dword [esp + 0x1c]
mov ebx, dword [esp + 0x2c]
mov ecx, dword [edi + 0x2c]
mov eax, dword [ebx + 0x58]
mov dword [ecx + 4], eax
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
mov ecx, dword [ebp + 4]
cmp ecx, dword [ebp + 0xc]
jae 0x599e9c
mov dword [ecx], str.Ltgenerate
mov dword [ecx + 0xc], str.StCopyVariablesToMembers
rdtsc
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
mov dword [ecx + 4], eax
lea eax, [ecx + 0x10]
mov dword [ebp + 4], eax
mov ecx, dword [esp + 0x30]
push 0
push dword [edi + 0x2c]
call fcn.00594f40
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x2c], eax
mov ebp, dword [eax + 4]
cmp ebp, dword [eax + 0xc]
jae 0x599ee0
mov dword [ebp], str.StGenerateFunction
rdtsc
mov dword [esp + 0x38], eax
mov ecx, dword [esp + 0x38]
lea eax, [ebp + 0xc]
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x2c]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0x38]
test ecx, ecx
jne 0x599eec
xorps xmm0, xmm0
jmp 0x599ef4
mov eax, dword [edi + 0x44]
movss xmm0, dword [ecx + eax*4]
mov ecx, dword [esp + 0x30]
push ecx
movss dword [esp], xmm0
push esi
push dword [esp + 0x20]
mov eax, dword [ecx]
push dword [edi + 0x2c]
call dword [eax + 0x5c]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x30], eax
mov ebp, dword [eax + 4]
cmp ebp, dword [eax + 0xc]
jae 0x599f41
mov dword [ebp], str.StHandleOutput
rdtsc
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x3c]
lea eax, [ebp + 0xc]
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x30]
mov dword [ecx + 4], eax
cmp dword [edi + 0x38], 0
jne 0x599f5a
mov eax, dword [edi + 0x2c]
mov ecx, dword [eax + 0x14]
test ecx, ecx
je 0x599f5a
mov eax, dword [ecx]
push esi
push dword [ebx + 0x50]
call dword [eax + 0xc]
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp + 0x30], eax
mov ebp, dword [eax + 4]
cmp ebp, dword [eax + 0xc]
jae 0x599f90
mov dword [ebp], 0x77f784
rdtsc
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x40]
lea eax, [ebp + 0xc]
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x30]
mov dword [ecx + 4], eax
mov ecx, dword [edi + 0x44]
mov eax, dword [edi + 0x14]
mov dword [eax + ecx*4], esi
push dword [0x884c50]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
mov esi, dword [ebp + 4]
cmp esi, dword [ebp + 0xc]
jae 0x599fc8
mov dword [esi], str.Ttgive_back_to_output_pool
rdtsc
mov dword [esp + 0x44], eax
mov ecx, dword [esp + 0x44]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [ebp + 4], eax
mov edx, dword [esp + 0x20]
xor esi, esi
test edx, edx
jle 0x59a05d
mov ebp, dword [esp + 0x10]
nop word [eax + eax]
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebx + 0x68]
add ecx, esi
mov eax, dword [eax]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esp + 0x14]
shl ecx, 7
add ecx, dword [eax]
cmp byte [ecx + 0x79], 0
je 0x59a058
inc dword [ecx + 0x74]
mov eax, dword [ecx + 0x74]
cmp dword [ecx + 0x60], eax
jne 0x59a058
cmp byte [esp + 0x60], 0
mov dword [ecx + 0x74], 0
jne 0x59a058
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebx + 0x68]
add ecx, esi
mov eax, dword [eax]
mov ecx, dword [eax + ecx*4]
mov eax, dword [edi + 0x14]
mov ebp, dword [eax + ecx*4]
mov eax, dword [edi + 8]
and eax, 0x3fffffff
cmp dword [edi + 4], eax
jne 0x59a049
push 4
push edi
push 0x7d8954
call fcn.00467c00
mov edx, dword [esp + 0x2c]
add esp, 0xc
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov dword [eax + ecx*4], ebp
inc dword [edi + 4]
mov ebp, dword [esp + 0x10]
inc esi
cmp esi, edx
jl 0x599fe0
push dword [0x884c50]
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call ebp
mov ebx, eax
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 0xc]
jae 0x59a08e
mov dword [esi], 0x77f5ec
rdtsc
mov dword [esp + 0x48], eax
mov ecx, dword [esp + 0x48]
lea eax, [esi + 0xc]
mov dword [esi + 4], ecx
mov dword [ebx + 4], eax
inc dword [edi + 0x44]
push dword [0x884adc]
call ebp
mov ecx, dword [esp + 0x4c]
mov ebx, dword [esp + 0x18]
lea edx, [ecx + 0xf]
and edx, 0xfffffff0
cmp ecx, dword [eax + 8]
jg 0x59a0be
lea ecx, [edx + ebx]
cmp ecx, dword [eax + 0xc]
jne 0x59a0be
cmp dword [eax + 0x14], ebx
je 0x59a0be
mov dword [eax + 0xc], ebx
jmp 0x59a0c7
push edx
push ebx
mov ecx, eax
call fcn.0046a590
mov eax, dword [esp + 0x14]
mov esi, dword [eax + 4]
cmp dword [edi + 0x44], esi
jge 0x599d07
mov ecx, dword [esp + 0x24]
jmp 0x599c00
push edx
push esi
mov ecx, eax
call fcn.0046a590
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 4