Function at 0x45a930
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x4af588]
sub esp, 8
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x45a1c6
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov ecx, dword [edi + 0x9078]
mov esi, dword [edi + 0x9084]
mov ebx, dword [edi + 0x9080]
mov dword [esp + 0x10], ecx
mov ecx, esi
and ecx, 7
sub esi, ecx
shr ebx, cl
cmp esi, 0x10
jae 0x45a20e
lea ebp, [edi + 0x9088]
push edi
push ebp
call fcn.004588f0
xor edx, edx
mov ecx, esi
mov dx, word [ebp]
add esi, 8
shl edx, cl
add esp, 8
or ebx, edx
cmp esi, 0x10
jb 0x45a1f0
mov eax, ebx
sub esi, 0x10
and eax, 0xffff
shr ebx, 0x10
cmp esi, 0x10
mov dword [esp + 0x14], eax
jae 0x45a248
lea ebp, [edi + 0x9088]
push edi
push ebp
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 0x10
jb 0x45a22a
mov eax, dword [esp + 0x14]
mov ecx, ebx
not ecx
and ecx, 0xffff
cmp eax, ecx
je 0x45a267
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
mov eax, dword [edi]
sub esi, 0x10
shr ebx, 0x10
test eax, eax
jne 0x45a2e0
mov eax, dword [esp + 0x14]
mov edx, eax
dec eax
test edx, edx
mov dword [esp + 0x14], eax
je 0x45a2e0
cmp esi, 8
jae 0x45a2ab
lea ebp, [edi + 0x9088]
push edi
push ebp
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 8
jb 0x45a28d
mov eax, dword [esp + 0x10]
mov byte [eax + edi + 0xcd6], bl
inc eax
cmp eax, 0x8000
mov dword [esp + 0x10], eax
jne 0x45a2d4
push edi
push eax
call fcn.00459d10
add esp, 8
mov dword [esp + 0x10], 0
mov eax, dword [edi]
sub esi, 8
shr ebx, 8
test eax, eax
je 0x45a273
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x9080], ebx
mov dword [edi + 0x9078], ecx
mov dword [edi + 0x9084], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
sub esp, 0x490
push esi
push edi
mov ecx, 0x90
mov eax, 8
lea edi, [esp + 0x18]
lea edx, [esp + 0x18]
rep stosd dword es:[edi], eax
mov ecx, 0x70
mov eax, 9
lea edi, [esp + 0x258]
mov dword [esp + 0xc], 7
rep stosd dword es:[edi], eax
mov ecx, 0x18
mov eax, 7
lea edi, [esp + 0x418]
rep stosd dword es:[edi], eax
mov ecx, 8
lea edi, [esp + 0x478]
mov eax, ecx
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
lea ecx, [esp + 8]
push eax
push ecx
push 0x4a7b04
push 0x4a7ac4
push 0x101
push 0x120
push edx
call fcn.004597f0
add esp, 0x1c
test eax, eax
jne 0x45a428
mov ecx, 0x1e
mov eax, 5
lea edi, [esp + 0x18]
mov dword [esp + 0x14], eax
rep stosd dword es:[edi], eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x4a7b80
push 0x4a7b44
push 0
lea edx, [esp + 0x2c]
push 0x1e
push edx
call fcn.004597f0
mov esi, eax
add esp, 0x1c
cmp esi, 1
jle 0x45a3e1
mov eax, dword [esp + 8]
push eax
call fcn.00459ce0
add esp, 4
mov eax, esi
pop edi
pop esi
add esp, 0x490
ret
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
push ecx
mov ecx, dword [esp + 0xc]
push edx
push eax
push ecx
call fcn.00459da0
add esp, 0x10
test eax, eax
je 0x45a40f
pop edi
mov eax, 1
pop esi
add esp, 0x490
ret
mov edx, dword [esp + 8]
push edx
call fcn.00459ce0
mov eax, dword [esp + 0x14]
push eax
call fcn.00459ce0
add esp, 8
xor eax, eax
pop edi
pop esi
add esp, 0x490
ret
mov eax, dword [0x4af588]
sub esp, 0x518
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebp, eax
test ebp, ebp
je 0x45a917
mov esi, dword [ebp + 0x9084]
mov ebx, dword [ebp + 0x9080]
cmp esi, 5
jae 0x45a496
lea edi, [ebp + 0x9088]
push ebp
push edi
call fcn.004588f0
xor ecx, ecx
add esp, 8
mov cx, word [edi]
mov edx, ecx
mov ecx, esi
shl edx, cl
add esi, 8
or ebx, edx
cmp esi, 5
jb 0x45a477
mov edx, ebx
sub esi, 5
and edx, 0x1f
add edx, 0x101
shr ebx, 5
cmp esi, 5
mov dword [esp + 0x24], edx
jae 0x45a4d7
lea edi, [ebp + 0x9088]
push ebp
push edi
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [edi]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 5
jb 0x45a4b6
mov edx, dword [esp + 0x24]
mov ecx, ebx
sub esi, 5
and ecx, 0x1f
inc ecx
shr ebx, 5
cmp esi, 4
mov dword [esp + 0x2c], ecx
jae 0x45a519
lea edi, [ebp + 0x9088]
push ebp
push edi
call fcn.004588f0
xor ecx, ecx
add esp, 8
mov cx, word [edi]
mov edx, ecx
mov ecx, esi
shl edx, cl
add esi, 8
or ebx, edx
cmp esi, 4
jb 0x45a4f2
mov edx, dword [esp + 0x24]
mov ecx, dword [esp + 0x2c]
mov eax, ebx
sub esi, 4
and eax, 0xf
add eax, 4
shr ebx, 4
cmp edx, 0x11e
mov dword [esp + 0x10], eax
ja 0x45a917
cmp ecx, 0x1e
ja 0x45a917
xor ecx, ecx
test eax, eax
jbe 0x45a5b2
mov dword [esp + 0x20], 0x4a7a78
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
cmp esi, 3
jae 0x45a582
lea edi, [ebp + 0x9088]
push ebp
push edi
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [edi]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 3
jb 0x45a561
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, ebx
and edx, 7
sub esi, 3
mov edi, dword [ecx]
add ecx, 4
mov dword [esp + 0x20], ecx
mov ecx, dword [esp + 0x1c]
shr ebx, 3
dec ecx
mov dword [esp + edi*4 + 0x38], edx
mov dword [esp + 0x1c], ecx
jne 0x45a556
cmp eax, 0x13
jae 0x45a5cb
mov ecx, dword [esp + 0x30]
lea eax, [ecx*4 + 0x4a7a78]
xor ecx, ecx
mov edx, dword [eax]
add eax, 4
cmp eax, 0x4a7ac4
mov dword [esp + edx*4 + 0x38], ecx
jb 0x45a5bb
lea eax, [esp + 0x18]
lea ecx, [esp + 0x14]
push eax
push ecx
push 0
push 0
push 0x13
lea edx, [esp + 0x4c]
push 0x13
push edx
mov dword [esp + 0x34], 7
call fcn.004597f0
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x45a617
cmp edi, 1
jne 0x45a60a
mov eax, dword [esp + 0x14]
push eax
call fcn.00459ce0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x24]
xor edi, edi
mov dword [esp + 0x1c], 0
lea eax, [ecx + edx]
mov edx, dword [esp + 0x18]
xor ecx, ecx
mov dword [esp + 0x20], eax
mov cx, word [edx*2 + 0x4a77d4]
mov dword [esp + 0x10], edi
test eax, eax
mov dword [esp + 0x30], ecx
jbe 0x45a800
cmp esi, dword [esp + 0x18]
jae 0x45a67e
lea eax, [ebp + 0x9088]
push ebp
push eax
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp + 0x9088]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
mov eax, dword [esp + 0x18]
cmp esi, eax
jb 0x45a654
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
and eax, ebx
lea ecx, [eax + eax*2]
xor eax, eax
lea edx, [edx + ecx*2]
xor ecx, ecx
mov dword [esp + 0x28], edx
mov cl, byte [edx + 1]
mov ax, word [edx + 2]
shr ebx, cl
sub esi, ecx
cmp eax, 0x10
jae 0x45a6b8
mov dword [esp + edi*4 + 0x38], eax
inc edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edi
jmp 0x45a7f6
jne 0x45a72e
cmp esi, 2
jae 0x45a6e6
lea eax, [ebp + 0x9088]
push ebp
push eax
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp + 0x9088]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 2
jb 0x45a6bf
mov edx, dword [esp + 0x20]
mov eax, ebx
and eax, 3
sub esi, 2
add eax, 3
shr ebx, 2
lea ecx, [edi + eax]
cmp ecx, edx
ja 0x45a917
mov edx, eax
dec eax
test edx, edx
je 0x45a7f6
lea edx, [eax + 1]
mov eax, dword [esp + 0x1c]
lea edi, [esp + edi*4 + 0x38]
mov ecx, edx
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x10], eax
mov edi, eax
jmp 0x45a7f6
cmp eax, 0x11
jne 0x45a785
cmp esi, 3
jae 0x45a75f
lea eax, [ebp + 0x9088]
push ebp
push eax
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp + 0x9088]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 3
jb 0x45a738
mov edx, dword [esp + 0x20]
mov eax, ebx
and eax, 7
sub esi, 3
add eax, 3
shr ebx, 3
lea ecx, [edi + eax]
cmp ecx, edx
ja 0x45a917
mov edx, eax
dec eax
test edx, edx
je 0x45a7ee
jmp 0x45a7d5
cmp esi, 7
jae 0x45a7b1
lea eax, [ebp + 0x9088]
push ebp
push eax
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp + 0x9088]
add esi, 8
shl eax, cl
add esp, 8
or ebx, eax
cmp esi, 7
jb 0x45a78a
mov edx, dword [esp + 0x20]
mov eax, ebx
and eax, 0x7f
sub esi, 7
add eax, 0xb
shr ebx, 7
lea ecx, [edi + eax]
cmp ecx, edx
ja 0x45a917
mov edx, eax
dec eax
test edx, edx
je 0x45a7ee
lea edx, [eax + 1]
lea edi, [esp + edi*4 + 0x38]
mov ecx, edx
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x10]
add eax, edx
mov dword [esp + 0x10], eax
mov edi, eax
mov dword [esp + 0x1c], 0
cmp edi, dword [esp + 0x20]
jb 0x45a64e
mov eax, dword [esp + 0x14]
push eax
call fcn.00459ce0
mov edi, dword [esp + 0x28]
lea edx, [esp + 0x1c]
lea eax, [esp + 0x18]
mov dword [ebp + 0x9080], ebx
mov dword [ebp + 0x9084], esi
mov ecx, dword [0x4a7bbc]
push edx
push eax
push 0x4a7b04
mov dword [esp + 0x28], ecx
push 0x4a7ac4
push 0x101
lea ecx, [esp + 0x50]
push edi
push ecx
call fcn.004597f0
mov esi, eax
add esp, 0x20
test esi, esi
je 0x45a870
cmp esi, 1
jne 0x45a863
mov edx, dword [esp + 0x14]
push edx
call fcn.00459ce0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
mov eax, dword [0x4a7bc0]
lea ecx, [esp + 0x34]
lea edx, [esp + 0x28]
push ecx
push edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x34]
push 0x4a7b80
push 0x4a7b44
push 0
lea ecx, [esp + edi*4 + 0x4c]
push eax
push ecx
call fcn.004597f0
mov esi, eax
add esp, 0x1c
test esi, esi
je 0x45a8d3
cmp esi, 1
jne 0x45a8b9
mov edx, dword [esp + 0x28]
push edx
call fcn.00459ce0
add esp, 4
mov eax, dword [esp + 0x14]
push eax
call fcn.00459ce0
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x18]
push edx
push eax
push ecx
call fcn.00459da0
add esp, 0x10
test eax, eax
jne 0x45a917
mov edx, dword [esp + 0x14]
push edx
call fcn.00459ce0
mov eax, dword [esp + 0x2c]
push eax
call fcn.00459ce0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x518
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x518
ret
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [ebx + 0x9084]
push edi
mov edi, dword [ebx + 0x9080]
cmp esi, 1
jae 0x45a96d
lea ebp, [ebx + 0x9088]
push ebx
push ebp
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp]
add esi, 8
shl eax, cl
add esp, 8
or edi, eax
cmp esi, 1
jb 0x45a94f
mov edx, dword [esp + 0x14]
mov ecx, edi
and ecx, 1
shr edi, 1
dec esi
mov dword [edx], ecx
cmp esi, 2
jae 0x45a9a4
lea ebp, [ebx + 0x9088]
push ebx
push ebp
call fcn.004588f0
xor eax, eax
mov ecx, esi
mov ax, word [ebp]
add esi, 8
shl eax, cl
add esp, 8
or edi, eax
cmp esi, 2
jb 0x45a986
mov eax, edi
add esi, 0xfffffffe
shr edi, 2
mov dword [ebx + 0x9080], edi
and eax, 3
mov dword [ebx + 0x9084], esi
pop edi
pop esi
pop ebp
cmp eax, 2
pop ebx
jne 0x45a9c9
jmp 0x45a440
test eax, eax
jne 0x45a9d2
jmp 0x45a1a0
cmp eax, 1
jne 0x45a9dc
jmp 0x45a300
mov eax, 2
ret