Function at 0x40d100
Capabilities:
Get common file path

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [0x427648]
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 [0x4271bc]
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 0x40d1ba
mov edi, dword [0x427590]
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 [0x4271bc]
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 [0x4271bc]
push eax
call fcn.00418b20
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x40d182
inc ebx
jmp 0x40d188
mov ebx, dword [0x4271bc]
push 0
push ebp
call fcn.00403a20
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.00403a20
mov esi, eax
push 0x5c
push esi
call fcn.00418b20
mov ebp, eax
xor ebx, ebx
add esp, 0x10
cmp ebp, ebx
je 0x40d1e3
inc ebp
jmp 0x40d1e5
mov ebp, esi
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 0x1a]
cmp eax, 0xa
ja case.0x40d1f5.4
jmp dword [eax*4 + 0x40d41c]
mov eax, dword [0x4271bc]
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
jmp case.0x40d1f5.4
mov ecx, dword [0x4271bc]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
jmp case.0x40d1f5.4
push 9
push ecx
call fcn.00403a20
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 [0x4271bc]
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 [0x4271bc]
push eax
push eax
call fcn.0040bd90
add esp, 0x14
jmp case.0x40d1f5.4
mov eax, dword [0x4271bc]
push 0x14
push eax
call fcn.0040b7f0
add esp, 8
mov dword [esp + 0x14], edi
jmp case.0x40d1f5.4
mov ecx, dword [0x4271bc]
push 0x10
push ecx
call fcn.0040b7f0
add esp, 8
jmp case.0x40d1f5.4
mov edx, dword [0x4271bc]
push 0x19
push edx
call fcn.0040b7f0
add esp, 8
jmp case.0x40d1f5.4
mov eax, dword [0x4271bc]
push 5
push eax
call fcn.0040b7f0
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40d1f5.4
mov ecx, dword [0x4271bc]
push 0x1a
push ecx
call fcn.0040b7f0
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40d1f5.4
push edi
push 0x30c
call fcn.00418d22
mov ebx, eax
add esp, 8
test ebx, ebx
lea esi, [ebx + 0x208]
jne 0x40d316
mov edx, dword [0x4271bc]
push 0x104
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
jmp case.0x40d1f5.4
mov eax, dword [0x4271bc]
push eax
call fcn.00402090
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 [0x4271bc]
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 0x40d367
mov dword [esp + 0x14], 1
cmp byte [ebx], 0
je 0x40d391
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 [0x4271bc]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x40d39e
mov eax, dword [0x4271bc]
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
push ebx
call fcn.00418dd3
add esp, 4
mov ecx, dword [0x4271bc]
push ecx
call fcn.00402040
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x40d3c2
mov edi, ebp
jmp 0x40d3d3
mov eax, dword [esp + 0x24]
push 0
push eax
call fcn.00403a20
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 [0x4271bc]
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 0x40d412
mov eax, dword [0x4271bc]
push eax
call fcn.004012d0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret