Function at 0x495740
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x54514c
push eax
mov dword fs:[0], esp
sub esp, 0x110
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebx, ebx
push edi
mov dword [0x5991d0], ebx
call esi
mov ebp, dword [esp + 0x130]
mov dword [0x5991d8], eax
cmp ebp, 0xffffffff
je 0x495c5a
cmp ebp, ebx
je 0x495c5a
cmp dword [0x5991dc], ebx
jne 0x4957ad
mov dword [0x5991d0], 2
mov dword [0x5991d4], 0x12f
jmp 0x495c6e
mov ecx, 9
xor eax, eax
lea edi, [esp + 0x74]
mov dword [esp + 0x70], ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x70]
push 0x28
push eax
push ebp
call fcn.004bf120
mov al, byte [esp + 0x9c]
add esp, 0xc
test al, 0x10
je 0x4957f2
mov dword [0x5991d0], 0x1d
mov dword [0x5991d4], 0x13a
jmp 0x495c6e
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x31]
mov byte [esp + 0x30], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [esp + 0x138]
mov dword [esp + 0x24], 1
test al, 4
mov dword [esp + 0x18], ebx
mov dword [esp + 0x28], ebx
je 0x495834
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
call fcn.004c06f0
add esp, 0xc
mov esi, dword [esp + 0x140]
cmp esi, ebx
je 0x495847
cmp dword [esi], ebx
je 0x495847
xor eax, eax
jmp 0x49584c
mov eax, 1
lea ecx, [esp + 0x30]
test ecx, ecx
jne 0x49588e
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5991d0], 1
mov dword [0x5991d4], 0x21e6
call esi
mov dword [0x5991d8], eax
mov dword [0x5991d0], 7
mov dword [0x5991d4], 0x14a
jmp 0x495c6e
mov edx, dword [0x57b748]
mov ecx, dword [0x57b74c]
neg eax
sbb eax, eax
mov edi, dword [0x599208]
mov dword [esp + 0x30], edx
mov edx, dword [0x57b750]
add eax, 0x40002
mov dword [esp + 0x34], ecx
mov ecx, dword [0x57b754]
mov dword [esp + 0x50], eax
mov eax, dword [0x57b300]
mov dword [esp + 0x38], edx
mov edx, dword [0x5991e8]
cmp eax, 0xffffffff
mov dword [esp + 0x3c], ecx
mov word [esp + 0x60], 0x40
mov dword [esp + 0x68], edx
mov word [esp + 0x62], 1
je 0x4958f8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x4958f8
mov edi, eax
mov dword [esp + 0x5c], edi
mov ecx, 0x13
xor eax, eax
lea edi, [esp + 0x9c]
mov dword [esp + 0x98], ebx
mov dword [esp + 0xe8], ebx
rep stosd dword es:[edi], eax
mov ecx, 0xd
lea edi, [esp + 0xec]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
call fcn.0051fff0
lea ecx, [esp + 0x10]
mov dword [esp + 0x128], ebx
call fcn.0051fff0
lea ecx, [esp + 0x20]
mov byte [esp + 0x128], 1
call fcn.0051fff0
mov eax, dword [esp + 0x134]
mov byte [esp + 0x128], 2
cmp eax, ebx
je 0x495980
lea ecx, [esp + 0x20]
push ecx
push eax
call fcn.004adab0
add esp, 8
cmp eax, ebx
je 0x495980
lea ecx, [esp + 0x20]
call fcn.005208f0
lea ecx, [esp + 0x1c]
call fcn.0051fff0
cmp esi, ebx
mov byte [esp + 0x128], 3
je 0x4959be
mov edx, dword [esi]
push 0xffffffffffffffff
push edx
lea ecx, [esp + 0x24]
call fcn.00520200
lea ecx, [esp + 0x1c]
call fcn.00520910
mov ecx, dword [esi]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push ebx
push ebp
call fcn.00478ab0
add esp, 8
cmp eax, ebx
jne 0x495bb1
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebp
call fcn.00474020
add esp, 0x28
test eax, eax
jne 0x495c12
cmp word [esp + 0xf2], bx
jne 0x495c36
push 0xffffffffffffffff
push 0x110
lea ecx, [esp + 0x18]
call fcn.00520200
lea ecx, [esp + 0x10]
call fcn.00520910
mov ebp, eax
mov ecx, 0x44
mov esi, 0x5991e0
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x57b300]
cmp eax, 0xffffffff
je 0x495a39
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x495a39
mov dword [ebp + 0x28], eax
lea eax, [ebp + 0x48]
push eax
call fcn.004c00d0
mov ecx, dword [0x5991e4]
mov dl, byte [0x5991ec]
mov eax, dword [0x5991e8]
mov dword [esp + 0xb4], ecx
mov cl, byte [0x5991f0]
add esp, 4
mov byte [esp + 0xae], dl
mov dword [esp + 0xb4], eax
mov byte [esp + 0xaf], cl
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dx, ax
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
mov dword [esp + 0xcc], eax
mov word [esp + 0x70], dx
call fcn.005201f0
push eax
lea ecx, [esp + 0x1c]
call fcn.00520200
lea ecx, [esp + 0x14]
call fcn.005201f0
lea ecx, [esp + 0x10]
mov ebp, eax
call fcn.00520910
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.00520910
mov ecx, ebp
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x40]
push ecx
call fcn.004c0100
lea edx, [esp + 0x20]
mov esi, dword [esp + 0x134]
push ebx
lea eax, [esp + 0x34]
push edx
lea ecx, [esp + 0x2c]
push eax
lea edx, [esp + 0x20]
push ecx
lea eax, [esp + 0x28]
push edx
lea ecx, [esp + 0x100]
push eax
lea edx, [esp + 0xb4]
push ecx
lea eax, [esp + 0x50]
push edx
push eax
push esi
mov dword [esp + 0x58], ebx
call fcn.004961e0
add esp, 0x2c
cmp eax, ebx
je 0x495bb1
cmp dword [esp + 0x13c], ebx
je 0x495b38
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [0x599708]
mov dword [esp + 0x24], ebx
cmp eax, ebx
je 0x495b81
lea ecx, [esp + 0x98]
push ecx
push esi
call fcn.004ab630
add esp, 8
test eax, eax
jne 0x495b81
mov dword [0x5991d0], 0x1c
mov dword [0x5991d4], 0x19b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5991d8], eax
mov dword [esp + 0x24], 0xffffffff
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x495b98
mov edx, dword [esp + 0x28]
push edx
push eax
push esi
call fcn.004c0910
add esp, 0xc
cmp dword [esp + 0x138], ebx
je 0x495bb1
lea eax, [esp + 0x70]
push 0x28
push eax
push esi
call fcn.004bf160
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x495bc6
push eax
call fcn.00526473
add esp, 4
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x128], 2
call fcn.00520150
lea ecx, [esp + 0x20]
mov byte [esp + 0x128], 1
call fcn.00520150
lea ecx, [esp + 0x10]
mov byte [esp + 0x128], bl
call fcn.00520150
lea ecx, [esp + 0x14]
mov dword [esp + 0x128], 0xffffffff
call fcn.00520150
mov eax, dword [esp + 0x24]
jmp 0x495c7a
mov dword [0x5991d0], 0x2a
mov dword [0x5991d4], 0x171
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5991d8], eax
jmp 0x495bb1
mov dword [0x5991d0], 1
mov dword [0x5991d4], 0x17c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x5991d8], eax
jmp 0x495bb1
mov dword [0x5991d0], 1
mov dword [0x5991d4], 0x129
call esi
mov dword [0x5991d8], eax
mov eax, 1
mov ecx, dword [esp + 0x120]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x11c
ret