Function at 0x40d560
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x427690]
or ecx, 0xffffffff
xor eax, eax
mov ebp, dword [esp + 0x24]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x14], 0
mov eax, ecx
mov esi, edi
mov edi, dword [0x4271fc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x16]
test ah, 1
je 0x40d61a
mov edi, dword [0x4275d0]
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x4271fc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4271fc]
push eax
call fcn.00418f20
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40d5e2
inc ebx
jmp 0x40d5e8
mov ebx, dword [0x4271fc]
push 0
push ebp
call fcn.00403b40
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 8
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov edi, 1
push 0
push ebp
mov dword [esp + 0x18], edi
call fcn.00403b40
mov esi, eax
push 0x5c
push esi
call fcn.00418f20
mov ebp, eax
xor ebx, ebx
add esp, 0x10
cmp ebp, ebx
je 0x40d643
inc ebp
jmp 0x40d645
mov ebp, esi
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x1a]
cmp eax, 0xa
ja case.0x40d655.4
jmp dword [eax*4 + 0x40d87c]
mov eax, dword [0x4271fc]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.0x40d655.4
mov ecx, dword [0x4271fc]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp case.0x40d655.4
push 9
push ecx
call fcn.00403b40
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
push 0x104
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x4271fc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x4271fc]
push eax
push eax
call fcn.0040c0c0
add esp, 0x14
jmp case.0x40d655.4
mov eax, dword [0x4271fc]
push 0x14
push eax
call fcn.0040ba30
add esp, 8
mov dword [esp + 0x14], edi
jmp case.0x40d655.4
mov ecx, dword [0x4271fc]
push 0x10
push ecx
call fcn.0040ba30
add esp, 8
jmp case.0x40d655.4
mov edx, dword [0x4271fc]
push 0x19
push edx
call fcn.0040ba30
add esp, 8
jmp case.0x40d655.4
mov eax, dword [0x4271fc]
push 5
push eax
call fcn.0040ba30
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40d655.4
mov ecx, dword [0x4271fc]
push 0x1a
push ecx
call fcn.0040ba30
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40d655.4
push edi
push 0x30c
call fcn.00419122
mov ebx, eax
add esp, 8
test ebx, ebx
lea esi, [ebx + 0x208]
jne 0x40d776
mov edx, dword [0x4271fc]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp case.0x40d655.4
mov eax, dword [0x4271fc]
push eax
call fcn.004020b0
add esp, 4
mov edi, 0x104
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x18]
lea edx, [esp + 0x1c]
push ecx
mov ecx, dword [0x4271fc]
push ebx
lea eax, [ebx + 0x104]
push edx
push eax
push ecx
push esi
push ebp
push 1
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], edi
call sub.VERSION.dll_VerFindFileA
test al, 2
jne 0x40d7c7
mov dword [esp + 0x14], 1
cmp byte [ebx], 0
je 0x40d7f1
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x4271fc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40d7fe
mov eax, dword [0x4271fc]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push ebx
call fcn.004191d3
add esp, 4
mov ecx, dword [0x4271fc]
push ecx
call fcn.00402060
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x40d822
mov edi, ebp
jmp 0x40d833
mov eax, dword [esp + 0x24]
push 0
push eax
call fcn.00403b40
add esp, 8
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x4271fc]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x14]
mov ecx, edx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x40d872
mov eax, dword [0x4271fc]
push eax
call fcn.004012d0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret