Function at 0x4d0a50
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x5365f0]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov ebx, edx
mov esi, ecx
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x438], edi
test edi, edi
je 0x4d0abd
mov ecx, ebx
call fcn.004ca5b0
lea eax, [ebp - 0x420]
push eax
push 0xf003f
push 0
push edi
push SysStringLen
mov dword [ebp - 0x420], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea ecx, [ebx + 0x14]
test eax, eax
je 0x4d0ad2
push eax
push str.In_SetMsOfficeProtection__._Failed_to_open_HKCU_registry_key._Error:__d
call fcn.004015d0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004d5564
mov esp, ebp
pop ebp
ret 4
push str.In_SetMsOfficeProtection__._Before_taking_registry_backup.
call fcn.004015d0
mov edi, dword [ebp - 0x420]
add esp, 4
push esi
mov edx, ebx
call fcn.004d0d10
push str.In_SetMsOfficeProtection__._After_taking_registry_backup.
lea ecx, [ebx + 0x14]
mov dword [ebp - 0x430], eax
call fcn.004015d0
add esp, 4
test esi, esi
je 0x4d0cd9
mov ecx, dword [ebx + 4]
sub ecx, dword [ebx]
sar ecx, 2
push ecx
push str.In_SetMsOfficeProtection__._Going_to_apply_new_registry_settings._m_ListMsOfficeReg_size_is__d
lea ecx, [ebx + 0x14]
call fcn.004015d0
mov edi, dword [ebx]
add esp, 8
mov dword [ebp - 0x42c], edi
cmp edi, dword [ebx + 4]
je 0x4d0cd9
mov esi, dword [edi]
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x41a]
push eax
mov dword [ebp - 0x424], 0
mov word [ebp - 0x41c], dx
call fcn.004da450
mov ecx, dword [esi + 0x70]
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x212]
push eax
mov dword [ebp - 0x434], ecx
mov word [ebp - 0x214], dx
call fcn.004da450
add esp, 0xc
cmp dword [esi + 0x14], 8
jb 0x4d0b90
mov eax, dword [esi]
jmp 0x4d0b92
mov eax, esi
mov edx, dword [ebp - 0x420]
push 0
lea ecx, [ebp - 0x424]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4d0c95
cmp dword [esi + 0x4c], 8
jb 0x4d0bc9
mov eax, dword [esi + 0x38]
jmp 0x4d0bcc
lea eax, [esi + 0x38]
push eax
lea eax, [ebp - 0x214]
push 0x104
push eax
call fcn.004d72e3
lea edi, [esi + 0x54]
add esp, 0xc
cmp dword [edi + 0x14], 8
jb 0x4d0bee
mov eax, dword [edi]
jmp 0x4d0bf0
mov eax, edi
push eax
lea ecx, [ebp - 0x41c]
push 0x104
push ecx
call fcn.004d72e3
mov eax, dword [esi + 0x64]
mov ecx, dword [ebp - 0x434]
add esp, 0xc
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x41c]
push eax
mov eax, dword [ebp - 0x424]
push ecx
push 0
lea edx, [ebp - 0x214]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4d0c4d
mov ebx, dword [ebp - 0x428]
mov edi, dword [ebp - 0x42c]
mov dword [ebp - 0x430], 1
jmp 0x4d0cb6
mov edx, 8
cmp dword [edi + 0x14], edx
jb 0x4d0c59
mov edi, dword [edi]
cmp dword [esi + 0x4c], edx
jb 0x4d0c63
mov ecx, dword [esi + 0x38]
jmp 0x4d0c66
lea ecx, [esi + 0x38]
cmp dword [esi + 0x14], edx
jb 0x4d0c6d
mov esi, dword [esi]
push edi
push ecx
mov ecx, dword [ebp - 0x428]
push esi
push eax
push str.In_SetMsOfficeProtection__._Failed_to_set_with_error:__d._Regkey:__s__Value:__s__Data:__s
add ecx, 0x14
call fcn.004015d0
mov ebx, dword [ebp - 0x428]
mov edi, dword [ebp - 0x42c]
add esp, 0x14
jmp 0x4d0cb6
cmp dword [esi + 0x14], 8
jb 0x4d0c9d
mov esi, dword [esi]
mov ecx, dword [ebp - 0x438]
push eax
push ecx
push esi
push str.In_SetMsOfficeProtection__._Failed_to_open_Regkey:__s_under__s._Error:__d
lea ecx, [ebx + 0x14]
call fcn.004015d0
add esp, 0x10
mov eax, dword [ebp - 0x424]
test eax, eax
je 0x4d0cc7
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add edi, 4
mov dword [ebp - 0x42c], edi
cmp edi, dword [ebx + 4]
jne 0x4d0b35
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x4d0cea
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x430]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004d5564
mov esp, ebp
pop ebp
ret 4