Function at 0x404580
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8b4
mov eax, dword [0x439004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0x2ac], 8
lea eax, [esi + 0x298]
push edi
jb 0x4045a9
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 ebx, dword [sym.imp.USER32.dll_LoadStringW]
xor eax, eax
cmp byte [esi + 0x2b4], al
mov edi, 2
push 0x104
cmove edi, eax
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push eax
push 0xa2
push 0
call ebx
test eax, eax
jne 0x40461f
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
mov ecx, esi
push eax
call fcn.004112e0
lea eax, [ebp - 0x8b4]
mov dword [ebp - 0x8b4], 0
push eax
push 0
push edi
push 3
push 0xc0000000
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.WIMGAPI.DLL_WIMCreateFile]
mov edi, eax
test edi, edi
jne 0x4046b4
push 0x104
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push eax
push 0xa3
push edi
call ebx
test eax, eax
jne 0x404693
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
mov ecx, esi
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 edi
call dword [sym.imp.WIMGAPI.DLL_WIMSetTemporaryPath]
test eax, eax
jne 0x404727
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push 0x104
push eax
push 0xa4
push 0
call ebx
test eax, eax
jne 0x4046ff
push 0x435be4
lea eax, [ebp - 0x680]
push 0x104
push eax
call fcn.00418211
add esp, 0xc
lea eax, [ebp - 0x680]
push eax
mov ecx, esi
call fcn.004112e0
push edi
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 edi
call dword [sym.imp.WIMGAPI.DLL_WIMGetAttributes]
test eax, eax
jne 0x404771
mov word [ebp - 0x680], ax
lea eax, [ebp - 0x680]
push 0x104
push eax
push 0xa5
jmp 0x4046de
mov eax, dword [esi + 0x2b0]
cmp dword [ebp - 0x698], eax
push eax
lea eax, [ebp - 0x680]
jae 0x404799
push 0xa6
push eax
call fcn.00411d30
add esp, 0xc
jmp 0x404705
push 0xe1
push eax
call fcn.00411d30
add esp, 0xc
mov ecx, esi
push eax
call fcn.004112e0
push dword [esi + 0x2b0]
push edi
call dword [sym.imp.WIMGAPI.DLL_WIMDeleteImage]
test eax, eax
jne 0x4047df
push dword [esi + 0x2b0]
lea eax, [ebp - 0x680]
push 0xe0
push eax
call fcn.00411d30
add esp, 0xc
jmp 0x404705
push 0x32
mov ecx, esi
call fcn.00411640
push 0x434b68
mov ecx, esi
call fcn.004112e0
cmp byte [esi + 0x2b4], 0
je 0x404815
push 0xac
lea ecx, [ebp - 0x680]
call fcn.00411cf0
push eax
mov ecx, esi
call fcn.004112e0
push edi
call dword [sym.imp.WIMGAPI.DLL_WIMCloseHandle]
push 0x64
mov ecx, esi
call fcn.00411640
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
call edi
sub eax, dword [esi + 0x38]
cmp eax, 0x3e8
jb 0x404860
lea eax, [ebp - 0x50]
push eax
call edi
sub eax, dword [esi + 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 0x404870
push 0xae
lea ecx, [ebp - 0x680]
call fcn.00411cf0
push eax
mov ecx, esi
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