Function at 0x5b9bb0
Capabilities:
Get thread local storage value

Disassembly:
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x34]
push ebp
mov ebp, dword [esp + 0x34]
push esi
push edi
mov edi, ecx
mov eax, dword [ebp]
cmp byte [edi + 0x58], 0
mov edx, dword [eax + 0x30]
mov dword [esp + 0x14], edx
jne 0x5b9c84
cmp byte [esp + 0x48], 0
je 0x5b9be5
mov al, byte [esp + 0x4c]
jmp 0x5b9c6a
mov esi, dword [ebx]
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9c23
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9bfe
mov eax, edi
jmp 0x5b9c0d
mov ecx, dword [edx + 0x64]
push 0
cwde
add ecx, 0x38
push eax
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
jmp 0x5b9c40
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea eax, [eax + ecx*4]
mov ecx, dword [esp + 0x44]
cmp ecx, 0xffffffff
je 0x5b9c68
cmp ecx, dword [edi + 0x3c]
jne 0x5b9c68
mov ecx, dword [edi + 0xa8]
cmp dword [eax + 0x2c], ecx
jne 0x5b9c68
cmp ecx, dword [edi + 0x50]
je 0x5b9c68
test byte [eax + 0x3a], 0x40
jne 0x5b9c68
mov al, 1
jmp 0x5b9c6a
xor al, al
push 0
push ebp
push eax
mov eax, dword [ebx]
mov ecx, edi
push dword [eax + 0xc]
call fcn.005bae10
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14
cmp dword [edi + 0x98], 0
jle 0x5ba027
mov esi, dword [edi + 0x94]
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9cd3
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9cae
mov eax, edi
jmp 0x5b9cbd
mov ecx, dword [edx + 0x64]
push 0
cwde
add ecx, 0x38
push eax
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea ebp, [eax + edx*4]
jmp 0x5b9cf0
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea ebp, [eax + ecx*4]
mov esi, dword [ebx]
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9d32
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9d09
mov eax, edi
jmp 0x5b9d1c
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea ecx, [eax + edx*4]
jmp 0x5b9d4f
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea ecx, [eax + ecx*4]
mov ax, word [ebp + 0x38]
cmp ax, word [ecx + 0x38]
push dword [edi + 0x98]
setg byte [esp + 0x17]
call fcn.0046b820
add esp, 4
mov esi, eax
mov dword [esp + 0x34], esi
push dword [0x884adc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add esi, 0x7f
and esi, 0xffffff80
mov ecx, dword [eax + 0xc]
lea edx, [ecx + esi]
cmp esi, dword [eax + 8]
jg 0x5b9d97
cmp edx, dword [eax + 0x10]
ja 0x5b9d97
mov dword [eax + 0xc], edx
jmp 0x5b9da1
push esi
mov ecx, eax
call fcn.0046a3c0
mov ecx, eax
push dword [esp + 0x34]
mov dword [esp + 0x34], ecx
push ecx
lea ecx, [esp + 0x2c]
call fcn.0046b980
cmp byte [esp + 0x13], 0
jne 0x5b9fa4
cmp dword [edi + 0x98], 0
mov dword [esp + 0x1c], 0
jle 0x5b9ed2
xor ebp, ebp
mov esi, dword [edi + 0x94]
add esi, ebp
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9e1d
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9df4
mov eax, edi
jmp 0x5b9e07
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
jmp 0x5b9e3a
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea eax, [eax + ecx*4]
test byte [eax + 0x3a], 8
jne 0x5b9efe
mov esi, dword [edi + 0x94]
add esi, ebp
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9e8c
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9e63
mov eax, edi
jmp 0x5b9e76
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
jmp 0x5b9ea9
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea eax, [eax + ecx*4]
push 1
push eax
push 0x7d8954
lea ecx, [esp + 0x30]
call fcn.0046ba50
mov ecx, dword [esp + 0x1c]
add ebp, 0x18
inc ecx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [edi + 0x98]
jl 0x5b9dd5
xor ebp, ebp
cmp dword [ebx + 4], ebp
jle 0x5b9f9b
xor eax, eax
mov dword [esp + 0x18], eax
mov esi, dword [ebx]
add esi, eax
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5b9f31
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5b9f08
mov eax, edi
jmp 0x5b9f1b
mov byte [esp + 0x13], 1
jmp 0x5b9fa4
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
jmp 0x5b9f4e
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea eax, [eax + ecx*4]
push 0
push eax
lea ecx, [esp + 0x2c]
call fcn.0046b890
test eax, eax
je 0x5b9fe9
dec dword [ebx + 4]
mov edx, dword [ebx + 4]
cmp edx, ebp
je 0x5b9f8e
mov ecx, dword [esp + 0x18]
mov esi, 4
add ecx, dword [ebx]
shl edx, 4
add edx, dword [ebx]
sub edx, ecx
nop
mov eax, dword [edx + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
sub esi, 1
jne 0x5b9f80
mov eax, dword [esp + 0x18]
cmp ebp, dword [ebx + 4]
jl 0x5b9ee3
cmp dword [ebx + 4], 0
sete byte [esp + 0x13]
push 0x7d8954
lea ecx, [esp + 0x28]
call fcn.0046b3e0
mov esi, dword [esp + 0x34]
push dword [0x884adc]
mov ebp, dword [esp + 0x34]
add esi, 0x7f
and esi, 0xffffff80
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea edx, [esi + 0xf]
and edx, 0xfffffff0
cmp esi, dword [eax + 8]
jg 0x5b9ff7
lea ecx, [edx + ebp]
cmp ecx, dword [eax + 0xc]
jne 0x5b9ff7
cmp dword [eax + 0x14], ebp
je 0x5b9ff7
mov dword [eax + 0xc], ebp
jmp 0x5ba000
mov eax, dword [esp + 0x18]
inc ebp
add eax, 0x10
mov dword [esp + 0x18], eax
jmp 0x5b9f92
push edx
push ebp
mov ecx, eax
call fcn.0046a590
push 0x7d8954
lea ecx, [esp + 0x28]
call fcn.0046b3e0
lea ecx, [esp + 0x24]
call fcn.0046b110
cmp byte [esp + 0x13], 0
jne 0x5ba494
jmp 0x5ba114
mov ecx, dword [edi + 0x74]
test ecx, ecx
jle 0x5ba118
mov esi, dword [edi + 0x70]
shl ecx, 5
add esi, 0xffffffe0
add esi, ecx
je 0x5ba118
movzx eax, word [esi + 8]
cmp ax, 0xffff
jne 0x5ba080
movzx eax, word [esi + 0xc]
cmp ax, 0xffff
jne 0x5ba05b
mov eax, edi
jmp 0x5ba06a
mov ecx, dword [edx + 0x64]
push 0
cwde
add ecx, 0x38
push eax
call fcn.0046b890
movsx ecx, word [esi + 0xa]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea ebp, [eax + edx*4]
jmp 0x5ba09d
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 0xa]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea ebp, [eax + ecx*4]
test byte [ebp + 0x3a], 4
jne 0x5ba494
mov esi, dword [ebx]
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5ba0e9
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5ba0c0
mov eax, edi
jmp 0x5ba0d3
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea ecx, [eax + edx*4]
jmp 0x5ba106
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea ecx, [eax + ecx*4]
mov ax, word [ebp + 0x38]
cmp ax, word [ecx + 0x38]
jg 0x5ba494
mov edx, dword [esp + 0x14]
lea ebp, [edi + 0x94]
mov eax, edi
mov dword [ebp + 4], 0
cmp byte [edi + 0x26], 2
jne 0x5ba135
push edi
mov ecx, edx
call fcn.00598ff0
push 0
push eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + 0x5c]
call fcn.0046b890
mov edx, dword [esp + 0x14]
shl eax, 7
mov ecx, dword [edx + 0x58]
mov ecx, dword [ecx]
add eax, ecx
mov dword [esp + 0x18], eax
cmp byte [eax + 0x7d], 0
je 0x5ba168
mov eax, dword [eax + 0x5c]
shl eax, 7
add eax, ecx
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], eax
cmp dword [ebx + 4], eax
jle 0x5ba2ba
xor esi, esi
jmp 0x5ba184
mov edx, dword [esp + 0x14]
mov ebp, dword [ebx]
add ebp, esi
movzx eax, word [ebp]
cmp ax, 0xffff
jne 0x5ba1c5
movzx eax, word [ebp + 4]
cmp ax, 0xffff
jne 0x5ba1a0
mov eax, edi
jmp 0x5ba1af
mov ecx, dword [edx + 0x64]
push 0
cwde
add ecx, 0x38
push eax
call fcn.0046b890
movsx ecx, word [ebp + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea edx, [eax + edx*4]
jmp 0x5ba1e2
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [ebp + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea edx, [eax + ecx*4]
mov ebp, dword [ebx]
mov dword [esp + 0x20], edx
cmp word [esi + ebp], 0xffff
movsx eax, word [esi + ebp + 2]
jne 0x5ba1fc
add eax, dword [edi + 0x88]
jmp 0x5ba1ff
add eax, dword [edi + 0x7c]
movzx ecx, word [edx + 0x3a]
test cl, 2
je 0x5ba211
test byte [eax], 2
je 0x5ba29f
test ecx, 0x4000
je 0x5ba371
mov eax, dword [esp + 0x18]
cmp byte [eax + 0x4d], 0
jne 0x5ba29f
movzx eax, word [esi + ebp + 6]
cmp ax, 0xffff
jne 0x5ba26b
movzx eax, word [esi + ebp + 0xa]
cmp ax, 0xffff
jne 0x5ba241
mov eax, edi
jmp 0x5ba254
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + ebp + 8]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea eax, [eax + edx*4]
jmp 0x5ba289
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + ebp + 8]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea eax, [eax + ecx*4]
push dword [eax + 0x20]
mov ecx, edi
push dword [esp + 0x1c]
call fcn.005bb870
test al, al
jne 0x5ba36d
mov eax, dword [esp + 0x1c]
add esi, 0x10
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [ebx + 4]
jl 0x5ba180
lea ebp, [edi + 0x94]
mov ecx, dword [ebp + 8]
mov esi, dword [ebx + 4]
and ecx, 0x3fffffff
cmp ecx, esi
jge 0x5ba2e4
add ecx, ecx
mov eax, esi
cmp esi, ecx
push 0x18
cmovl eax, ecx
push eax
push ebp
push 0x7d8954
call fcn.00467b80
add esp, 0x10
mov eax, dword [ebp + 4]
mov edx, esi
mov ecx, dword [ebp]
sub edx, eax
lea eax, [eax + eax*2]
test edx, edx
jle 0x5ba32d
lea ecx, [ecx + eax*8]
mov ebx, 0xfffffffe
add ecx, 0xa
or ebp, 0xffffffff
lea eax, [ecx - 0xa]
test eax, eax
je 0x5ba321
mov word [ecx - 0xa], bx
mov word [ecx - 8], bp
mov word [ecx - 6], bp
mov word [ecx - 4], bx
mov word [ecx - 2], bp
mov word [ecx], bp
add ecx, 0x18
sub edx, 1
jne 0x5ba303
mov ebx, dword [esp + 0x40]
lea edx, [edi + 0x94]
mov dword [esp + 0x20], 0
mov dword [edx + 4], esi
cmp dword [ebx + 4], 0
jle 0x5ba488
xor ebp, ebp
xor eax, eax
mov dword [esp + 0x40], eax
mov ecx, dword [ebx]
add ecx, eax
mov eax, dword [edx]
cmp byte [esp + 0x48], 0
movups xmm0, xmmword [ecx]
movups xmmword [eax + ebp], xmm0
je 0x5ba3be
mov cl, byte [esp + 0x4c]
jmp 0x5ba451
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x5ba39c
cmp eax, dword [edi + 0x3c]
jne 0x5ba39c
mov eax, dword [edi + 0xa8]
cmp dword [edx + 0x2c], eax
jne 0x5ba39c
cmp eax, dword [edi + 0x50]
je 0x5ba39c
test byte [edx + 0x3a], 0x40
jne 0x5ba39c
mov eax, 1
jmp 0x5ba39e
xor eax, eax
push eax
mov eax, dword [esp + 0x20]
mov ecx, edi
shl eax, 4
add eax, dword [ebx]
push eax
push dword [esp + 0x44]
call fcn.005ba4a0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14
mov esi, dword [ebx]
add esi, dword [esp + 0x40]
movzx eax, word [esi]
cmp ax, 0xffff
jne 0x5ba404
movzx eax, word [esi + 4]
cmp ax, 0xffff
jne 0x5ba3db
mov eax, edi
jmp 0x5ba3ee
mov ecx, dword [esp + 0x14]
push 0
cwde
push eax
mov ecx, dword [ecx + 0x64]
add ecx, 0x38
call fcn.0046b890
movsx ecx, word [esi + 2]
mov eax, dword [eax + 0x68]
mov edx, ecx
shl edx, 4
sub edx, ecx
mov eax, dword [eax + 8]
lea ecx, [eax + edx*4]
jmp 0x5ba421
movsx ecx, ax
mov eax, dword [edi + 0x5c]
mov eax, dword [eax + ecx*4]
mov edx, dword [eax + 0x30]
movsx eax, word [esi + 2]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov eax, dword [edx + 8]
lea ecx, [eax + ecx*4]
mov eax, dword [esp + 0x44]
cmp eax, 0xffffffff
je 0x5ba449
cmp eax, dword [edi + 0x3c]
jne 0x5ba449
mov eax, dword [edi + 0xa8]
cmp dword [ecx + 0x2c], eax
jne 0x5ba449
cmp eax, dword [edi + 0x50]
je 0x5ba449
test byte [ecx + 0x3a], 0x40
jne 0x5ba449
mov cl, 1
jmp 0x5ba44b
xor cl, cl
lea edx, [edi + 0x94]
mov eax, dword [edx]
mov byte [eax + ebp + 0x14], cl
mov eax, dword [edx]
mov ecx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x20], ecx
mov byte [eax + ebp + 0x15], 1
mov eax, dword [edx]
mov dword [eax + ebp + 0x10], 0
add ebp, 0x18
mov eax, dword [esp + 0x40]
add eax, 0x10
mov dword [esp + 0x40], eax
cmp ecx, dword [ebx + 4]
jl 0x5ba350
mov ecx, dword [esp + 0x3c]
mov al, byte [0x7a4d1d]
or byte [ecx + 0x18], al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x14