Function at 0x410fc0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x25c
mov ax, word [0x428280]
push esi
push edi
mov word [esp + 0xc], ax
mov ecx, 0x95
xor eax, eax
lea edi, [esp + 0xe]
push 0x3d94
rep stosd dword es:[edi], eax
push 0x40
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
jne 0x411004
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
add esp, 0x25c
ret
push ebx
push ebp
push 0
lea ecx, [esp + 0x18]
push 0x1a
push ecx
push 0
mov dword [esi], 0x4c4
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
mov ebp, 0x5c
je 0x41115c
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
lea edx, [esp + 0x18]
lea eax, [eax + eax*2]
lea ecx, [esi + eax*4 + 0x26c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0x10]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x26a], bp
je 0x4110c5
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
add edx, 0x26c
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0x10]
lea eax, [esi + edx*4 + 0x10]
inc ecx
mov dword [eax], ecx
jmp 0x4110cb
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
mov eax, dword [esi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x14]
push eax
push ecx
call ebx
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0xc], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0xc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x12], bp
je 0x411157
add edx, 0x14
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0xc]
lea eax, [esi + edx*4 + 0xc]
inc ecx
mov dword [eax], ecx
inc dword [esi + 4]
jmp 0x411168
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
push 0
lea eax, [esp + 0x18]
push 0x1c
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x41129d
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x26c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0x10]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x26a], bp
je 0x411214
add edx, 0x26c
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0x10]
lea eax, [esi + edx*4 + 0x10]
inc ecx
mov dword [eax], ecx
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x14]
push eax
push ecx
call ebx
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0xc], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0xc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x12], bp
je 0x41129a
add edx, 0x14
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0xc]
lea eax, [esi + edx*4 + 0xc]
inc ecx
mov dword [eax], ecx
inc dword [esi + 4]
push 0
lea eax, [esp + 0x18]
push 0x23
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4113d2
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x26c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0x10]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x26a], bp
je 0x411349
add edx, 0x26c
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0x10]
lea eax, [esi + edx*4 + 0x10]
inc ecx
mov dword [eax], ecx
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x14]
push eax
push ecx
call ebx
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0xc], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0xc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x12], bp
je 0x4113cf
add edx, 0x14
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0xc]
lea eax, [esi + edx*4 + 0xc]
inc ecx
mov dword [eax], ecx
inc dword [esi + 4]
push 0
lea eax, [esp + 0x18]
push 0x20
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x411507
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x26c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0x10]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x26a], bp
je 0x41147e
add edx, 0x26c
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0x10]
lea eax, [esi + edx*4 + 0x10]
inc ecx
mov dword [eax], ecx
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x14]
push eax
push ecx
call ebx
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0xc], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0xc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x12], bp
je 0x411504
add edx, 0x14
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0xc]
lea eax, [esi + edx*4 + 0xc]
inc ecx
mov dword [eax], ecx
inc dword [esi + 4]
xor eax, eax
mov dword [esp + 0x10], eax
lea ecx, [esp + 0x14]
push ecx
push 0x12c
push eax
call fcn.004116f0
test eax, eax
je 0x4116a4
mov eax, dword [esi + 4]
xor ebx, ebx
test eax, eax
jbe 0x41157c
lea edi, [esi + 0x26c]
lea edx, [esp + 0x14]
lea eax, [edi - 0x258]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x41169e
lea ecx, [esp + 0x14]
push ecx
push edi
call dword [sym.imp.MSVCRT.dll_wcsstr]
add esp, 8
test eax, eax
jne 0x41169e
mov eax, dword [esi + 4]
inc ebx
add edi, 0x4bc
cmp ebx, eax
jb 0x411534
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
lea edx, [esp + 0x18]
lea eax, [eax + eax*2]
lea ecx, [esi + eax*4 + 0x26c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0x10], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0x10]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x26a], bp
je 0x41160f
add edx, 0x26c
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0x10]
lea eax, [esi + edx*4 + 0x10]
inc ecx
mov dword [eax], ecx
mov eax, dword [esi + 4]
push 0x12c
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea ecx, [esp + 0x18]
lea edx, [eax + eax*2]
lea eax, [esi + edx*4 + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
mov ecx, dword [esi + 4]
lea edx, [ecx + ecx*4]
lea edx, [edx + edx*4]
lea ecx, [ecx + edx*4]
lea ecx, [ecx + ecx*2]
mov dword [esi + ecx*4 + 0xc], eax
mov eax, dword [esi + 4]
lea ecx, [eax + eax*4]
lea edx, [ecx + ecx*4]
lea ecx, [eax + edx*4]
lea ecx, [ecx + ecx*2]
lea edx, [esi + ecx*4]
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
mov ecx, dword [edx + 0xc]
lea eax, [eax + eax*2]
lea eax, [ecx + eax*2]
cmp word [esi + eax*2 + 0x12], bp
je 0x411699
add edx, 0x14
push 0x426124
push edx
call edi
mov eax, dword [esi + 4]
add esp, 8
lea ecx, [eax + eax*4]
lea ecx, [ecx + ecx*4]
lea eax, [eax + ecx*4]
lea edx, [eax + eax*2]
mov ecx, dword [esi + edx*4 + 0xc]
lea eax, [esi + edx*4 + 0xc]
inc ecx
mov dword [eax], ecx
inc dword [esi + 4]
jmp 0x4116a4
mov edi, dword [sym.imp.MSVCRT.dll_wcscat]
mov eax, dword [esp + 0x10]
inc eax
cmp eax, 5
mov dword [esp + 0x10], eax
jl 0x41150d
push 0
push 0
push 0
push 0
push 0x3d94
push esi
push 0x82158
call fcn.0040f110
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebp
mov eax, edi
pop ebx
pop edi
pop esi
add esp, 0x25c
ret