Function at 0x405650
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8bc
mov eax, dword [0x439004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
cmp dword [edi + 0x1c0], 8
lea eax, [edi + 0x1ac]
jb 0x405679
mov eax, dword [eax]
push eax
lea eax, [ebp - 0x260]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x470]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
xor eax, eax
cmp byte [edi + 0x241], al
mov ebx, 2
push 0x104
cmove ebx, eax
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push eax
push 0xa2
push 0
call esi
test eax, eax
jne 0x4056ef
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
mov ecx, edi
push eax
call fcn.004112e0
lea eax, [ebp - 0x8b8]
mov dword [ebp - 0x8b8], 0
push eax
push 0
push ebx
push 3
push 0xc0000000
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.WIMGAPI.DLL_WIMCreateFile]
mov ebx, eax
test ebx, ebx
jne 0x405784
push 0x104
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push eax
push 0xa3
push ebx
call esi
test eax, eax
jne 0x405763
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
mov ecx, edi
push eax
call fcn.004112e0
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414df1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x470]
push eax
push ebx
call dword [sym.imp.WIMGAPI.DLL_WIMSetTemporaryPath]
test eax, eax
jne 0x4057f7
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push 0x104
push eax
push 0xa4
push 0
call esi
test eax, eax
jne 0x4057cf
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
push eax
mov ecx, edi
call fcn.004112e0
push ebx
call dword [sym.imp.WIMGAPI.DLL_WIMCloseHandle]
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00414df1
mov esp, ebp
pop ebp
ret
push 0x230
lea eax, [ebp - 0x8b0]
push 0
push eax
call fcn.004169b0
add esp, 0xc
lea eax, [ebp - 0x8b0]
push 0x230
push eax
push ebx
call dword [sym.imp.WIMGAPI.DLL_WIMGetAttributes]
test eax, eax
jne 0x405841
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push 0x104
push eax
push 0xa5
jmp 0x4057ae
mov eax, dword [edi + 0x1c4]
push eax
cmp dword [ebp - 0x698], eax
jae 0x405869
lea eax, [ebp - 0x680]
push 0xa6
push eax
call fcn.00411d30
add esp, 0xc
jmp 0x4057d5
push ebx
call dword [sym.imp.WIMGAPI.DLL_WIMLoadImage]
mov esi, eax
mov dword [ebp - 0x8b4], esi
test esi, esi
jne 0x40589b
push dword [edi + 0x1c4]
lea eax, [ebp - 0x680]
push 0xa7
push eax
call fcn.00411d30
add esp, 0xc
jmp 0x4057d5
cmp byte [edi + 0x240], 0
je 0x4058d3
push dword [edi + 0x1c4]
lea eax, [ebp - 0x680]
push 0xab
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
push dword [edi + 0x1c4]
push ebx
call dword [sym.imp.WIMGAPI.DLL_WIMSetBootImage]
cmp dword [edi + 0x238], 0
je 0x405928
cmp dword [edi + 0x23c], 8
lea esi, [edi + 0x228]
mov eax, esi
jb 0x4058ef
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x680]
push 0xaa
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
cmp dword [esi + 0x14], 8
jb 0x405914
mov esi, dword [esi]
push esi
mov esi, dword [ebp - 0x8b4]
mov ecx, edi
push str.FLAGS
push esi
call fcn.004074a0
cmp dword [edi + 0x220], 0
je 0x40597d
cmp dword [edi + 0x224], 8
lea esi, [edi + 0x210]
mov eax, esi
jb 0x405944
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x680]
push 0xa9
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
cmp dword [esi + 0x14], 8
jb 0x405969
mov esi, dword [esi]
push esi
mov esi, dword [ebp - 0x8b4]
mov ecx, edi
push str.DISPLAYDESCRIPTION
push esi
call fcn.004074a0
cmp dword [edi + 0x208], 0
je 0x4059d2
cmp dword [edi + 0x20c], 8
lea esi, [edi + 0x1f8]
mov eax, esi
jb 0x405999
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x680]
push 0xa8
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
cmp dword [esi + 0x14], 8
jb 0x4059be
mov esi, dword [esi]
push esi
mov esi, dword [ebp - 0x8b4]
mov ecx, edi
push str.DISPLAYNAME
push esi
call fcn.004074a0
cmp dword [edi + 0x1f0], 0
je 0x405a27
cmp dword [edi + 0x1f4], 8
lea esi, [edi + 0x1e0]
mov eax, esi
jb 0x4059ee
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x680]
push 0xa9
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
cmp dword [esi + 0x14], 8
jb 0x405a13
mov esi, dword [esi]
push esi
mov esi, dword [ebp - 0x8b4]
mov ecx, edi
push str.DESCRIPTION
push esi
call fcn.004074a0
cmp dword [edi + 0x1d8], 0
je 0x405a7c
cmp dword [edi + 0x1dc], 8
lea esi, [edi + 0x1c8]
mov eax, esi
jb 0x405a43
mov eax, dword [esi]
push eax
lea eax, [ebp - 0x680]
push 0xa8
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, edi
push eax
call fcn.004112e0
cmp dword [esi + 0x14], 8
jb 0x405a68
mov esi, dword [esi]
push esi
mov esi, dword [ebp - 0x8b4]
mov ecx, edi
push str.NAME
push esi
call fcn.004074a0
push 0x32
mov ecx, edi
call fcn.00411640
push 0x434b68
mov ecx, edi
call fcn.004112e0
cmp byte [edi + 0x241], 0
je 0x405ab2
push 0xac
lea ecx, [ebp - 0x680]
call fcn.00411cf0
push eax
mov ecx, edi
call fcn.004112e0
push esi
mov esi, dword [sym.imp.WIMGAPI.DLL_WIMCloseHandle]
call esi
push ebx
call esi
push 0x64
mov ecx, edi
call fcn.00411640
mov esi, dword [sym.imp.WINMM.dll_timeGetTime]
call esi
sub eax, dword [edi + 0x38]
cmp eax, 0x3e8
jb 0x405b02
lea eax, [ebp - 0x50]
push eax
call esi
sub eax, dword [edi + 0x38]
push eax
call fcn.00411550
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x680]
push 0xad
push eax
call fcn.00411d30
add esp, 0xc
jmp 0x405b12
push 0xae
lea ecx, [ebp - 0x680]
call fcn.00411cf0
push eax
mov ecx, edi
call fcn.004112e0
mov ecx, dword [ebp - 4]
mov al, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00414df1
mov esp, ebp
pop ebp
ret