Function at 0x10183a4
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 4], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
cmp esi, ebx
je 0x10187e3
cmp dword [esi], 0x6060
jne 0x10187e3
cmp dword [ebp + 0x10], ebx
jne 0x10183ee
cmp dword [ebp + 0x14], ebx
jne 0x101d918
mov edi, 0x80000000
cmp dword [0x10493e4], ebx
je 0x1018420
mov al, byte [0x10493e8]
cmp al, 4
jb 0x10187c9
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
jne 0x101d922
mov eax, dword [ebp + 0xc]
dec eax
dec eax
jne 0x10187b4
cmp dword [esi + 0x24], ebx
je 0x1018477
call sym.spoolsv.exe_PrvCheckLocalCall
test eax, eax
jne 0x1018477
push 0x1018acc
push dword [esi + 0x24]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x1018477
push dword [0x1049120]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
je 0x1018477
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x24]
push 0
call sym.spoolsv.exe_PrvbGetDevModePerUser
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x101db5f
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp + 0x14]
mov esi, dword [ebp + 0x18]
sub ecx, eax
cmp dword [ebp + 0x14], eax
push esi
sbb eax, eax
not eax
and eax, ecx
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 4]
and eax, 0xfffffffc
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ecx + 8]
call dword [edx + 0x2c]
mov dword [ebp - 8], eax
mov eax, dword [esi]
add eax, 3
and eax, 0xfffffffc
add eax, dword [ebp - 0x1c]
add eax, dword [ebp - 0xc]
mov dword [esi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c], eax
cmp eax, 0x7a
jne 0x101dbe1
mov edi, dword [ebp - 0xc]
test edi, edi
jne 0x101dc12
test ebx, ebx
jne 0x101dcf2
push dword [ebp - 0x10]
call sym.spoolsv.exe_PrvDllFreeSplMem
push dword [ebp - 0x18]
call sym.spoolsv.exe_PrvDllFreeSplMem
push dword [ebp - 0x14]
call sym.spoolsv.exe_PrvDllFreeSplMem
mov ebx, dword [ebp - 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
jne 0x101850b
cmp ebx, 0x7a
jne 0x101dd0d
cmp dword [0x10493e4], 0
je 0x101853e
mov al, byte [0x10493e8]
cmp al, 4
jb 0x10187d6
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
mov edi, 0x80000000
and eax, 1
and ecx, edi
or eax, ecx
jne 0x101dd48
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x14
sub eax, 6
je 0x101da8f
dec eax
jne 0x1018477
jmp 0x101d96c
test al, al
je 0x1018408
jmp 0x1018420
test al, al
je 0x1018521
jmp 0x101853e
push 6
jmp 0x101dd91
push 0x6f8
jmp 0x101dd91
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101d964
cmp edx, esi
jne 0x101d964
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x24]
push 0x101dda0
push dword [0x104939c]
push dword [0x1049398]
call fcn.01035f7f
mov esi, dword [ebp + 8]
jmp 0x1018420
cmp dword [esi + 0x24], ebx
jne 0x101da00
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x10493e4], ebx
je 0x101dd97
mov al, byte [0x10493e8]
cmp al, 4
jae 0x101d99a
test al, al
jne 0x101dd97
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
je 0x101dd97
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101dd97
cmp edx, esi
jne 0x101dd97
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 9
mov eax, dword [ebp + 8]
push dword [eax + 0x24]
push 0x101ddb0
push dword [0x104939c]
push dword [0x1049398]
call fcn.01035f7f
jmp 0x101dd97
call sym.spoolsv.exe_PrvCheckLocalCall
test eax, eax
je 0x101da10
push 0x32
jmp 0x101d977
mov esi, dword [ebp + 0x18]
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov dword [esi], 4
push dword [edi + 0x24]
push 0
call fcn.0103cbd4
test eax, eax
je 0x101da47
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
test eax, eax
je 0x101da47
movzx ecx, word [eax + 0x46]
movzx eax, word [eax + 0x44]
add ecx, eax
add dword [esi], ecx
mov dword [ebp + 0x18], ecx
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi]
jae 0x101da5b
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x10184b5
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], 1
cmp dword [ebp - 4], ebx
je 0x101da88
lea ebx, [eax + 4]
push edi
mov dword [eax], ebx
call fcn.01037feb
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x10184b5
and dword [ebp - 8], eax
jmp 0x10184b5
and dword [eax], ebx
jmp 0x10184b5
cmp dword [esi + 0x24], ebx
jne 0x101db03
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x10493e4], ebx
je 0x101dd97
mov al, byte [0x10493e8]
cmp al, 4
jae 0x101dab9
test al, al
jne 0x101dd97
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
je 0x101dd97
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101dd97
cmp edx, esi
jne 0x101dd97
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 8
jmp 0x101d9df
mov esi, dword [ebp + 0x18]
push dword [ebp + 8]
mov dword [esi], 4
call fcn.01037feb
mov dword [ebp - 0x18], eax
test eax, eax
je 0x10184b5
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x101db38
movzx eax, word [ecx + 0x46]
movzx edx, word [ecx + 0x44]
add eax, edx
add dword [esi], eax
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
cmp eax, dword [esi]
jb 0x101da4e
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], 1
test ecx, ecx
je 0x101da88
lea ebx, [eax + 4]
mov dword [eax], ebx
jmp 0x10184b5
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
push 0x10198c8
push dword [eax + 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x101dbb7
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x20], 1
test edi, edi
je 0x101dbb7
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x1c]
push ecx
push dword [ebp + 0x14]
push edi
push 4
push dword [esi + 8]
call dword [eax + 0x2c]
test eax, eax
je 0x101dbb7
mov eax, dword [edi + 8]
test al, 0x40
je 0x101dba9
test al, 0x10
jne 0x101dbb7
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0103c975
cmp dword [ebp - 0x14], ebx
jne 0x101dbd1
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 0x46]
movzx eax, word [eax + 0x44]
lea eax, [ecx + eax + 3]
and eax, 0xfffffffc
mov dword [ebp - 0xc], eax
and dword [ebp + 0x14], 0xfffffffc
mov dword [ebp - 0x1c], 3
jmp 0x1018477
cmp dword [ebp + 0xc], 9
jne 0x10184c7
cmp dword [ebp - 4], 0
jne 0x10184c7
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x10184c7
mov eax, dword [eax]
test eax, eax
je 0x10184c7
mov dword [ebp - 4], eax
jmp 0x10184c7
cmp dword [ebp + 0x10], 0
je 0x10184d2
cmp dword [ebp - 8], 0
je 0x10184d2
mov esi, dword [ebp - 0x14]
test esi, esi
jne 0x101dc52
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 0x1c]
test esi, esi
je 0x101dc48
movzx eax, word [esi + 0x46]
movzx ecx, word [esi + 0x44]
lea edi, [eax + ecx + 3]
and edi, 0xfffffffc
jmp 0x101dc4a
xor edi, edi
test esi, esi
je 0x101dcda
push dword [ebp - 4]
push esi
push dword [ebp + 8]
call fcn.0103c6df
test eax, eax
jne 0x101dcda
xor ebx, ebx
cmp dword [ebp - 0x20], ebx
jne 0x101dc85
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp eax, dword [0x10491bc]
jne 0x101dcc6
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x34]
test al, 0x10
je 0x101dc85
test al, 0x40
jne 0x101dcc6
push edi
push esi
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0103c72a
test eax, eax
je 0x101dcc6
mov eax, dword [ebp - 0x14]
cmp esi, eax
jne 0x101dcb3
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
mov ebx, eax
sub ebx, ecx
add ebx, dword [ebp + 0x14]
mov dword [ebp + 0x18], ecx
mov dword [eax + 0x1c], ebx
mov eax, dword [ebp + 8]
push esi
push dword [eax + 0x24]
push 0
call sym.spoolsv.exe_PrvbSetDevModePerUser
jmp 0x10184d2
mov eax, dword [ebp + 8]
push 0
push dword [eax + 0x24]
push 0
call sym.spoolsv.exe_PrvbSetDevModePerUser
jmp 0x10184da
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0xc]
mov ebx, eax
sub ebx, ecx
add ebx, dword [ebp + 0x14]
mov dword [ebp + 0x18], ecx
mov dword [eax + 0x1c], ebx
jmp 0x10184d2
push dword [ebp + 0x18]
push dword [ebp - 4]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [ebp - 8], 1
jmp 0x10184da
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x101850b
test byte [eax + 0x1c], 1
je 0x101850b
mov ecx, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
push dword [ecx + 0x24]
push 0x1023a9c
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01037c92
jmp 0x101850b
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101853e
cmp edx, esi
jne 0x101853e
mov eax, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
push dword [eax + 0x24]
push 0x101ddb0
push dword [0x104939c]
push dword [0x1049398]
call fcn.01035f7f
jmp 0x101853e
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1018541