Function at 0x490cb0
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x53f52c
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 [0x593050], ebx
call esi
mov ebp, dword [esp + 0x130]
mov dword [0x593058], eax
cmp ebp, 0xffffffff
je 0x4911ca
cmp ebp, ebx
je 0x4911ca
cmp dword [0x59305c], ebx
jne 0x490d1d
mov dword [0x593050], 2
mov dword [0x593054], 0x12d
jmp 0x4911de
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.004ba310
mov al, byte [esp + 0x9c]
add esp, 0xc
test al, 0x10
je 0x490d62
mov dword [0x593050], 0x1d
mov dword [0x593054], 0x138
jmp 0x4911de
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 0x490da4
lea ecx, [esp + 0x28]
lea edx, [esp + 0x18]
push ecx
push edx
push ebp
call fcn.004bb8b0
add esp, 0xc
mov esi, dword [esp + 0x140]
cmp esi, ebx
je 0x490db7
cmp dword [esi], ebx
je 0x490db7
xor eax, eax
jmp 0x490dbc
mov eax, 1
lea ecx, [esp + 0x30]
test ecx, ecx
jne 0x490dfe
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593050], 1
mov dword [0x593054], 0x21c2
call esi
mov dword [0x593058], eax
mov dword [0x593050], 7
mov dword [0x593054], 0x148
jmp 0x4911de
mov edx, dword [0x575608]
mov ecx, dword [0x57560c]
neg eax
sbb eax, eax
mov edi, dword [0x593088]
mov dword [esp + 0x30], edx
mov edx, dword [0x575610]
add eax, 0x40002
mov dword [esp + 0x34], ecx
mov ecx, dword [0x575614]
mov dword [esp + 0x50], eax
mov eax, dword [0x5751c0]
mov dword [esp + 0x38], edx
mov edx, dword [0x593068]
cmp eax, 0xffffffff
mov dword [esp + 0x3c], ecx
mov word [esp + 0x60], 0x40
mov dword [esp + 0x68], edx
mov word [esp + 0x62], 1
je 0x490e68
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x490e68
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.0051a5b0
lea ecx, [esp + 0x10]
mov dword [esp + 0x128], ebx
call fcn.0051a5b0
lea ecx, [esp + 0x20]
mov byte [esp + 0x128], 1
call fcn.0051a5b0
mov eax, dword [esp + 0x134]
mov byte [esp + 0x128], 2
cmp eax, ebx
je 0x490ef0
lea ecx, [esp + 0x20]
push ecx
push eax
call fcn.004a8e50
add esp, 8
cmp eax, ebx
je 0x490ef0
lea ecx, [esp + 0x20]
call fcn.0051aeb0
lea ecx, [esp + 0x1c]
call fcn.0051a5b0
cmp esi, ebx
mov byte [esp + 0x128], 3
je 0x490f2e
mov edx, dword [esi]
push 0xffffffffffffffff
push edx
lea ecx, [esp + 0x24]
call fcn.0051a7c0
lea ecx, [esp + 0x1c]
call fcn.0051aed0
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.004741d0
add esp, 8
cmp eax, ebx
jne 0x491121
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebp
call fcn.0046f760
add esp, 0x28
test eax, eax
jne 0x491182
cmp word [esp + 0xf2], bx
jne 0x4911a6
push 0xffffffffffffffff
push 0x110
lea ecx, [esp + 0x18]
call fcn.0051a7c0
lea ecx, [esp + 0x10]
call fcn.0051aed0
mov ebp, eax
mov ecx, 0x44
mov esi, 0x593060
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov eax, dword [0x5751c0]
cmp eax, 0xffffffff
je 0x490fa9
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, ebx
je 0x490fa9
mov dword [ebp + 0x28], eax
lea eax, [ebp + 0x48]
push eax
call fcn.004bb2c0
mov ecx, dword [0x593064]
mov dl, byte [0x59306c]
mov eax, dword [0x593068]
mov dword [esp + 0xb4], ecx
mov cl, byte [0x593070]
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.0051a7b0
push eax
lea ecx, [esp + 0x1c]
call fcn.0051a7c0
lea ecx, [esp + 0x14]
call fcn.0051a7b0
lea ecx, [esp + 0x10]
mov ebp, eax
call fcn.0051aed0
lea ecx, [esp + 0x14]
mov esi, eax
call fcn.0051aed0
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.004bb2f0
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.00491750
add esp, 0x2c
cmp eax, ebx
je 0x491121
cmp dword [esp + 0x13c], ebx
je 0x4910a8
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov eax, dword [0x593588]
mov dword [esp + 0x24], ebx
cmp eax, ebx
je 0x4910f1
lea ecx, [esp + 0x98]
push ecx
push esi
call fcn.004a69d0
add esp, 8
test eax, eax
jne 0x4910f1
mov dword [0x593050], 0x1c
mov dword [0x593054], 0x199
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593058], eax
mov dword [esp + 0x24], 0xffffffff
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x491108
mov edx, dword [esp + 0x28]
push edx
push eax
push esi
call fcn.004bbad0
add esp, 0xc
cmp dword [esp + 0x138], ebx
je 0x491121
lea eax, [esp + 0x70]
push 0x28
push eax
push esi
call fcn.004ba350
add esp, 0xc
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x491136
push eax
call fcn.00520a33
add esp, 4
mov dword [esp + 0x18], ebx
lea ecx, [esp + 0x1c]
mov byte [esp + 0x128], 2
call fcn.0051a710
lea ecx, [esp + 0x20]
mov byte [esp + 0x128], 1
call fcn.0051a710
lea ecx, [esp + 0x10]
mov byte [esp + 0x128], bl
call fcn.0051a710
lea ecx, [esp + 0x14]
mov dword [esp + 0x128], 0xffffffff
call fcn.0051a710
mov eax, dword [esp + 0x24]
jmp 0x4911ea
mov dword [0x593050], 0x2a
mov dword [0x593054], 0x16f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593058], eax
jmp 0x491121
mov dword [0x593050], 1
mov dword [0x593054], 0x17a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x593058], eax
jmp 0x491121
mov dword [0x593050], 1
mov dword [0x593054], 0x127
call esi
mov dword [0x593058], 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