Function at 0x405980
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x4354ac
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xac
mov eax, dword [0x451114]
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov dword [esp + 0x38], eax
lea ecx, [esp + 0x3c]
xor edi, edi
push str.SOFTWARELoaderModuleUpgradeSerialPageDLParams
push ecx
mov dword [esp + 0xcc], edi
call fcn.00416df9
add esp, 8
lea edx, [esp + 0x10]
lea eax, [esp + 0x3c]
lea esi, [ebp + 0x64]
push edx
push 0xf003f
push edi
push eax
push SysReAllocString
mov dword [esp + 0x24], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, edi
jne 0x4059fc
mov ecx, esi
call fcn.00403550
mov ecx, dword [esp + 0x10]
cmp eax, edi
mov dword [esi], ecx
je 0x405a34
lea edx, [esp + 0x30]
lea eax, [esp + 0x10]
push edx
push eax
push edi
push 0xf003f
push edi
push edi
lea ecx, [esp + 0x54]
push edi
push ecx
push SysReAllocString
mov dword [esp + 0x34], edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, edi
jne 0x405a34
mov ecx, esi
call fcn.00403550
mov edx, dword [esp + 0x10]
mov dword [esi], edx
mov edi, dword [ebp + 0x3f4]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push edi
call ebx
inc eax
push eax
mov eax, dword [esi]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 1
push 0
push str.AbsoluteAddress
push eax
call edi
mov eax, dword [ebp + 0x404]
push eax
mov dword [esp + 0x14], eax
call ebx
mov ecx, dword [esp + 0x10]
mov edx, dword [esi]
inc eax
push eax
push ecx
push 1
push 0
push str.AbsoluteAddress2
push edx
call edi
mov eax, dword [0x451114]
mov dword [esp + 0x1c], eax
lea edx, [esp + 0x1c]
lea ecx, [ebp + 0x3b4]
push edx
mov byte [esp + 0xc8], 1
call fcn.0042ae8c
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x14], eax
call ebx
mov ecx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x14]
push eax
push 1
push 0
push str.AppFileName
push ecx
call edi
lea edx, [esp + 0x1c]
lea ecx, [ebp + 0x288]
push edx
mov dword [esp + 0x34], ecx
call fcn.0042ae8c
mov eax, dword [esp + 0x1c]
push eax
mov dword [esp + 0x14], eax
call ebx
mov ecx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x14]
push eax
push 1
push 0
push str.AppFileName2
push ecx
call edi
mov ecx, dword [esi]
mov edx, dword [ebp + 0x3fc]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.FullChipErase
push ecx
mov dword [esp + 0x28], edx
call edi
mov edx, dword [ebp + 0x418]
mov ecx, dword [esi]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.JudgeFileName
push ecx
mov dword [esp + 0x28], edx
call edi
mov ecx, dword [esi]
mov edx, dword [ebp + 0x41c]
lea eax, [esp + 0x10]
push 4
push eax
push 4
push 0
push str.WriteAllFlash
push ecx
mov dword [esp + 0x28], edx
call edi
mov ecx, dword [esi]
mov edx, dword [ebp + 0x68]
lea eax, [esp + 0x34]
push 4
push eax
push 4
push 0
push str.FileCount
push ecx
mov dword [esp + 0x4c], edx
call edi
mov eax, dword [0x451114]
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov edx, dword [ebp + 0x3d0]
push 0
push 0
push 0x146
push edx
mov byte [esp + 0xd4], 3
mov dword [esp + 0x28], 0
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 8
mov dword [esp + 0x24], eax
jle 0x405baf
lea ecx, [eax - 8]
mov dword [esp + 0x18], ecx
jmp 0x405bb3
mov ecx, dword [esp + 0x18]
cmp ecx, eax
mov dword [esp + 0x10], ecx
jge 0x405c2b
jmp 0x405bc1
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x10]
sub eax, ecx
lea ecx, [esp + 0x14]
inc eax
push eax
push str.Download1File_d
push ecx
call fcn.00426b2a
mov eax, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x20]
lea ecx, [ebp + 0x3b4]
push edx
push eax
call fcn.00430c11
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], eax
call ebx
mov edx, dword [esp + 0x2c]
mov ecx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x2c]
push edx
push 1
push 0
push eax
push ecx
call edi
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x405bbd
mov eax, ecx
cmp eax, 8
jge 0x405c75
inc eax
lea edx, [esp + 0x14]
push eax
push str.Download1File_d
push edx
mov dword [esp + 0x38], eax
call fcn.00426b2a
mov eax, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x28], eax
push 0x455208
call ebx
mov ecx, dword [esp + 0x28]
mov edx, dword [esi]
inc eax
push eax
push 0x455208
push 1
push 0
push ecx
push edx
call edi
mov eax, dword [esp + 0x2c]
cmp eax, 8
jl 0x405c30
mov eax, dword [ebp + 0x2a4]
push 0
push 0
push 0x146
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, 8
mov dword [esp + 0x24], eax
jle 0x405c9d
lea ecx, [eax - 8]
mov dword [esp + 0x18], ecx
jmp 0x405ca1
mov ecx, dword [esp + 0x18]
cmp ecx, eax
mov ebp, ecx
jge 0x405d05
jmp 0x405cad
mov ecx, dword [esp + 0x18]
mov edx, ebp
lea eax, [esp + 0x14]
sub edx, ecx
inc edx
push edx
push str.Download2File_d
push eax
call fcn.00426b2a
add esp, 0xc
lea ecx, [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x34]
push ebp
call fcn.00430c11
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push eax
mov dword [esp + 0x30], edx
mov dword [esp + 0x2c], eax
call ebx
mov ecx, dword [esp + 0x2c]
mov edx, dword [esi]
inc eax
push eax
mov eax, dword [esp + 0x2c]
push eax
push 1
push 0
push ecx
push edx
call edi
mov eax, dword [esp + 0x24]
inc ebp
cmp ebp, eax
jl 0x405ca9
cmp eax, 8
jge 0x405d4b
lea ebp, [eax + 1]
lea eax, [esp + 0x14]
push ebp
push str.Download2File_d
push eax
call fcn.00426b2a
mov ecx, dword [esp + 0x20]
add esp, 0xc
mov dword [esp + 0x30], ecx
push 0x455208
call ebx
mov edx, dword [esp + 0x30]
inc eax
push eax
mov eax, dword [esi]
push 0x455208
push 1
push 0
push edx
push eax
call edi
mov eax, ebp
cmp eax, 8
jl 0x405d0a
mov eax, dword [esi]
test eax, eax
je 0x405d5e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esi], 0
lea ecx, [esp + 0x20]
mov byte [esp + 0xc4], 2
call fcn.0042830e
lea ecx, [esp + 0x14]
mov byte [esp + 0xc4], 1
call fcn.0042830e
lea ecx, [esp + 0x1c]
mov byte [esp + 0xc4], 0
call fcn.0042830e
lea ecx, [esp + 0x38]
mov dword [esp + 0xc4], 0xffffffff
call fcn.0042830e
mov ecx, dword [esp + 0xbc]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0xb8
ret