Function at 0x596a40
Capabilities:
Get thread local storage value
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
mov ebx, dword [esi + 0x58]
mov dword [esi], vtable.hkbBehaviorGraph.0
test ebx, ebx
je 0x596a90
cmp dword [esi + 0x7c], 0
mov ebx, dword [ebx + 4]
jne 0x596a90
test ebx, ebx
jle 0x596a90
xor edi, edi
mov eax, dword [esi + 0x58]
mov ecx, esi
mov eax, dword [eax]
push dword [eax + edi + 0x50]
call fcn.00598e20
mov cl, byte [eax + 0x26]
cmp cl, 2
je 0x596a81
cmp cl, 3
jne 0x596a88
mov ecx, eax
call fcn.0045c160
sub edi, 0xffffff80
sub ebx, 1
jne 0x596a64
cmp dword [esi + 0x4c], 0
je 0x596b3e
mov ecx, dword [esi + 0x4c]
test ecx, ecx
je 0x596aa6
call fcn.0045c160
mov dword [esi + 0x4c], 0
mov eax, dword [esi + 0x54]
test eax, eax
je 0x596b3e
push 0
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
push ecx
push 4
push esi
push eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], connect
call fcn.005c3770
mov ebx, dword [esp + 0x24]
add esp, 0x14
test ebx, ebx
jle 0x596b09
xor edi, edi
nop dword [eax]
mov eax, dword [esp + 0xc]
push 0
mov ecx, dword [edi + eax + 0x50]
mov eax, dword [ecx]
call dword [eax]
lea edi, [edi + 0x80]
sub ebx, 1
jne 0x596af0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x10], 0
test eax, eax
js 0x596b33
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 7
push eax
mov eax, dword [0x7d8954]
push dword [esp + 0x10]
call dword [eax + 0x10]
push dword [esi + 0x54]
call fcn.0049e1e0
add esp, 4
mov edi, dword [esi + 0x48]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsGetValue]
test edi, edi
je 0x596b5e
push dword [0x884adc]
call ebx
push 8
push edi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
push 0
mov ecx, esi
call fcn.005984f0
push 0
mov ecx, esi
call fcn.00598520
push 0
mov ecx, esi
call fcn.00598550
push 0
mov ecx, esi
call fcn.00598580
push 0
mov ecx, esi
call fcn.00598440
push 0
mov ecx, esi
call fcn.00599140
mov ecx, esi
call fcn.0059b4d0
mov ecx, dword [esi + 0x78]
test ecx, ecx
je 0x596ba7
call fcn.0045c160
cmp dword [esi + 0x7c], 0
jne 0x596bda
mov edi, dword [esi + 0x38]
test edi, edi
je 0x596bda
push 0x7d8954
mov ecx, edi
call fcn.0046b3e0
mov ecx, edi
call fcn.0046b110
push dword [0x884adc]
call ebx
push 0xc
push edi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
mov edi, dword [esi + 0x7c]
mov dword [esi + 0x38], 0
test edi, edi
je 0x596c0e
push 0x7d8954
mov ecx, edi
call fcn.0046b3e0
mov ecx, edi
call fcn.0046b110
push dword [0x884adc]
call ebx
push 0xc
push edi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
mov edi, dword [esi + 0x80]
test edi, edi
je 0x596c3e
push 0x7d8954
mov ecx, edi
call fcn.0046b3e0
mov ecx, edi
call fcn.0046b110
push dword [0x884adc]
call ebx
push 0xc
push edi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
mov edx, dword [esi + 0x84]
test edx, edx
je 0x596cd1
mov ecx, dword [edx + 8]
xor edi, edi
test ecx, ecx
js 0x596c64
mov eax, dword [edx]
cmp dword [eax], 0xffffffff
jne 0x596c64
inc edi
add eax, 8
cmp edi, ecx
jle 0x596c57
cmp edi, ecx
jg 0x596ca1
nop dword [eax + eax]
mov ecx, dword [edx]
mov ecx, dword [ecx + edi*8 + 4]
call fcn.0045c160
mov edx, dword [esi + 0x84]
inc edi
mov ecx, dword [edx + 8]
cmp edi, ecx
jg 0x596ca1
mov eax, dword [edx]
lea eax, [eax + edi*8]
nop
cmp dword [eax], 0xffffffff
jne 0x596c9d
inc edi
add eax, 8
cmp edi, ecx
jle 0x596c90
cmp edi, ecx
jle 0x596c70
mov edi, dword [esi + 0x84]
test edi, edi
je 0x596cd1
push 0x7d8954
mov ecx, edi
call fcn.0046b3e0
mov ecx, edi
call fcn.0046b110
push dword [0x884adc]
call ebx
push 0xc
push edi
mov ecx, dword [eax + 0x2c]
mov eax, dword [ecx]
call dword [eax + 8]
mov ecx, esi
call fcn.0059b630
mov eax, dword [esi + 0xa4]
mov dword [esi + 0xa0], 0
test eax, eax
js 0x596d08
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esi + 0x9c]
call dword [eax + 0x10]
mov dword [esi + 0x9c], 0
mov dword [esi + 0xa4], connect
mov eax, dword [esi + 0x98]
mov dword [esi + 0x94], 0
test eax, eax
js 0x596d4c
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esi + 0x90]
call dword [eax + 0x10]
mov dword [esi + 0x90], 0
mov dword [esi + 0x98], connect
mov ecx, dword [esi + 0x74]
test ecx, ecx
je 0x596d6c
call fcn.0045c160
mov dword [esi + 0x74], 0
mov ecx, dword [esi + 0x70]
test ecx, ecx
je 0x596d7f
call fcn.0045c160
mov dword [esi + 0x70], 0
mov ecx, dword [esi + 0x6c]
test ecx, ecx
je 0x596d92
call fcn.0045c160
mov dword [esi + 0x6c], 0
mov ecx, dword [esi + 0x68]
test ecx, ecx
je 0x596da5
call fcn.0045c160
mov dword [esi + 0x68], 0
mov ecx, dword [esi + 0x64]
test ecx, ecx
je 0x596db8
call fcn.0045c160
mov dword [esi + 0x64], 0
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x596dcb
call fcn.0045c160
mov dword [esi + 0x50], 0
mov ecx, dword [esi + 0x4c]
test ecx, ecx
je 0x596dde
call fcn.0045c160
mov dword [esi + 0x4c], 0
mov eax, dword [esi + 0x44]
mov dword [esi + 0x40], 0
test eax, eax
js 0x596e0c
and eax, 0x3fffffff
mov ecx, 0x7d8954
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esi + 0x3c]
call dword [eax + 0x10]
mov dword [esi + 0x3c], 0
mov dword [esi + 0x44], connect
mov eax, dword [esi + 0x34]
mov dword [esi + 0x30], 0
test eax, eax
js 0x596e40
and eax, 0x3fffffff
mov ecx, 0x7d8954
add eax, eax
push eax
mov eax, dword [0x7d8954]
push dword [esi + 0x2c]
call dword [eax + 0x10]
lea ecx, [esi + 0x20]
mov dword [esi + 0x2c], 0
mov dword [esi + 0x34], connect
call fcn.0045d990
mov eax, dword [esi + 0x14]
mov dword [esi + 0x10], 0
test eax, eax
js 0x596e80
and eax, 0x3fffffff
mov ecx, 0x7d8954
lea eax, [eax + eax*2]
shl eax, 2
push eax
mov eax, dword [0x7d8954]
push dword [esi + 0xc]
call dword [eax + 0x10]
mov dword [esi + 0xc], 0
mov dword [esi + 0x14], connect
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x596e9a
call fcn.0045c160
mov dword [esi + 8], 0
pop edi
mov dword [esi], vtable.hkBaseObject.0
pop esi
pop ebx
add esp, 0xc
ret