Function at 0x403830
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4079f7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x32c
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x364]
mov ebp, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push eax
push 0x40c484
push str.iADDFindPatch::Entering
push str.Software_Update_Wizard
mov dword [esp + 0x354], 3
call ebp
mov al, byte [esp + 0x368]
test al, al
je 0x40395b
mov esi, dword [esp + 0x350]
push str.Improved_PCL6_driver_for_faster_printing.
lea ecx, [esi + 0x10]
mov dword [esi], 0x18
mov dword [esi + 4], 7
call fcn.0040703e
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString
mov bl, 4
push 0x104
lea ecx, [esp + 0x18]
mov byte [esp + 0x348], bl
call sub.MFC42.DLL_CString::GetBuffer
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 0xffffffffffffffff
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov eax, dword [esp + 0x14]
mov ecx, dword [eax - 8]
cmp byte [ecx + eax - 1], 0x5c
je 0x4038fc
push 0x40c43c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x14]
push str.test.msp
lea edx, [esp + 0x24]
push ecx
push edx
call sub.MFC42.DLL_operator
push eax
lea ecx, [esi + 0x18]
mov byte [esp + 0x348], 5
call fcn.00406fe4
lea ecx, [esp + 0x20]
mov byte [esp + 0x344], bl
call fcn.00406f5a
mov eax, dword [esp + 0x364]
push eax
push 0x40c484
push str.iADDFindPath::Skipping_iADD
push str.Software_Update_Wizard
call ebp
mov byte [esp + 0x344], 3
lea ecx, [esp + 0x14]
jmp 0x4040d2
lea ecx, [esp + 0x10]
mov dword [0x40cccc], 0xc
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call sub.MFC42.DLL_CString::CString
push 0
push 0
push 0
push 0
mov byte [esp + 0x354], 7
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push str.WU_Wizard_v1.0
mov dword [0x40ccc8], eax
call dword [sym.imp.hpzjia.dll__setRequestorID_4]
push 0x40ccb8
mov ecx, 0x40ccc0
call fcn.0040703e
mov ecx, dword [esp + 0x364]
mov edx, dword [esp + 0x354]
push ecx
push edx
push str.iADDFindPatch::ProxyID
push str.Software_Update_Wizard
call ebp
mov eax, dword [esp + 0x364]
mov ecx, dword [esp + 0x358]
push eax
push ecx
push str.iADDFindPatch::ProxyPassword
push str.Software_Update_Wizard
call ebp
mov edx, dword [esp + 0x354]
lea ecx, [esp + 0x354]
mov eax, dword [edx - 8]
push eax
call sub.MFC42.DLL_CString::GetBuffer
or ebx, 0xffffffff
mov edi, eax
mov ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x134]
mov eax, ecx
mov esi, edi
mov edi, edx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x358]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [esp + 0x358]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x358]
push eax
call sub.MFC42.DLL_CString::GetBuffer
mov edi, eax
mov ecx, ebx
xor eax, eax
lea edx, [esp + 0x238]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x35c]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov ecx, dword [esp + 0x364]
lea edx, [esp + 0x134]
push ecx
push edx
push str.iADDFindPatch::id
push str.Software_Update_Wizard
call ebp
mov eax, dword [esp + 0x364]
lea ecx, [esp + 0x238]
push eax
push ecx
push str.iADDFindPatch::pw
push str.Software_Update_Wizard
call ebp
mov ecx, dword [esp + 0x354]
mov edx, dword [esp + 0x358]
push 0x3c
push 3
mov esi, dword [ecx - 8]
mov eax, dword [edx - 8]
mov ecx, dword [esp + 0x364]
mov edx, dword [esp + 0x354]
push 0x40ccc8
push 0x404140
mov edi, dword [edx - 8]
push ecx
push eax
lea ecx, [esp + 0x370]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push esi
lea ecx, [esp + 0x370]
call sub.MFC42.DLL_CString::GetBuffer
push eax
push edi
lea ecx, [esp + 0x36c]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.hpzjia.dll__getPatchList_32]
push ebx
lea ecx, [esp + 0x350]
mov dword [0x40cccc], eax
call sub.MFC42.DLL_CString::ReleaseBuffer
push ebx
lea ecx, [esp + 0x358]
call sub.MFC42.DLL_CString::ReleaseBuffer
push ebx
lea ecx, [esp + 0x35c]
call sub.MFC42.DLL_CString::ReleaseBuffer
mov eax, dword [0x40cccc]
mov edi, 1
cmp eax, edi
jne 0x403bec
mov edx, dword [esp + 0x364]
push edx
push str.No_internet_connection
push str.iADDFindPatch::ERROR
push str.Software_Update_Wizard
call ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call fcn.00406f5a
lea ecx, [esp + 0x10]
mov byte [esp + 0x344], 3
call fcn.00406f5a
lea ecx, [esp + 0x34c]
mov byte [esp + 0x344], 2
call fcn.00406f5a
lea ecx, [esp + 0x354]
mov byte [esp + 0x344], 1
call fcn.00406f5a
lea ecx, [esp + 0x358]
mov byte [esp + 0x344], 0
call fcn.00406f5a
lea ecx, [esp + 0x364]
mov dword [esp + 0x344], ebx
call fcn.00406f5a
mov eax, edi
jmp 0x403f1b
mov eax, dword [0x40ccc8]
push 0
push 0x493e0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObjectEx]
test eax, eax
je 0x403c1c
cmp eax, 0x102
jne 0x403c1c
mov ecx, dword [esp + 0x364]
push ecx
push str.Wait_timeout
jmp 0x403cf8
mov edx, dword [0x40ccc8]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x40cccc]
cmp eax, 2
jne 0x403c42
mov eax, dword [esp + 0x364]
push eax
push str.No_matching_drivers
jmp 0x403c58
cmp eax, 9
jne 0x403ce2
mov ecx, dword [esp + 0x364]
push ecx
push str.Proxy_Password_needed
push str.iADDFindPatch::ERROR
push str.Software_Update_Wizard
call ebp
mov esi, dword [0x40cccc]
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call fcn.00406f5a
lea ecx, [esp + 0x10]
mov byte [esp + 0x344], 3
call fcn.00406f5a
lea ecx, [esp + 0x34c]
mov byte [esp + 0x344], 2
call fcn.00406f5a
lea ecx, [esp + 0x354]
mov byte [esp + 0x344], 1
call fcn.00406f5a
lea ecx, [esp + 0x358]
mov byte [esp + 0x344], 0
call fcn.00406f5a
lea ecx, [esp + 0x364]
mov dword [esp + 0x344], ebx
call fcn.00406f5a
mov eax, esi
jmp 0x403f1b
test eax, eax
je 0x403d7f
mov edx, dword [esp + 0x364]
mov eax, dword [0x40ccc0]
push edx
push eax
push str.iADDFindPatch::ERROR
push str.Software_Update_Wizard
call ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call fcn.00406f5a
lea ecx, [esp + 0x10]
mov byte [esp + 0x344], 3
call fcn.00406f5a
lea ecx, [esp + 0x34c]
mov byte [esp + 0x344], 2
call fcn.00406f5a
lea ecx, [esp + 0x354]
mov byte [esp + 0x344], 1
call fcn.00406f5a
lea ecx, [esp + 0x358]
mov byte [esp + 0x344], 0
call fcn.00406f5a
lea ecx, [esp + 0x364]
mov dword [esp + 0x344], ebx
call fcn.00406f5a
mov eax, 0xc
jmp 0x403f1b
lea ecx, [esp + 0x24]
push 0xa
push ecx
push 0
call dword [sym.imp.MSVCRT.dll__itoa]
mov edx, dword [esp + 0x370]
add esp, 0xc
lea eax, [esp + 0x24]
push edx
push eax
push str.iADDFindPatch::Number_of_Lists
push str.Software_Update_Wizard
call ebp
mov dword [esp + 0x14], edi
push edi
call dword [sym.imp.hpzjia.dll__setPatchListIndex_4]
call dword [sym.imp.hpzjia.dll__getPatchCount_0]
lea ecx, [esp + 0x24]
mov esi, eax
push 0xa
push ecx
push esi
call dword [sym.imp.MSVCRT.dll__itoa]
mov edx, dword [esp + 0x370]
add esp, 0xc
lea eax, [esp + 0x24]
push edx
push eax
push str.iADDFindPatch::Number_of_Patches
push str.Software_Update_Wizard
call ebp
mov ebx, 1
inc esi
cmp esi, ebx
jle 0x403e7a
push ebx
call dword [sym.imp.hpzjia.dll__setPatchIndex_4]
lea ecx, [esp + 0x30]
lea edx, [esp + 0x34]
push ecx
push 0x100
push edx
call dword [sym.imp.hpzjia.dll__getGuid_12]
test eax, eax
jne 0x403e71
lea eax, [esp + 0x34]
lea ecx, [esp + 0x10]
push eax
call fcn.0040703e
mov ecx, dword [esp + 0x10]
cmp byte [ecx], 0x7b
je 0x403e56
push 0x40c2f0
lea ecx, [esp + 0x14]
call fcn.0040703e
lea edx, [esp + 0x34]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::operator
push 0x40c2ec
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x360]
push 0
push eax
call sub.MFC42.DLL_CStringList::Find
test eax, eax
je 0x403f34
inc ebx
cmp ebx, esi
jl 0x403df5
inc edi
cmp edi, 2
mov dword [esp + 0x14], edi
jl 0x403dae
mov eax, dword [esp + 0x364]
push eax
push 0x40c484
push str.iADDFindPatch::No_new_patches_found
push str.Software_Update_Wizard
call ebp
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call fcn.00406f5a
lea ecx, [esp + 0x10]
mov byte [esp + 0x344], 3
call fcn.00406f5a
lea ecx, [esp + 0x34c]
mov byte [esp + 0x344], 2
call fcn.00406f5a
lea ecx, [esp + 0x354]
mov byte [esp + 0x344], 1
call fcn.00406f5a
lea ecx, [esp + 0x358]
mov byte [esp + 0x344], 0
call fcn.00406f5a
lea ecx, [esp + 0x364]
mov dword [esp + 0x344], 0xffffffff
call fcn.00406f5a
mov eax, 2
mov ecx, dword [esp + 0x33c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x338
ret
mov esi, dword [esp + 0x350]
lea ecx, [esp + 0x10]
push ecx
lea edi, [esi + 0x14]
mov ecx, edi
call fcn.00406fe4
mov edx, dword [esp + 0x364]
mov edi, dword [edi]
push edx
push edi
push str.iADDFindPatch::Founda_new_patch
push str.Software_Update_Wizard
call ebp
lea eax, [esp + 0x30]
lea ecx, [esp + 0x34]
push eax
push 0x100
push ecx
call dword [sym.imp.hpzjia.dll__getFile_12]
test eax, eax
jne 0x403f87
lea edx, [esp + 0x34]
lea ecx, [esi + 0x18]
push edx
call fcn.0040703e
call dword [sym.imp.hpzjia.dll__getPatchDownloadTime_0]
mov dword [esi + 4], eax
call dword [sym.imp.hpzjia.dll__getPatchDownloadSize_0]
cdq
and edx, 0x3ff
lea ecx, [esp + 0x1c]
add eax, edx
mov edi, 0x200
sar eax, 0xa
mov dword [esi], eax
call sub.MFC42.DLL_CString::CString
mov byte [esp + 0x344], 8
lea eax, [esp + 0x30]
add edi, 0x100
push eax
push edi
push edi
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::GetBuffer
push eax
call dword [sym.imp.hpzjia.dll__getImprovement_12]
push 0xffffffffffffffff
lea ecx, [esp + 0x20]
mov dword [esp + 0x24], eax
call sub.MFC42.DLL_CString::ReleaseBuffer
cmp dword [esp + 0x20], 5
je 0x403fba
lea ecx, [esp + 0x1c]
lea edi, [esi + 0x10]
push ecx
mov ecx, edi
call fcn.00406fe4
mov ecx, dword [esp + 0x364]
mov eax, dword [esi + 0x18]
mov edx, dword [esp + 0x14]
push ecx
push eax
push str.iADDFindPatch::Found_a_new_patch
push str.Software_Update_Wizard
mov dword [esi + 8], ebx
mov dword [esi + 0xc], edx
call ebp
mov edx, dword [esp + 0x364]
mov eax, dword [esi + 0x14]
push edx
push eax
push str.iADDFindPatch::PatchGUID
push str.Software_Update_Wizard
call ebp
mov ecx, dword [esi]
mov ebx, dword [sym.imp.MSVCRT.dll__itoa]
lea eax, [esp + 0x24]
push 0xa
push eax
push ecx
call ebx
mov edx, dword [esp + 0x370]
add esp, 0xc
lea eax, [esp + 0x24]
push edx
push eax
push str.iADDFindPatch::Size
push str.Software_Update_Wizard
call ebp
mov edx, dword [esi + 4]
lea ecx, [esp + 0x24]
push 0xa
push ecx
push edx
call ebx
mov eax, dword [esp + 0x370]
add esp, 0xc
lea ecx, [esp + 0x24]
push eax
push ecx
push str.iADDFindPatch::DownloadTime
push str.Software_Update_Wizard
call ebp
mov edx, dword [esp + 0x364]
mov edi, dword [edi]
push edx
push edi
push str.iADDFindPatch::Description
push str.Software_Update_Wizard
call ebp
lea ecx, [esp + 0x1c]
mov byte [esp + 0x344], 7
call fcn.00406f5a
lea ecx, [esp + 0x18]
mov byte [esp + 0x344], 6
call fcn.00406f5a
mov byte [esp + 0x344], 3
lea ecx, [esp + 0x10]
call fcn.00406f5a
lea ecx, [esp + 0x34c]
mov byte [esp + 0x344], 2
call fcn.00406f5a
lea ecx, [esp + 0x354]
mov byte [esp + 0x344], 1
call fcn.00406f5a
lea ecx, [esp + 0x358]
mov byte [esp + 0x344], 0
call fcn.00406f5a
lea ecx, [esp + 0x364]
mov dword [esp + 0x344], 0xffffffff
call fcn.00406f5a
xor eax, eax
jmp 0x403f1b