Function at 0x40e290
Capabilities:
Get common file path

Disassembly:
sub esp, 0x14
mov ecx, dword [0x42a8f8]
mov edx, dword [0x42a450]
push ebx
xor ebx, ebx
push esi
push edi
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], ebx
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40e2b0
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 0x1a]
test ah, 1
je 0x40e31b
mov ecx, dword [0x42a914]
mov edx, dword [0x42a450]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40e2d2
mov eax, dword [0x42a450]
push 0x5c
push eax
call fcn.00419c00
mov esi, eax
add esp, 8
test esi, esi
je 0x40e2f5
inc esi
jmp 0x40e2fb
mov esi, dword [0x42a450]
push 0
push edi
call fcn.00403e50
add esp, 8
mov edx, esi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x40e308
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x14
ret
push ebp
mov ebx, 1
push 0
push edi
mov dword [esp + 0x18], ebx
call fcn.00403e50
mov esi, eax
push 0x5c
push esi
call fcn.00419c00
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x40e343
inc ebp
jmp 0x40e345
mov ebp, esi
mov eax, dword [edi + 0x22]
cmp eax, 0xa
ja case.0x40e351.4
jmp dword [eax*4 + 0x40e558]
mov ecx, dword [0x42a450]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.0x40e351.4
mov edx, dword [0x42a450]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp case.0x40e351.4
push 9
push edi
call fcn.00403e50
mov edx, dword [0x42a450]
add esp, 8
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x40e397
mov eax, dword [0x42a450]
push 0x104
push eax
push eax
call fcn.0040cc50
add esp, 0xc
jmp case.0x40e351.4
mov eax, dword [0x42a450]
push 0x14
push eax
call fcn.00401030
add esp, 8
mov dword [esp + 0x14], ebx
jmp case.0x40e351.4
mov ecx, dword [0x42a450]
push 0x10
push ecx
call fcn.00401030
add esp, 8
jmp case.0x40e351.4
mov edx, dword [0x42a450]
push 0x19
push edx
call fcn.00401030
add esp, 8
jmp case.0x40e351.4
mov eax, dword [0x42a450]
push 5
push eax
jmp 0x40e412
mov ecx, dword [0x42a450]
push 0x1a
push ecx
call fcn.00401030
add esp, 8
mov dword [esp + 0x10], 0
jmp case.0x40e351.4
push ebx
push 0x30c
call fcn.00419e02
mov esi, eax
add esp, 8
test esi, esi
lea ebx, [esi + 0x208]
jne 0x40e458
mov edx, dword [0x42a450]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40e4db
mov eax, dword [0x42a450]
push eax
call fcn.004020b0
add esp, 4
mov edi, 0x104
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea ecx, [esp + 0x1c]
lea edx, [esp + 0x20]
push ecx
mov ecx, dword [0x42a450]
push esi
lea eax, [esi + 0x104]
push edx
push eax
push ecx
push ebx
push ebp
push 1
mov dword [esp + 0x3c], edi
mov dword [esp + 0x40], edi
call sub.VERSION.dll_VerFindFileA
shr eax, 1
and eax, 1
mov dword [esp + 0x18], eax
jne 0x40e4b0
mov dword [esp + 0x14], 1
mov al, byte [esi]
mov edx, dword [0x42a450]
test al, al
je 0x40e4ca
mov ecx, esi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40e4be
jmp 0x40e4d2
push edi
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
call fcn.00419eb3
add esp, 4
mov edi, dword [esp + 0x28]
mov eax, dword [0x42a450]
push eax
call fcn.00402070
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
je 0x40e4f9
mov edi, ebp
jmp 0x40e506
push 0
push edi
call fcn.00403e50
add esp, 8
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
pop ebp
mov esi, edi
mov edi, dword [0x42a450]
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 + 0x10]
mov ecx, edx
and ecx, 3
test eax, eax
rep movsb byte es:[edi], byte [esi]
je 0x40e54d
mov eax, dword [0x42a450]
push eax
call fcn.00401330
add esp, 4
pop edi
pop esi
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebx
add esp, 0x14
ret