Function at 0x40f290
Capabilities:
Get common file path

Disassembly:
sub esp, 0x14
mov ecx, dword [0x42bc20]
mov edx, dword [0x42b774]
push ebx
push ebp
xor ebx, ebx
xor ebp, ebp
push esi
push edi
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebp
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40f2af
mov edi, dword [esp + 0x28]
mov eax, dword [edi + 0x1a]
test ah, 1
je 0x40f31a
mov ecx, dword [0x42bc3c]
mov edx, dword [0x42b774]
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40f2d1
mov eax, dword [0x42b774]
push 0x5c
push eax
call fcn.0041aff0
mov esi, eax
add esp, 8
cmp esi, ebx
je 0x40f2f4
inc esi
jmp 0x40f2fa
mov esi, dword [0x42b774]
push ebx
push edi
call fcn.00404190
add esp, 8
mov edx, esi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x40f306
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
push ebx
push edi
mov dword [esp + 0x18], 1
call fcn.00404190
mov esi, eax
push 0x5c
push esi
call fcn.0041aff0
mov ebp, eax
add esp, 0x10
cmp ebp, ebx
je 0x40f33f
inc ebp
jmp 0x40f341
mov ebp, esi
mov eax, dword [edi + 0x22]
cmp eax, 0xa
ja case.0x40f34d.4
jmp dword [eax*4 + 0x40f578]
mov ecx, dword [0x42b774]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.0x40f34d.4
mov edx, dword [0x42b774]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
jmp case.0x40f34d.4
push 9
push edi
call fcn.00404190
mov edx, dword [0x42b774]
add esp, 8
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x40f393
mov eax, dword [0x42b774]
push 0x104
push eax
push eax
call fcn.0040d6a0
mov al, byte [edi + 0x1e]
add esp, 0xc
test al, 0x10
je case.0x40f34d.4
mov dword [esp + 0x10], ebx
jmp case.0x40f34d.4
mov eax, dword [0x42b774]
push 0x14
push eax
call fcn.00401030
add esp, 8
mov dword [esp + 0x14], 1
jmp case.0x40f34d.4
mov ecx, dword [0x42b774]
push 0x10
push ecx
call fcn.00401030
add esp, 8
jmp case.0x40f34d.4
mov edx, dword [0x42b774]
push 0x19
push edx
call fcn.00401030
add esp, 8
jmp case.0x40f34d.4
mov eax, dword [0x42b774]
push 5
push eax
call fcn.00401030
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40f34d.4
mov ecx, dword [0x42b774]
push 0x1a
push ecx
call fcn.00401030
add esp, 8
mov dword [esp + 0x10], ebx
jmp case.0x40f34d.4
push 1
push 0x30c
call fcn.0041b1f2
mov esi, eax
add esp, 8
test esi, esi
lea ebx, [esi + 0x208]
jne 0x40f473
mov edx, dword [0x42b774]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp 0x40f4f6
mov eax, dword [0x42b774]
push eax
call fcn.004020f0
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 [0x42b774]
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 0x40f4cb
mov dword [esp + 0x14], 1
mov al, byte [esi]
mov edx, dword [0x42b774]
test al, al
je 0x40f4e5
mov ecx, esi
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x40f4d9
jmp 0x40f4ed
push edi
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
call fcn.0041b2a3
add esp, 4
mov edi, dword [esp + 0x28]
xor ebx, ebx
mov eax, dword [0x42b774]
push eax
call fcn.004020b0
mov eax, dword [esp + 0x14]
add esp, 4
cmp eax, ebx
je 0x40f516
mov edi, ebp
jmp 0x40f522
push ebx
push edi
call fcn.00404190
add esp, 8
mov edi, eax
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x42b774]
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
cmp eax, ebx
rep movsb byte es:[edi], byte [esi]
je 0x40f569
mov eax, dword [0x42b774]
push eax
call fcn.00401370
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret