Function at 0x10017ef6
Capabilities:
Get common file path
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
movzx eax, byte [ebp + 0x24]
test eax, eax
je 0x10017ff9
lea eax, [ebp + 0xc]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x84]
movzx eax, byte [eax]
test eax, eax
je 0x10017f42
mov byte [ebp - 1], 0
push 0x3721
lea eax, [ebp - 1]
push eax
push 0x23eb
push 0
call fcn.1001f8d3
add esp, 0x10
jmp 0x10017ff4
mov dword [ebp - 0x40], 0x125a
mov dword [ebp - 0xc8], 0x10008178
cmp dword [ebp - 0x40], 0x131a
jle 0x10017fd5
and dword [ebp - 0x34], 0
jmp 0x10017f69
mov eax, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0x5b0f
jge 0x10017fd5
and dword [ebp - 0x28], 0
jmp 0x10017f7f
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0x5271
jge 0x10017fd3
mov eax, dword [ebp - 0x34]
add eax, dword [ebp - 0x28]
cdq
mov dword [ebp - 0xe8], eax
mov dword [ebp - 0xe4], edx
push dword [ebp - 0xe4]
push dword [ebp - 0xe8]
lea ecx, [ebp - 0x134]
call fcn.10010ffe
pop ecx
pop ecx
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x7c]
call fcn.1001fbf4
push eax
call fcn.100714f3
pop ecx
lea ecx, [ebp - 0x134]
call fcn.1001fbea
jmp 0x10017f78
jmp 0x10017f62
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
cmp dword [ebp - 0x40], 0x113c
jge 0x10017ff4
push dword [ebp - 0xc8]
call fcn.100714f3
pop ecx
jmp 0x1001848d
mov eax, dword [ebp + 8]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0xa0], eax
lea eax, [ebp + 0x14]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp - 0x74]
movzx eax, byte [eax]
test eax, eax
je 0x10018447
mov eax, dword [ebp - 0xc4]
mov dword [ebp - 0xd8], eax
mov dword [ebp - 0x5c], 0x7abc
mov dword [ebp - 0x94], 0x100081b4
cmp dword [ebp - 0x5c], 0x7cc4
jle 0x10018148
push 0
call dword [sym.imp.USER32.dll_SetCapture]
and dword [ebp - 0x18], 0
jmp 0x1001808b
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0x745e
jge 0x10018148
and dword [ebp - 0x38], 0
jmp 0x100180a5
mov eax, dword [ebp - 0x38]
inc eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0xacd
jge 0x10018143
and dword [ebp - 0x20], 0
jmp 0x100180bf
mov eax, dword [ebp - 0x20]
inc eax
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0x709b
jge 0x1001813e
and dword [ebp - 0x30], 0
jmp 0x100180d5
mov eax, dword [ebp - 0x30]
inc eax
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0x604d
jge 0x10018139
mov eax, dword [ebp - 0x18]
imul eax, dword [ebp - 0x38]
cdq
idiv dword [ebp - 0x20]
sub edx, dword [ebp - 0x30]
mov eax, edx
cdq
mov dword [ebp - 0xf4], eax
mov dword [ebp - 0xf0], edx
push dword [ebp - 0xf0]
push dword [ebp - 0xf4]
lea ecx, [ebp - 0x11c]
call fcn.10010ffe
pop ecx
pop ecx
mov dword [ebp - 0x8c], eax
mov ecx, dword [ebp - 0x8c]
call fcn.1001fbf4
push eax
call fcn.100714f3
pop ecx
lea ecx, [ebp - 0x11c]
call fcn.1001fbea
jmp 0x100180ce
jmp 0x100180b8
jmp 0x1001809e
jmp 0x10018084
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0xac], eax
cmp dword [ebp - 0x5c], 0x78d7
jge 0x10018169
push dword [ebp - 0x94]
call fcn.100714f3
pop ecx
mov eax, dword [ebp - 0xdc]
mov dword [ebp - 0xec], eax
mov dword [ebp - 0x4c], 0x2bd6
mov dword [ebp - 0xf8], 0x100081d0
cmp dword [ebp - 0x4c], 0x2db9
jle 0x10018205
and dword [ebp - 0x1c], 0
jmp 0x1001819c
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0x211f
jge 0x10018205
and dword [ebp - 0x10], 0
jmp 0x100181b2
mov eax, dword [ebp - 0x10]
inc eax
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0x2275
jge 0x10018203
and dword [ebp - 0x14], 0
jmp 0x100181c8
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x21de
jge 0x10018201
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
shl eax, cl
and eax, dword [ebp - 0x1c]
cdq
mov dword [ebp - 0x100], eax
mov dword [ebp - 0xfc], edx
push dword [ebp - 0xfc]
push dword [ebp - 0x100]
mov ecx, 0x1008bbb8
call fcn.1001fc14
jmp 0x100181c1
jmp 0x100181ab
jmp 0x10018195
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xb4], eax
cmp dword [ebp - 0x4c], 0x27f8
jge 0x1001822a
mov edx, dword [ebp - 0xf8]
mov ecx, 0x1008bbb8
call fcn.100228da
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0xe0], eax
mov eax, dword [ebp - 0xd8]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xe0]
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], 0x902
mov dword [ebp - 0x90], 0x100081f8
cmp dword [ebp - 0x70], 0xc79
jle 0x10018319
push 0
push 0
push 0
push 0
call dword [sym.imp.GDI32.dll_SetWinMetaFileBits]
and dword [ebp - 0x24], 0
jmp 0x1001829f
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0x4f8b
jge 0x10018311
and dword [ebp - 0x2c], 0
jmp 0x100182b5
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0x35ec
jge 0x1001830f
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x2c]
cdq
mov dword [ebp - 0xd0], eax
mov dword [ebp - 0xcc], edx
push dword [ebp - 0xcc]
push dword [ebp - 0xd0]
lea ecx, [ebp - 0x14c]
call fcn.10010ffe
pop ecx
pop ecx
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp - 0xbc]
call fcn.1001fbf4
push eax
call fcn.100714f3
pop ecx
lea ecx, [ebp - 0x14c]
call fcn.1001fbea
jmp 0x100182ae
jmp 0x10018298
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x1001840a
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [ebp - 0x104], eax
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0xffffffff
ja 0x1001834b
mov dword [ebp - 0x6c], 1
jmp 0x1001834f
and dword [ebp - 0x6c], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp dword [ebp - 0x6c], eax
je 0x10018362
mov dword [ebp - 0x54], 1
jmp 0x10018366
and dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x54]
neg eax
cmp eax, 5
jne 0x10018379
mov dword [ebp - 0x64], 1
jmp 0x1001837d
and dword [ebp - 0x64], 0
cmp dword [ebp - 0x64], 0xfc3
je 0x1001838f
mov dword [ebp - 0x44], 1
jmp 0x10018393
and dword [ebp - 0x44], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x44]
jle 0x100183a6
mov dword [ebp - 0x48], 1
jmp 0x100183aa
and dword [ebp - 0x48], 0
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x48]
jge 0x100183bd
mov dword [ebp - 0x50], 1
jmp 0x100183c1
and dword [ebp - 0x50], 0
cmp dword [ebp - 0x50], 0xffffffff
jl 0x100183d0
mov dword [ebp - 0x58], 1
jmp 0x100183d4
and dword [ebp - 0x58], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
add eax, dword [ebp - 0x58]
jne 0x100183e8
xor eax, eax
jne 0x100183e8
and dword [ebp - 0x3c], 0
jmp 0x100183ef
mov dword [ebp - 0x3c], 1
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp - 0x3c]
mov dword [eax], ecx
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [ebp - 0x3c], eax
jne 0x1001840a
mov dword [ebp - 0x60], 1
jmp 0x1001840e
and dword [ebp - 0x60], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp dword [ebp - 0x60], eax
jne 0x10018421
mov dword [ebp - 0x68], 1
jmp 0x10018425
and dword [ebp - 0x68], 0
mov eax, dword [ebp - 0x88]
mov ecx, dword [ebp - 0x68]
mov dword [eax], ecx
cmp dword [ebp - 0x70], 0x75a
jge 0x10018445
push dword [ebp - 0x90]
call fcn.100714f3
pop ecx
jmp 0x1001848d
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0xb0]
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0xb8]
mov eax, dword [eax]
shr eax, 1
push eax
mov ecx, dword [ebp - 0xc0]
call fcn.1001fe2b
mov esp, ebp
pop ebp
ret