Function at 0x101823c
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 0x10193a2
cmp dword [esi], 0x6060
jne 0x10193a2
cmp dword [ebp + 0x10], ebx
jne 0x1018286
cmp dword [ebp + 0x14], ebx
jne 0x101dff0
mov edi, 0x80000000
cmp dword [0x10493e4], ebx
je 0x10182b8
mov al, byte [0x10493e8]
cmp al, 4
jb 0x1019388
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
jne 0x101dffa
mov eax, dword [ebp + 0xc]
dec eax
dec eax
jne 0x101864c
cmp dword [esi + 0x24], ebx
je 0x101830f
call sym.spoolsv.exe_PrvCheckLocalCall
test eax, eax
jne 0x101830f
push 0x1018a30
push dword [esi + 0x24]
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x101830f
push dword [0x1049120]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 2
je 0x101830f
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 0x101e237
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 0x1019379
mov edi, dword [ebp - 0xc]
test edi, edi
jne 0x101e2e0
test ebx, ebx
jne 0x101e3c0
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 0x10183a3
cmp ebx, 0x7a
jne 0x101e3db
cmp dword [0x10493e4], 0
je 0x10183d6
mov al, byte [0x10493e8]
cmp al, 4
jb 0x1019395
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
mov edi, 0x80000000
and eax, 1
and ecx, edi
or eax, ecx
jne 0x101e416
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x14
sub eax, 6
je 0x101e167
dec eax
jne 0x101830f
jmp 0x101e044
cmp dword [ebp + 0xc], 9
jne 0x101835f
jmp 0x101e2b9
test al, al
je 0x10182a0
jmp 0x10182b8
test al, al
je 0x10183b9
jmp 0x10183d6
push 6
jmp 0x101e45f
push 0x6f8
jmp 0x101e45f
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101e03c
cmp edx, esi
jne 0x101e03c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push dword [eax + 0x24]
push 0x101e470
push dword [0x104939c]
push dword [0x1049398]
call fcn.010363b7
mov esi, dword [ebp + 8]
jmp 0x10182b8
cmp dword [esi + 0x24], ebx
jne 0x101e0d8
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x10493e4], ebx
je 0x101e465
mov al, byte [0x10493e8]
cmp al, 4
jae 0x101e072
test al, al
jne 0x101e465
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
je 0x101e465
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101e465
cmp edx, esi
jne 0x101e465
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 9
mov eax, dword [ebp + 8]
push dword [eax + 0x24]
push 0x101e480
push dword [0x104939c]
push dword [0x1049398]
call fcn.010363b7
jmp 0x101e465
call sym.spoolsv.exe_PrvCheckLocalCall
test eax, eax
je 0x101e0e8
push 0x32
jmp 0x101e04f
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.0103d394
test eax, eax
je 0x101e11f
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
test eax, eax
je 0x101e11f
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 0x101e133
push 0x7a
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x101834d
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], 1
cmp dword [ebp - 4], ebx
je 0x101e160
lea ebx, [eax + 4]
push edi
mov dword [eax], ebx
call fcn.01038423
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x101834d
and dword [ebp - 8], eax
jmp 0x101834d
and dword [eax], ebx
jmp 0x101834d
cmp dword [esi + 0x24], ebx
jne 0x101e1db
push 2
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [0x10493e4], ebx
je 0x101e465
mov al, byte [0x10493e8]
cmp al, 4
jae 0x101e191
test al, al
jne 0x101e465
mov eax, dword [0x10493d0]
mov ecx, dword [0x10493d4]
and eax, 1
and ecx, edi
or eax, ecx
je 0x101e465
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x101e465
cmp edx, esi
jne 0x101e465
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 8
jmp 0x101e0b7
mov esi, dword [ebp + 0x18]
push dword [ebp + 8]
mov dword [esi], 4
call fcn.01038423
mov dword [ebp - 0x18], eax
test eax, eax
je 0x101834d
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 4], ecx
test ecx, ecx
je 0x101e210
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 0x101e126
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], 1
test ecx, ecx
je 0x101e160
lea ebx, [eax + 4]
mov dword [eax], ebx
jmp 0x101834d
mov dword [ebp - 4], eax
mov eax, dword [esi + 4]
push 0x1019750
push dword [eax + 4]
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x101e28f
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x20], 1
test edi, edi
je 0x101e28f
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 0x101e28f
mov eax, dword [edi + 8]
test al, 0x40
je 0x101e281
test al, 0x10
jne 0x101e28f
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
push esi
call fcn.0103d134
cmp dword [ebp - 0x14], ebx
jne 0x101e2a9
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 0x101830f
cmp dword [ebp - 4], 0
jne 0x101835f
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x101835f
mov eax, dword [eax]
test eax, eax
je 0x101835f
mov dword [ebp - 4], eax
jmp 0x101835f
cmp dword [ebp + 0x10], 0
je 0x101836a
cmp dword [ebp - 8], 0
je 0x101836a
mov esi, dword [ebp - 0x14]
test esi, esi
jne 0x101e320
mov eax, dword [ebp + 0x10]
mov esi, dword [eax + 0x1c]
test esi, esi
je 0x101e316
movzx eax, word [esi + 0x46]
movzx ecx, word [esi + 0x44]
lea edi, [eax + ecx + 3]
and edi, 0xfffffffc
jmp 0x101e318
xor edi, edi
test esi, esi
je 0x101e3a8
push dword [ebp - 4]
push esi
push dword [ebp + 8]
call fcn.0103ce9e
test eax, eax
jne 0x101e3a8
xor ebx, ebx
cmp dword [ebp - 0x20], ebx
jne 0x101e353
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp eax, dword [0x10491bc]
jne 0x101e394
mov eax, dword [ebp + 0x10]
mov eax, dword [eax + 0x34]
test al, 0x10
je 0x101e353
test al, 0x40
jne 0x101e394
push edi
push esi
push dword [ebp - 4]
push dword [ebp + 8]
call fcn.0103cee9
test eax, eax
je 0x101e394
mov eax, dword [ebp - 0x14]
cmp esi, eax
jne 0x101e381
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 0x101836a
mov eax, dword [ebp + 8]
push 0
push dword [eax + 0x24]
push 0
call sym.spoolsv.exe_PrvbSetDevModePerUser
jmp 0x1018372
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 0x101836a
push dword [ebp + 0x18]
push dword [ebp - 4]
push ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
mov dword [ebp - 8], 1
jmp 0x1018372
mov eax, dword [0x1049104]
cmp eax, 0x1049104
je 0x10183a3
test byte [eax + 0x1c], 1
je 0x10183a3
mov ecx, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
push dword [ecx + 0x24]
push 0x102412c
push 0xe
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.010380ca
jmp 0x10183a3
mov eax, dword [0x10493d8]
mov esi, dword [0x10493dc]
mov ecx, eax
mov edx, esi
and ecx, 1
and edx, edi
cmp ecx, eax
jne 0x10183d6
cmp edx, esi
jne 0x10183d6
mov eax, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
push dword [eax + 0x24]
push 0x101e480
push dword [0x104939c]
push dword [0x1049398]
call fcn.010363b7
jmp 0x10183d6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10183d9