Function at 0x40a260
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4ebaa3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x480
push ebx
push ebp
push esi
push edi
xor esi, esi
push 0x52cb30
lea ecx, [esp + 0x18]
mov dword [esp + 0x40], esi
call fcn.0044fec0
push str.CSDViewerApp::GetTargetProcessPath.______________r_n
push str.SDSystem
push 1
push 0x52e6a4
mov dword [esp + 0x4a8], 1
call fcn.0042b6d0
mov eax, dword [esp + 0x4b8]
add esp, 0x10
xor ebp, ebp
cmp eax, esi
jne 0x40a789
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x82]
mov word [esp + 0x80], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x42]
mov word [esp + 0x40], si
rep stosd dword es:[edi], eax
mov ebx, dword [esp + 0x4a4]
push 0x1f
stosw word es:[edi], ax
lea eax, [esp + 0x44]
mov ebp, 1
push eax
push ebx
call fcn.0040a9d0
add esp, 0xc
test eax, eax
je 0x40a3ad
lea ecx, [esp + 0x40]
push ecx
push str.CSDViewerApp::GetTargetProcessPath._Ext__s__r_n
push str.SDSystem
push ebp
push 0x52e6a4
call fcn.0042b6d0
mov eax, dword [0x531d6c]
add esp, 0x14
cmp eax, esi
mov ebp, 2
mov dword [esp + 0x20], 0x104
je 0x40a3ad
lea edx, [esp + 0x20]
lea ecx, [esp + 0x80]
push edx
push ecx
lea edx, [esp + 0x48]
push esi
push edx
push ebp
push 0x420
call eax
lea eax, [esp + 0x80]
push eax
push 0x5190c8
push str.SDSystem
push 1
push 0x52e6a4
call fcn.0042b6d0
add esp, 0x14
lea ecx, [esp + 0x80]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a3ad
lea edx, [esp + 0x80]
lea ecx, [esp + 0x14]
push edx
call fcn.004508e0
mov eax, dword [esp + 0x14]
cmp dword [eax - 8], esi
jne 0x40a789
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x28a]
mov word [esp + 0x288], si
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x288]
push ecx
push 0x104
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea edx, [esp + 0x80]
lea eax, [esp + 0x288]
push edx
push eax
push ebx
call dword [sym.imp.SHELL32.dll_FindExecutableW]
cmp eax, 0x20
jbe 0x40a435
lea ecx, [esp + 0x80]
mov ebp, 4
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a789
lea edx, [esp + 0x80]
lea ecx, [esp + 0x14]
push edx
call fcn.004508e0
jmp 0x40a789
push 0x52cb30
lea ecx, [esp + 0x24]
mov ebp, 5
call fcn.0044fec0
push ebx
lea ecx, [esp + 0x20]
mov byte [esp + 0x49c], 2
call fcn.0044fec0
mov bl, 3
push 0x2e
lea ecx, [esp + 0x20]
mov byte [esp + 0x49c], bl
call fcn.00451810
cmp eax, 0xffffffff
je 0x40a4a4
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x24]
call fcn.00452950
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x49c], 4
call fcn.004507f0
lea ecx, [esp + 0x10]
mov byte [esp + 0x498], bl
call fcn.00450660
lea ecx, [esp + 0x1c]
mov byte [esp + 0x498], 2
call fcn.00450660
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 8]
test eax, eax
je 0x40a776
push 0x52cb30
lea ecx, [esp + 0x20]
mov ebp, 6
call fcn.0044fec0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x498], 5
call fcn.0045ccf0
mov edx, dword [esp + 0x20]
push 0x20019
push edx
push SysReAllocStringLen
lea ecx, [esp + 0x38]
mov byte [esp + 0x4a4], 6
call fcn.0045ce50
test eax, eax
je 0x40a548
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x34]
call fcn.0045d460
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x49c], 7
call fcn.004507f0
lea ecx, [esp + 0x10]
mov byte [esp + 0x498], 6
call fcn.00450660
lea ecx, [esp + 0x2c]
call fcn.0045cea0
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 8]
test eax, eax
je 0x40a754
push 0x52cb30
lea ecx, [esp + 0x1c]
mov ebp, 7
call fcn.0044fec0
lea ecx, [esp + 0x34]
mov byte [esp + 0x498], 8
call fcn.0045ccf0
push str._shellopencommand
lea ecx, [esp + 0x20]
mov byte [esp + 0x49c], 9
call fcn.004512b0
mov edx, dword [esp + 0x1c]
push 0x20019
push edx
push SysReAllocStringLen
lea ecx, [esp + 0x40]
call fcn.0045ce50
test eax, eax
je 0x40a5e9
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x3c]
call fcn.0045d460
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x49c], 0xa
call fcn.004507f0
lea ecx, [esp + 0x10]
mov byte [esp + 0x498], 9
call fcn.00450660
lea ecx, [esp + 0x34]
call fcn.0045cea0
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
test eax, eax
je 0x40a732
lea ecx, [esp + 0x18]
call fcn.004543d0
lea ecx, [esp + 0x18]
call fcn.004540b0
mov edx, dword [esp + 0x18]
cmp word [edx], 0x22
jne 0x40a672
push 1
push 0x5190c4
lea ecx, [esp + 0x20]
mov ebp, 9
call fcn.00451880
dec eax
lea ecx, [esp + 0x18]
push eax
lea eax, [esp + 0x14]
push 1
push eax
call fcn.00452980
mov ecx, dword [esp + 0x10]
mov byte [esp + 0x498], 0xb
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40a661
lea edx, [esp + 0x10]
lea ecx, [esp + 0x14]
push edx
call fcn.004507f0
mov byte [esp + 0x498], 9
lea ecx, [esp + 0x10]
jmp 0x40a72d
mov ebp, 0xa
xor esi, esi
mov bl, 0xc
push 0x52cb30
lea ecx, [esp + 0x14]
call fcn.0044fec0
push esi
push 0x5190c0
lea ecx, [esp + 0x20]
mov byte [esp + 0x4a0], bl
call fcn.00451880
mov esi, eax
cmp esi, 0xffffffff
je 0x40a6d9
lea eax, [esp + 0x24]
push esi
push eax
lea ecx, [esp + 0x20]
call fcn.00452da0
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x49c], 0xd
call fcn.004507f0
lea ecx, [esp + 0x24]
mov byte [esp + 0x498], bl
call fcn.00450660
jmp 0x40a6e7
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x14]
call fcn.004507f0
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40a713
lea ecx, [esp + 0x10]
mov byte [esp + 0x498], 9
call fcn.00450660
cmp esi, 0xffffffff
jne 0x40a67b
jmp 0x40a732
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
call fcn.004507f0
mov byte [esp + 0x498], 9
lea ecx, [esp + 0x10]
call fcn.00450660
lea ecx, [esp + 0x34]
mov byte [esp + 0x498], 8
call fcn.0045cdd0
lea ecx, [esp + 0x18]
mov byte [esp + 0x498], 6
call fcn.00450660
lea ecx, [esp + 0x2c]
mov byte [esp + 0x498], 5
call fcn.0045cdd0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x498], 2
call fcn.00450660
lea ecx, [esp + 0x20]
mov byte [esp + 0x498], 1
call fcn.00450660
xor esi, esi
mov ecx, dword [esp + 0x14]
cmp dword [ecx - 8], esi
jne 0x40a915
push esi
lea ecx, [esp + 0x84]
mov ebp, 0xb
call fcn.00401d80
mov edx, dword [esp + 0x4a4]
mov bl, 0xe
push edx
lea ecx, [esp + 0x84]
mov byte [esp + 0x49c], bl
call fcn.004022f0
test eax, eax
je 0x40a80d
lea ecx, [esp + 0x80]
call fcn.004d2aec
cmp eax, 1
jne 0x40a80d
lea eax, [esp + 0x24]
lea ecx, [esp + 0x80]
push eax
call fcn.004043c0
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x49c], 0xf
call fcn.004507f0
lea ecx, [esp + 0x24]
mov byte [esp + 0x498], bl
call fcn.00450660
lea ecx, [esp + 0x1a4]
mov byte [esp + 0x498], 0x1a
call fcn.004d1091
lea ecx, [esp + 0x168]
mov byte [esp + 0x498], 0x19
call fcn.004dfc7b
lea ecx, [esp + 0x12c]
mov byte [esp + 0x498], 0x18
call fcn.004dfc7b
mov eax, dword [esp + 0x11c]
mov byte [esp + 0x498], 0x17
cmp eax, esi
je 0x40a865
push eax
call fcn.004d248b
add esp, 4
mov eax, dword [esp + 0x10c]
mov byte [esp + 0x498], 0x16
cmp eax, esi
je 0x40a881
push eax
call fcn.004d248b
add esp, 4
mov eax, dword [esp + 0xfc]
mov byte [esp + 0x498], 0x15
cmp eax, esi
je 0x40a89d
push eax
call fcn.004d248b
add esp, 4
lea ecx, [esp + 0xec]
mov byte [esp + 0x498], 0x14
call fcn.00450660
lea ecx, [esp + 0xe8]
mov byte [esp + 0x498], 0x13
call fcn.00450660
lea ecx, [esp + 0xe4]
mov byte [esp + 0x498], 0x12
call fcn.00450660
lea ecx, [esp + 0xe0]
mov byte [esp + 0x498], 0x11
call fcn.00450660
lea ecx, [esp + 0xdc]
mov byte [esp + 0x498], 0x10
call fcn.00450660
lea ecx, [esp + 0x80]
mov byte [esp + 0x498], 1
call fcn.004d2632
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x2c]
call fcn.0044fc60
mov esi, dword [esp + 0x28]
push 0x104
push 0x104
lea ecx, [esp + 0x1c]
mov byte [esp + 0x4a0], 0x1b
call fcn.00451330
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call fcn.00451400
mov edx, dword [esp + 0x14]
push ebp
push edx
push str.CSDViewerApp::GetTargetProcessPath.__s__Debug__d__r_n
push str.SDSystem
push 1
push 0x52e6a4
call fcn.0042b6d0
mov esi, dword [esp + 0x4b8]
add esp, 0x18
lea eax, [esp + 0x14]
mov ecx, esi
push eax
call fcn.0044fc60
mov dword [esp + 0x3c], 1
lea ecx, [esp + 0x28]
mov byte [esp + 0x498], 1
call fcn.00450660
lea ecx, [esp + 0x14]
mov byte [esp + 0x498], 0
call fcn.00450660
mov ecx, dword [esp + 0x490]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x48c
ret 0xc