Function at 0x401640
Capabilities:
Execute command

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x406055
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x40a040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ecx + 4]
mov dl, 1
mov esi, dword [ecx]
mov byte [ebp - 0x29], dl
mov dword [ebp - 0x44], eax
cmp esi, eax
je 0x40192f
nop
mov ecx, esi
call fcn.00401340
xorps xmm0, xmm0
test al, al
je 0x40175a
push 0x1e
push str.IP_Address_Already_Whitelist:
lea ecx, [ebp - 0x5c]
mov dword [ebp - 0x4c], 0
movups xmmword [ebp - 0x5c], xmm0
mov dword [ebp - 0x48], 0
call fcn.00404030
push 0xfffffffffffffff5
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
cmp dword [ebp - 0x48], 0xf
lea edx, [ebp - 0x5c]
push dword [ebp - 0x4c]
cmova edx, dword [ebp - 0x5c]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00404890
add esp, 4
push 7
push edi
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x48]
cmp ecx, 0xf
jbe 0x40172d
mov edx, dword [ebp - 0x5c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401723
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40194c
push ecx
push edx
call fcn.0040510d
add esp, 8
cmp dword [esi + 0x14], 0xf
mov edx, esi
jbe 0x401737
mov edx, dword [esi]
push dword [esi + 0x10]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
call fcn.00404890
add esp, 4
mov ecx, eax
push 0x403a00
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
jmp 0x401920
push 0x39
push str.netsh_advfirewall_firewall_add_rule_name_Allow_RDP_from
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0
call fcn.00404030
mov dword [ebp - 4], 1
mov edx, esi
cmp dword [esi + 0x14], 0xf
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x34], ecx
jbe 0x401792
mov edx, dword [esi]
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
sub eax, edi
mov dword [ebp - 0x30], edi
push ecx
push edx
cmp ecx, eax
ja 0x4017d0
cmp dword [ebp - 0x14], 0xf
lea eax, [edi + ecx]
mov dword [ebp - 0x18], eax
lea edi, [ebp - 0x28]
cmova edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
add eax, edi
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov ecx, dword [ebp - 0x30]
add eax, edi
mov byte [eax + ecx], 0
jmp 0x4017e0
mov byte [ebp - 0x38], 0
push dword [ebp - 0x38]
push ecx
lea ecx, [ebp - 0x28]
call fcn.004042d0
mov edx, dword [ebp - 0x14]
mov eax, edx
mov ecx, dword [ebp - 0x18]
sub eax, ecx
push 0x40
push str.__dirin_actionallow_protocolTCP_localport5103_5004_remoteip
cmp eax, 0x40
jb 0x401817
cmp edx, 0xf
lea edi, [ebp - 0x28]
lea eax, [ecx + 0x40]
cmova edi, dword [ebp - 0x28]
add edi, ecx
mov dword [ebp - 0x18], eax
push edi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [edi + 0x40], 0
jmp 0x401828
mov byte [ebp - 0x3c], 0
lea ecx, [ebp - 0x28]
push dword [ebp - 0x3c]
push 0x40
call fcn.004042d0
cmp dword [esi + 0x14], 0xf
mov edx, esi
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x34], ecx
jbe 0x401838
mov edx, dword [esi]
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
sub eax, edi
mov dword [ebp - 0x30], edi
push ecx
push edx
cmp ecx, eax
ja 0x401876
cmp dword [ebp - 0x14], 0xf
lea eax, [ecx + edi]
mov dword [ebp - 0x18], eax
lea edi, [ebp - 0x28]
cmova edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x30]
add eax, edi
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x34]
add esp, 0xc
mov ecx, dword [ebp - 0x30]
add eax, edi
mov byte [eax + ecx], 0
jmp 0x401886
mov byte [ebp - 0x40], 0
push dword [ebp - 0x40]
push ecx
lea ecx, [ebp - 0x28]
call fcn.004042d0
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
add esp, 4
test eax, eax
je 0x4018d7
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.Failed_to_add_firewall_rule_to_allow_RDP_from_IP_address:
call fcn.00403a30
cmp dword [esi + 0x14], 0xf
mov edx, esi
jbe 0x4018b9
mov edx, dword [esi]
push dword [esi + 0x10]
mov ecx, eax
call fcn.00404890
add esp, 4
mov ecx, eax
push 0x403a00
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char_______cdecl___class_std::basic_ostream_char__struct_std::char_traits_char_____]
mov byte [ebp - 0x29], 0
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x40190e
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401904
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40194c
push ecx
push edx
call fcn.0040510d
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
add esi, 0x18
cmp esi, dword [ebp - 0x44]
jne 0x401680
mov dl, byte [ebp - 0x29]
mov al, dl
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.00404fba
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3