Function at 0x404870
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xda4
mov eax, dword [0x46c00c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x104
lea eax, [ebp - 0x390]
mov esi, edx
push eax
push 0
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov dword [ebp - 0xda0], eax
test esi, esi
je 0x4048ae
cmp word [esi], 0
jne 0x4048b4
lea esi, [ebp - 0x390]
push esi
push 0x45d72c
lea eax, [ebp - 0xd90]
push 0x800
push eax
call fcn.00404800
push edi
push str.discord__s
lea eax, [ebp - 0x88]
push 0x80
push eax
call fcn.00404800
push edi
push str.URL:Run_game__s_protocol
lea eax, [ebp - 0x188]
push 0x100
push eax
call fcn.00404800
lea eax, [ebp - 0x88]
mov dword [ebp - 0xd94], 0
push eax
push str.SoftwareClasses_s
lea eax, [ebp - 0x590]
push 0x200
push eax
call fcn.00404800
mov edi, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
lea eax, [ebp - 0xd9c]
add esp, 0x40
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
lea eax, [ebp - 0x590]
push eax
push 0x80000001
call edi
test eax, eax
je 0x40497b
push str.Error_creating_key_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.004047e0
add esp, 8
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0045a66e
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x188]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
inc eax
add eax, eax
push eax
lea eax, [ebp - 0x188]
push eax
push 1
push 0
push 0
push dword [ebp - 0xd9c]
call ebx
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
test eax, eax
jns 0x4049c6
push str.Error_writing_description_n
push 2
call esi
add esp, 4
push eax
call fcn.004047e0
add esp, 8
lea eax, [ebp - 0x188]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 2
lea eax, [ebp - 0xd94]
push eax
push 1
push 0
push str.URL_Protocol
push dword [ebp - 0xd9c]
call ebx
test eax, eax
jns 0x404a06
push str.Error_writing_description_n
push 2
call esi
add esp, 4
push eax
call fcn.004047e0
add esp, 8
mov eax, dword [ebp - 0xd9c]
lea ecx, [ebp - 0xd98]
push 0
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.DefaultIcon
push eax
mov dword [ebp - 0xda4], eax
mov dword [ebp - 0xd98], 0
call edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, eax
test ebx, ebx
jne 0x404a86
mov eax, dword [ebp - 0xda0]
lea eax, [eax*2 + 2]
push eax
lea eax, [ebp - 0x390]
push eax
push 1
push 0
push 0
push dword [ebp - 0xd98]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov eax, dword [ebp - 0xd98]
test eax, eax
je 0x404a84
cmp eax, dword [ebp - 0xda4]
je 0x404a84
push eax
call edi
test ebx, ebx
jns 0x404a9d
push str.Error_writing_icon_n
push 2
call esi
add esp, 4
push eax
call fcn.004047e0
add esp, 8
lea eax, [ebp - 0xd90]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0
lea ecx, [ebp - 0xd98]
mov dword [ebp - 0xd98], 0
push ecx
push 0
push 0xf003f
push 0
push 0
inc eax
push 0
mov dword [ebp - 0xda4], eax
mov eax, dword [ebp - 0xd9c]
push str.shellopencommand
push eax
mov dword [ebp - 0xda0], eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x404b28
mov eax, dword [ebp - 0xda4]
add eax, eax
push eax
lea eax, [ebp - 0xd90]
push eax
push 1
push ebx
push ebx
push dword [ebp - 0xd98]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov eax, dword [ebp - 0xd98]
test eax, eax
je 0x404b26
cmp eax, dword [ebp - 0xda0]
je 0x404b26
push eax
call edi
test ebx, ebx
jns 0x404b3f
push str.Error_writing_command_n
push 2
call esi
add esp, 4
push eax
call fcn.004047e0
add esp, 8
push dword [ebp - 0xd9c]
call edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0045a66e
mov esp, ebp
pop ebp
ret