Function at 0x4041f0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x407a28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
mov eax, dword [esp + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push eax
push 0x40c484
push str.iADDDownload::Entering
push str.Software_Update_Wizard
mov dword [esp + 0x28], 0
call edi
mov al, byte [esp + 0x30]
test al, al
je 0x404270
mov ecx, dword [esp + 0x2c]
push ecx
push 0x40c484
push str.iADDDownload::Skipping_iADD
push str.Software_Update_Wizard
call edi
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], 0xffffffff
call fcn.00406f5a
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
lea ecx, [esp + 8]
mov dword [0x40cccc], 0xc
call sub.MFC42.DLL_CString::CString
push 0x104
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 1
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::ReleaseBuffer
lea edx, [esp + 8]
lea ecx, [esp + 0xc]
push edx
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [esp + 0x20]
mov byte [esp + 0x18], 2
push eax
call dword [sym.imp.hpzjia.dll__setPatchListIndex_4]
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.hpzjia.dll__setPatchIndex_4]
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edx, dword [esp + 8]
mov dword [0x40ccc8], eax
lea ecx, [esp + 8]
mov eax, dword [edx - 8]
push eax
call sub.MFC42.DLL_CString::GetBuffer
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
mov esi, eax
call sub.MFC42.DLL_CString::ReleaseBuffer
push 0
push 0x3c
push 3
push 1
push 0x40ccc8
push 0x404440
push esi
call dword [sym.imp.hpzjia.dll__downloadPatch_28]
mov dword [0x40cccc], eax
mov eax, dword [0x40ccc8]
push 0
push 0x44aa200
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
je 0x40439c
cmp eax, 0x102
jne 0x40439c
mov ecx, dword [esp + 0x2c]
push ecx
push str.Wait_timeout
push str.iADDDownload::ERROR
push str.Software_Update_Wizard
call edi
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 1
call fcn.00406f5a
lea ecx, [esp + 8]
mov byte [esp + 0x18], 0
call fcn.00406f5a
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], 0xffffffff
call fcn.00406f5a
pop edi
mov eax, 0xc
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov eax, dword [0x40cccc]
test eax, eax
jne 0x4043d7
mov edx, dword [esp + 0x2c]
push edx
push str.Success
push str.iADDDownload::Returning
push str.Software_Update_Wizard
call edi
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0xc]
push esi
call sub.MFC42.DLL_CString::operator_1
lea eax, [esp + 0xc]
mov ecx, esi
push eax
call fcn.00406fe4
jmp 0x4043ed
mov ecx, dword [esp + 0x2c]
push ecx
push str.Failure
push str.iADDDownload::Returning
push str.Software_Update_Wizard
call edi
mov esi, dword [0x40cccc]
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 1
call fcn.00406f5a
lea ecx, [esp + 8]
mov byte [esp + 0x18], 0
call fcn.00406f5a
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], 0xffffffff
call fcn.00406f5a
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret