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

Disassembly:
push 0xffffffffffffffff
push 0x488e79
mov eax, dword fs:[0]
push eax
mov eax, 0x165c
call fcn.00467ec0
mov eax, dword [0x4b9b20]
xor eax, esp
mov dword [esp + 0x1658], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4b9b20]
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 0x49f150
lea ecx, [esp + 0x1c]
mov dword [esp + 0x34], eax
call fcn.0041a8d0
mov edx, dword [esp + 0x18]
mov eax, dword [edx - 0xc]
mov dword [esp + 0x1678], 0
test eax, eax
jne 0x42784c
mov eax, dword [ebp + 4]
push ecx
sub eax, 0x10
mov dword [esp + 0x28], esp
mov esi, esp
push eax
call fcn.004199c0
add eax, 0x10
mov dword [esi], eax
add esp, 4
lea eax, [esp + 0x24]
push eax
mov ecx, ebp
call fcn.004272f0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x167c], 1
call fcn.0041a2a0
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 0x42784c
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 0x4278a1
mov eax, dword [ebp + 4]
push eax
lea edx, [esp + 0x24]
push edx
mov ecx, ebp
call fcn.004274f0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x167c], 2
call fcn.0041a2a0
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 0x4278a1
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.004660d0
mov eax, dword [esp + 0x24]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x4278f5
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 0x4278f5
lea edx, [esp + 0xe6c]
push edx
lea ecx, [esp + 0x1c]
call fcn.0041a760
mov ecx, dword [esp + 0x18]
cmp dword [ecx - 0xc], 0
jne 0x42792d
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 0x427926
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x428294
mov eax, dword [ebp + 0xc]
push ecx
push eax
push 0x48f938
call fcn.0041bcf0
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
push eax
call fcn.004199c0
add eax, 0x10
add esp, 0x10
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x1678], 3
call fcn.00427150
push 0x48ebcc
lea ecx, [esp + 0x1c]
call fcn.00420f40
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.004660d0
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
add esp, 0xc
jmp 0x4279ab
mov edi, dword [esp + 0x18]
mov eax, dword [edi - 0xc]
test esi, esi
jl 0x427ad5
cmp esi, eax
jg 0x427ad5
lea ecx, [edi + esi*2]
push 0x48f934
push ecx
call fcn.004689e9
add esp, 8
test eax, eax
je 0x427ad5
mov ecx, dword [esp + 0x18]
sub eax, ecx
sar eax, 1
js 0x427ad5
lea esi, [eax + 1]
mov eax, dword [ecx - 0xc]
test esi, esi
jl 0x427a12
cmp esi, eax
jg 0x427a12
lea edx, [ecx + esi*2]
push 0x48f934
push edx
call fcn.004689e9
add esp, 8
test eax, eax
je 0x427a12
sub eax, dword [esp + 0x18]
sar eax, 1
mov edi, eax
jmp 0x427a15
or edi, 0xffffffff
push 0x208
lea eax, [esp + 0x858]
push 0
push eax
call fcn.004660d0
add esp, 0xc
sub edi, esi
push edi
push esi
lea ecx, [esp + 0x28]
push ecx
lea ecx, [esp + 0x24]
call fcn.0041be90
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 0x427a70
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.0041be90
mov eax, dword [eax]
lea ecx, [esp + 0x854]
push ecx
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1680], 4
call fcn.0041dce0
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 0x427aca
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 0x4279a7
push 0x49f150
lea ecx, [esp + 0x20]
call fcn.0041a8d0
push 0x49f150
lea ecx, [esp + 0x18]
mov byte [esp + 0x167c], 5
call fcn.0041a8d0
mov edi, dword [esp + 0x28]
push 0x48dec0
mov bl, 6
push edi
mov byte [esp + 0x1680], bl
call dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
jne 0x427ce5
xor ecx, ecx
push 0x200
push ecx
lea edx, [esp + 0x42]
push edx
mov word [esp + 0x44], cx
call fcn.004660d0
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.00468212
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 0x427c34
push str..DIB
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x427c34
push str..GIF
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x427c34
push str..PNG
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x427c34
push str..JPE
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x427c34
push str..JPG
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x427c34
push str..JPEG
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x427c34
push str..JFIF
lea eax, [esp + 0x3c]
push eax
call esi
test eax, eax
je 0x427c34
push str..TIF
lea ecx, [esp + 0x3c]
push ecx
call esi
test eax, eax
je 0x427c34
push str..TIFF
lea edx, [esp + 0x3c]
push edx
call esi
test eax, eax
je 0x427c34
lea ecx, [esp + 0x14]
call fcn.00419b80
lea ecx, [esp + 0x1c]
call fcn.00419b80
lea ecx, [esp + 0x28]
call fcn.00419b80
lea ecx, [esp + 0x18]
call fcn.00419b80
xor eax, eax
jmp 0x428294
xor eax, eax
push 0x208
push eax
lea ecx, [esp + 0xa66]
push ecx
mov word [esp + 0xa68], ax
call fcn.004660d0
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.0041a760
push 0x48ebcc
lea ecx, [esp + 0x18]
call fcn.0041a890
lea eax, [esp + 0xa5c]
push eax
lea ecx, [esp + 0x18]
call fcn.0041a890
push 0x48ebcc
lea ecx, [esp + 0x18]
call fcn.0041a890
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 0x428210
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.0041a050
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x167c], 7
call fcn.0041a2a0
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 0x427d36
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 0x427d50
push 0x49f150
lea ecx, [esp + 0x18]
call fcn.0041a760
jmp 0x427da0
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.00419fd0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x167c], 8
call fcn.0041a2a0
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 0x427da0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x1c]
call fcn.00427150
push 0x48ebcc
lea ecx, [esp + 0x20]
call fcn.00420f40
push 0x48ebc8
lea ecx, [esp + 0x20]
call fcn.00420f40
lea ecx, [esp + 0x14]
call fcn.00427150
push 0x48ebcc
lea ecx, [esp + 0x18]
call fcn.00420f40
push 0x48ebc8
lea ecx, [esp + 0x18]
call fcn.00420f40
xor ecx, ecx
push 0x200
push ecx
lea edx, [esp + 0x246]
push edx
mov word [esp + 0x248], cx
call fcn.004660d0
xor eax, eax
push 0x200
push eax
lea ecx, [esp + 0xc7e]
push ecx
mov word [esp + 0xc80], ax
call fcn.004660d0
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.00468212
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 0x427eb6
mov eax, dword [esp + 0x14]
cmp dword [eax - 0xc], 0
jl 0x427ea6
push 0x48f880
push eax
call fcn.004689e9
add esp, 8
test eax, eax
je 0x427ea6
sub eax, dword [esp + 0x14]
sar eax, 1
jns 0x427eb6
push 0x48f870
push 0
lea ecx, [esp + 0x1c]
call fcn.00427020
push str.SLDWORKS.EXE
lea edx, [esp + 0x240]
push edx
call esi
test eax, eax
jne 0x427ed7
push 0x49f150
lea ecx, [esp + 0x18]
call fcn.0041a760
push str.CORELDRW.EXE
lea eax, [esp + 0x240]
push eax
call esi
test eax, eax
jne 0x427ef8
push 0x49f150
lea ecx, [esp + 0x18]
call fcn.0041a760
push str.MSPAINT.EXE
lea ecx, [esp + 0x240]
push ecx
call esi
test eax, eax
jne 0x427f19
push str.MSPAINT.EXE
lea ecx, [esp + 0x20]
call fcn.0041a760
push str.KMCAD.EXE
lea edx, [esp + 0x240]
push edx
call esi
test eax, eax
jne 0x427f3a
push str._dde
lea ecx, [esp + 0x18]
call fcn.0041a760
xor eax, eax
push 0x208
push eax
lea ecx, [esp + 0x44a]
push ecx
mov word [esp + 0x44c], ax
call fcn.004660d0
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 0x427f8f
mov eax, dword [esp + 0x2c]
push 0x104
push eax
lea ecx, [esp + 0x448]
push ecx
call fcn.00468c59
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 0xc], 0
jl 0x4280e7
push 0x48f810
push ecx
call fcn.004689e9
mov ecx, dword [esp + 0x1c]
add esp, 8
test eax, eax
je 0x428054
sub eax, ecx
sar eax, 1
js 0x428054
lea edx, [esp + 0x14]
push 0x48f810
push edx
call fcn.00426f30
add esp, 8
test al, al
je 0x427ffc
lea eax, [esp + 0x440]
push eax
lea ecx, [esp + 0x18]
push 0x48d98c
push ecx
call fcn.0041bf40
add esp, 0xc
jmp 0x428138
push 0x49f150
lea ecx, [esp + 0x24]
call fcn.0041a8d0
lea edx, [esp + 0x440]
push edx
lea eax, [esp + 0x24]
push 0x48d98c
push eax
mov byte [esp + 0x1684], 9
call fcn.0041bf40
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push ecx
push 0x48f810
lea ecx, [esp + 0x1c]
call fcn.0041dce0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1678], bl
call fcn.00419b80
jmp 0x428138
cmp dword [ecx - 0xc], 0
jl 0x4280e7
push 0x48f808
push ecx
call fcn.004689e9
add esp, 8
test eax, eax
je 0x4280e7
sub eax, dword [esp + 0x14]
sar eax, 1
js 0x4280e7
lea edx, [esp + 0x14]
push 0x48f808
push edx
call fcn.00426f30
add esp, 8
test al, al
jne 0x427fdd
push 0x49f150
lea ecx, [esp + 0x24]
call fcn.0041a8d0
lea edx, [esp + 0x440]
push edx
lea eax, [esp + 0x24]
push 0x48d98c
push eax
mov byte [esp + 0x1684], 0xa
call fcn.0041bf40
mov ecx, dword [esp + 0x2c]
add esp, 0xc
push ecx
push 0x48f808
lea ecx, [esp + 0x1c]
call fcn.0041dce0
lea ecx, [esp + 0x20]
mov byte [esp + 0x1678], bl
call fcn.00419b80
jmp 0x428138
lea edx, [esp + 0x14]
push 0x49f150
push edx
call fcn.00419a90
add esp, 8
test al, al
je 0x42810b
push 0x48ebc8
lea ecx, [esp + 0x18]
call fcn.0041a890
push 0x48ebcc
lea ecx, [esp + 0x18]
call fcn.0041a890
lea eax, [esp + 0x440]
push eax
lea ecx, [esp + 0x18]
call fcn.0041a890
push 0x48ebcc
lea ecx, [esp + 0x18]
call fcn.0041a890
push str.KQKQP
lea ecx, [esp + 0x240]
push ecx
call esi
test eax, eax
jne 0x42815c
lea edx, [esp + 0x440]
push edx
lea ecx, [esp + 0x18]
call fcn.0041a760
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4281d6
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x656]
push edx
mov word [esp + 0x658], cx
call fcn.004660d0
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 0x4281b0
sub eax, edx
sar eax, 1
je 0x427c09
lea edx, [esp + 0x64c]
push edx
lea ecx, [esp + 0x20]
call fcn.0041a760
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 0x42821c
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 0x428244
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 0x428268
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 0x42828f
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.00466d50
add esp, 0x1668
ret 0x10