Function at 0x411490
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push 0xffffffffffffffff
push 0x470d49
mov eax, dword fs:[0]
push eax
mov eax, 0x165c
call fcn.004536f0
mov eax, dword [0x49ab20]
xor eax, esp
mov dword [esp + 0x1658], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x49ab20]
xor eax, esp
push eax
lea eax, [esp + 0x1670]
mov dword fs:[0], eax
mov eax, dword [esp + 0x1680]
mov ebp, ecx
mov ecx, dword [esp + 0x1684]
mov dword [esp + 0x2c], ecx
push 0x4858e4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], eax
call fcn.00405330
mov edx, dword [esp + 0x18]
mov eax, dword [edx - 0xc]
mov dword [esp + 0x1678], 0
test eax, eax
jne 0x41156c
mov eax, dword [ebp + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.00404440
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [esp + 0x24]
push eax
mov ecx, ebp
call fcn.00411010
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x167c], 1
call fcn.00404d00
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x1678], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41156c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 0xc]
test eax, eax
jne 0x4115c1
mov eax, dword [ebp + 4]
push eax
lea edx, [esp + 0x24]
push edx
mov ecx, ebp
call fcn.00411210
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x167c], 2
call fcn.00404d00
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x1678], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4115c1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor ecx, ecx
push 0x7fe
push ecx
lea edx, [esp + 0xe76]
push edx
mov word [esp + 0xe78], cx
call fcn.00451660
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x411615
mov eax, dword [ebp + 0xc]
lea ecx, [esp + 0xe6c]
push ecx
push 0
push eax
call dword [sym.imp.SHELL32.dll_FindExecutableW]
cmp eax, 0x20
jbe 0x411615
lea edx, [esp + 0xe6c]
push edx
lea ecx, [esp + 0x1c]
call fcn.004051c0
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
jne 0x41164d
lea eax, [ecx - 0x10]
mov dword [esp + 0x1678], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411646
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x411fb4
mov eax, dword [ebp + 0xc]
push ecx
push eax
push 0x477598
call fcn.00414dc0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
push eax
call fcn.00404440
add eax, 0x10
add esp, 0x10
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1678], 3
call fcn.00410e70
push 0x476910
lea ecx, [esp + 0x1c]
call fcn.0040b4f0
mov edi, dword [esp + 0x18]
mov ecx, dword [edi - 0xc]
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x85e]
push eax
mov dword [esp + 0x30], ecx
xor esi, esi
mov word [esp + 0x860], dx
call fcn.00451660
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0xc
jmp 0x4116cb
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 0xc]
test esi, esi
jl 0x4117f5
cmp esi, eax
jg 0x4117f5
lea ecx, [edi + esi*2]
push 0x477594
push ecx
call fcn.00453889
add esp, 8
test eax, eax
je 0x4117f5
mov ecx, dword [esp + 0x18]
sub eax, ecx
sar eax, 1
js 0x4117f5
lea esi, [eax + 1]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x411732
cmp esi, eax
jg 0x411732
lea edx, [ecx + esi*2]
push 0x477594
push edx
call fcn.00453889
add esp, 8
test eax, eax
je 0x411732
sub eax, dword [esp + 0x18]
sar eax, 1
mov edi, eax
jmp 0x411735
or edi, 0xffffffff
push 0x208
lea eax, [esp + 0x858]
push 0
push eax
call fcn.00451660
add esp, 0xc
sub edi, esi
push edi
push esi
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x24]
call fcn.004068f0
mov eax, dword [eax]
push 0x104
lea edx, [esp + 0x858]
push edx
push eax
call ebx
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411790
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 2
push edi
lea ecx, [esi - 1]
push ecx
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x24]
call fcn.004068f0
mov eax, dword [eax]
lea ecx, [esp + 0x854]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1680], 4
call fcn.00408680
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x1678], 3
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4117ea
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
inc esi
cmp esi, dword [esp + 0x24]
jl 0x4116c7
push 0x4858e4
lea ecx, [esp + 0x20]
call fcn.00405330
push 0x4858e4
lea ecx, [esp + 0x18]
mov byte [esp + 0x167c], 5
call fcn.00405330
mov edi, dword [esp + 0x28]
push 0x475e1c
mov bl, 6
push edi
mov byte [esp + 0x1680], bl
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x411a05
xor ecx, ecx
push 0x200
push ecx
lea edx, [esp + 0x42]
push edx
mov word [esp + 0x44], cx
call fcn.00451660
mov eax, dword [ebp + 0xc]
push 0x100
lea ecx, [esp + 0x48]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
call fcn.00453073
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
add esp, 0x30
push str..BMP
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x411954
push str..DIB
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x411954
push str..GIF
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x411954
push str..PNG
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x411954
push str..JPE
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x411954
push str..JPG
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x411954
push str..JPEG
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x411954
push str..JFIF
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x411954
push str..TIF
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x411954
push str..TIFF
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x411954
lea ecx, [esp + 0x14]
call fcn.0040ab90
lea ecx, [esp + 0x1c]
call fcn.0040ab90
lea ecx, [esp + 0x28]
call fcn.0040ab90
lea ecx, [esp + 0x18]
call fcn.0040ab90
xor eax, eax
jmp 0x411fb4
xor eax, eax
push 0x208
push eax
lea ecx, [esp + 0xa66]
push ecx
mov word [esp + 0xa68], ax
call fcn.00451660
mov eax, dword [ebp + 0xc]
add esp, 0xc
push 0x104
lea edx, [esp + 0xa60]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push str.MSPAINT.EXE
lea ecx, [esp + 0x20]
call fcn.004051c0
push 0x476910
lea ecx, [esp + 0x18]
call fcn.004052f0
lea eax, [esp + 0xa5c]
push eax
lea ecx, [esp + 0x18]
call fcn.004052f0
push 0x476910
lea ecx, [esp + 0x18]
call fcn.004052f0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ecx
push edx
call esi
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x2c]
push eax
push ecx
call esi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x1678], 5
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x411f30
sub eax, edi
sar eax, 1
mov esi, eax
lea ecx, [esi + 4]
push ecx
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x30]
call fcn.00404ab0
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x167c], 7
call fcn.00404d00
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x1678], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411a56
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [edi - 0xc]
add eax, 0xfffffffc
cmp esi, eax
jne 0x411a70
push 0x4858e4
lea ecx, [esp + 0x18]
call fcn.004051c0
jmp 0x411ac0
mov eax, dword [edi - 0xc]
sub eax, esi
sub eax, 4
push eax
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x30]
call fcn.00404a30
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x167c], 8
call fcn.00404d00
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
mov byte [esp + 0x1678], bl
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x411ac0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
call fcn.00410e70
push 0x476910
lea ecx, [esp + 0x20]
call fcn.0040b4f0
push 0x47690c
lea ecx, [esp + 0x20]
call fcn.0040b4f0
lea ecx, [esp + 0x14]
call fcn.00410e70
push 0x476910
lea ecx, [esp + 0x18]
call fcn.0040b4f0
push 0x47690c
lea ecx, [esp + 0x18]
call fcn.0040b4f0
xor ecx, ecx
push 0x200
push ecx
lea edx, [esp + 0x246]
push edx
mov word [esp + 0x248], cx
call fcn.00451660
xor eax, eax
push 0x200
push eax
lea ecx, [esp + 0xc7e]
push ecx
mov word [esp + 0xc80], ax
call fcn.00451660
mov ecx, dword [esp + 0x34]
push 0x100
lea edx, [esp + 0xc84]
push edx
push 0x100
lea eax, [esp + 0x260]
push eax
push 0
push 0
push 0
push 0
push ecx
call fcn.00453073
add esp, 0x3c
lea edx, [esp + 0xc68]
push edx
lea eax, [esp + 0x240]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpiW]
push str.WINWORD.EXE
lea ecx, [esp + 0x240]
push ecx
call esi
test eax, eax
jne 0x411bd6
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
jl 0x411bc6
push str._t__n
push eax
call fcn.00453889
add esp, 8
test eax, eax
je 0x411bc6
sub eax, dword [esp + 0x14]
sar eax, 1
jns 0x411bd6
push 0x4774d0
push 0
lea ecx, [esp + 0x1c]
call fcn.00410d40
push str.SLDWORKS.EXE
lea edx, [esp + 0x240]
push edx
call esi
test eax, eax
jne 0x411bf7
push 0x4858e4
lea ecx, [esp + 0x18]
call fcn.004051c0
push str.CORELDRW.EXE
lea eax, [esp + 0x240]
push eax
call esi
test eax, eax
jne 0x411c18
push 0x4858e4
lea ecx, [esp + 0x18]
call fcn.004051c0
push str.MSPAINT.EXE
lea ecx, [esp + 0x240]
push ecx
call esi
test eax, eax
jne 0x411c39
push str.MSPAINT.EXE
lea ecx, [esp + 0x20]
call fcn.004051c0
push str.KMCAD.EXE
lea edx, [esp + 0x240]
push edx
call esi
test eax, eax
jne 0x411c5a
push str._dde
lea ecx, [esp + 0x18]
call fcn.004051c0
xor eax, eax
push 0x208
push eax
lea ecx, [esp + 0x44a]
push ecx
mov word [esp + 0x44c], ax
call fcn.00451660
mov eax, dword [ebp + 0xc]
add esp, 0xc
push 0x104
lea edx, [esp + 0x444]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
jne 0x411caf
mov eax, dword [esp + 0x2c]
push 0x104
push eax
lea ecx, [esp + 0x448]
push ecx
call fcn.00453bd9
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], 0
jl 0x411e07
push 0x477470
push ecx
call fcn.00453889
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x411d74
sub eax, ecx
sar eax, 1
js 0x411d74
lea edx, [esp + 0x14]
push 0x477470
push edx
call fcn.00410c50
add esp, 8
test al, al
je 0x411d1c
lea eax, [esp + 0x440]
push eax
lea ecx, [esp + 0x18]
push 0x47590c
push ecx
call fcn.004069a0
add esp, 0xc
jmp 0x411e58
push 0x4858e4
lea ecx, [esp + 0x24]
call fcn.00405330
lea edx, [esp + 0x440]
push edx
lea eax, [esp + 0x24]
push 0x47590c
push eax
mov byte [esp + 0x1684], 9
call fcn.004069a0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push ecx
push 0x477470
lea ecx, [esp + 0x1c]
call fcn.00408680
lea ecx, [esp + 0x20]
mov byte [esp + 0x1678], bl
call fcn.0040ab90
jmp 0x411e58
cmp dword [ecx - 0xc], 0
jl 0x411e07
push 0x477468
push ecx
call fcn.00453889
add esp, 8
test eax, eax
je 0x411e07
sub eax, dword [esp + 0x14]
sar eax, 1
js 0x411e07
lea edx, [esp + 0x14]
push 0x477468
push edx
call fcn.00410c50
add esp, 8
test al, al
jne 0x411cfd
push 0x4858e4
lea ecx, [esp + 0x24]
call fcn.00405330
lea edx, [esp + 0x440]
push edx
lea eax, [esp + 0x24]
push 0x47590c
push eax
mov byte [esp + 0x1684], 0xa
call fcn.004069a0
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push ecx
push 0x477468
lea ecx, [esp + 0x1c]
call fcn.00408680
lea ecx, [esp + 0x20]
mov byte [esp + 0x1678], bl
call fcn.0040ab90
jmp 0x411e58
lea edx, [esp + 0x14]
push 0x4858e4
push edx
call fcn.00404510
add esp, 8
test al, al
je 0x411e2b
push 0x47690c
lea ecx, [esp + 0x18]
call fcn.004052f0
push 0x476910
lea ecx, [esp + 0x18]
call fcn.004052f0
lea eax, [esp + 0x440]
push eax
lea ecx, [esp + 0x18]
call fcn.004052f0
push 0x476910
lea ecx, [esp + 0x18]
call fcn.004052f0
push str.KQKQP
lea ecx, [esp + 0x240]
push ecx
call esi
test eax, eax
jne 0x411e7c
lea edx, [esp + 0x440]
push edx
lea ecx, [esp + 0x18]
call fcn.004051c0
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x411ef6
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x656]
push edx
mov word [esp + 0x658], cx
call fcn.00451660
mov eax, dword [ebp + 0xc]
add esp, 0xc
lea ecx, [esp + 0x64c]
push ecx
push 0
push eax
call dword [sym.imp.SHELL32.dll_FindExecutableW]
lea eax, [esp + 0x64c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x411ed0
sub eax, edx
sar eax, 1
je 0x411929
lea edx, [esp + 0x64c]
push edx
lea ecx, [esp + 0x20]
call fcn.004051c0
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push eax
push ecx
call esi
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
push edx
push eax
call esi
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x1678], 5
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411f3c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1678], 3
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411f64
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [esp + 0x1678], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411f88
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov dword [esp + 0x1678], edx
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x411faf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x1670]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1658]
xor ecx, esp
call fcn.004522e0
add esp, 0x1668
ret 0x10