Function at 0x475850
Capabilities:
Create service
Persist via windows service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push rdi
push r14
lea rbp, [rsp - 0x210]
sub rsp, 0x310
mov rax, qword [0x004fb010]
xor rax, rsp
mov qword [rbp + 0x200], rax
mov rbx, rcx
xor esi, esi
mov qword [rbp - 0x30], rsi
mov qword [rbp - 0x20], rsi
mov qword [rbp - 0x18], 7
mov word [rbp - 0x30], si
xor r8d, r8d
lea r14, [0x004b993c]
mov rdx, r14
lea rcx, [rbp - 0x30]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
nop
mov r8d, 0x104
lea rdx, [rbp - 0x10]
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_libraryloader_l1_2_0.dll_GetModuleFileNameW]
test eax, eax
jne 0x475905
mov edx, 0x86
lea rcx, [0x004d26c0]
call fcn.004036d0
mov rbx, rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
lea rcx, str.C:Usersjk_kanDesktopGerritSWMgrAsusSoftwareManagerAsusSoftwareManagerGiftBoxServiceGiftBoxServiceServiceServiceInstaller.cpp
lea rdx, [rcx + rbx*2]
mov dword [rsp + 0x20], eax
lea r9, str.GetModuleFileName_failed_w_err_0x_08lx_n
lea ecx, [rsi + 4]
lea r8d, [rsi + 0x3e]
call fcn.0044a600
jmp 0x475c01
mov qword [rbp - 0x70], rsi
mov qword [rbp - 0x60], rsi
mov qword [rbp - 0x58], 7
mov word [rbp - 0x70], si
lea rax, [rbp - 0x10]
mov r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], 0
jne 0x475924
lea rdx, [rbp - 0x10]
lea rcx, [rbp - 0x70]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
nop
mov r9d, 1
lea r8, [0x004c0c30]
xor edx, edx
lea rcx, [rbp - 0x70]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::insert_unsigned_long_long_unsigned___int64___wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
mov qword [rsp + 0x70], rsi
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], rsi
movups xmm0, xmmword [rax]
movups xmmword [rsp + 0x70], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x80], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
mov r8d, 1
lea rdx, [0x004c0c30]
lea rcx, [rsp + 0x70]
call sym.AsusSoftwareManager.exe_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::append_wchar_t_const__const___ptr64__unsigned_long_long_unsigned___int64_____ptr64
movups xmm0, xmmword [rax]
movups xmmword [rbp - 0x50], xmm0
movups xmm1, xmmword [rax + 0x10]
movups xmmword [rbp - 0x40], xmm1
mov qword [rax + 0x10], rsi
mov qword [rax + 0x18], 7
mov word [rax], si
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea rcx, [rbp - 0x30]
call sym.AsusSoftwareManager.exe_private:_void___cdecl_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::_Move_assign_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______ptr64__struct_std::integral_constant_bool__1_____ptr64
mov rdx, qword [rbp - 0x38]
cmp rdx, 8
jb 0x475a0a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x50]
mov rax, rcx
cmp rdx, 0x1000
jb 0x475a04
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x475a04
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
nop
mov rdx, qword [rbp - 0x78]
cmp rdx, 8
jb 0x475a4e
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x475a49
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x475a49
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
mov qword [rbp - 0x80], rsi
mov qword [rbp - 0x78], 7
mov word [rsp + 0x70], si
mov rdx, qword [rbp - 0x58]
cmp rdx, 8
jb 0x475aa2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x70]
mov rax, rcx
cmp rdx, 0x1000
jb 0x475a9d
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x475a9d
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
xor edx, edx
xor ecx, ecx
lea r8d, [rdx + 3]
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_OpenSCManagerW]
mov rdi, rax
test rax, rax
jne 0x475af9
mov edx, 0x86
lea rcx, [0x004d26c0]
call fcn.004036d0
mov rbx, rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
lea rcx, str.C:Usersjk_kanDesktopGerritSWMgrAsusSoftwareManagerAsusSoftwareManagerGiftBoxServiceGiftBoxServiceServiceServiceInstaller.cpp
lea rdx, [rcx + rbx*2]
mov dword [rsp + 0x20], eax
lea r9, str.OpenSCManager_failed_w_err_0x_08lx_n
lea ecx, [rdi + 4]
lea r8d, [rdi + 0x49]
call fcn.0044a600
jmp 0x475c01
lea rax, [rbp - 0x30]
cmp qword [rbp - 0x18], 8
cmovae rax, qword [rbp - 0x30]
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x58], rsi
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], rsi
mov qword [rsp + 0x40], rsi
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 2
mov dword [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetDim
mov r9d, 4
lea r8, str.ASUSSoftwareManager
mov rdx, rbx
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CreateServiceW]
mov rsi, rax
mov edx, 1
mov rcx, rbx
call fcn.004762f0
test rsi, rsi
jne 0x475bac
mov edx, 0x86
lea rcx, [0x004d26c0]
call fcn.004036d0
mov rbx, rax
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
lea rcx, str.C:Usersjk_kanDesktopGerritSWMgrAsusSoftwareManagerAsusSoftwareManagerGiftBoxServiceGiftBoxServiceServiceServiceInstaller.cpp
lea rdx, [rcx + rbx*2]
mov dword [rsp + 0x20], eax
lea r9, str.CreateService_failed_w_err_0x_08lx_n
lea ecx, [rsi + 4]
lea r8d, [rsi + 0x62]
call fcn.0044a600
mov rcx, rdi
jmp 0x475bfa
lea rdx, [rbp - 0x10]
mov rcx, rbx
call fcn.00475f30
mov edx, 0x86
lea rcx, [0x004d26c0]
call fcn.004036d0
lea rcx, str.C:Usersjk_kanDesktopGerritSWMgrAsusSoftwareManagerAsusSoftwareManagerGiftBoxServiceGiftBoxServiceServiceServiceInstaller.cpp
lea rdx, [rcx + rax*2]
mov qword [rsp + 0x20], rbx
lea r9, str._s_is_installed._n
mov ecx, 4
lea r8d, [rcx + 0x63]
call fcn.0044a600
mov rcx, rdi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.api_ms_win_service_management_l1_1_0.dll_CloseServiceHandle]
nop
mov rdx, qword [rbp - 0x18]
cmp rdx, 8
jb 0x475c44
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x475c3f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x475c3f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.00479330
mov rcx, qword [rbp + 0x200]
xor rcx, rsp
call fcn.00479310
lea r11, [rsp + 0x310]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret