joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408d30
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov edx, dword [ebp + 0xc]
push ebx
mov ebx, ecx
test edx, edx
jne 0x408d43
push 0xd
pop eax
jmp 0x408d87
push esi
xor eax, eax
push edi
mov dword [ebp + 0xc], eax
mov esi, eax
mov edi, edx
mov ecx, edi
lea eax, [ecx + 2]
mov dword [ebp - 4], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp + 0xc]
jne 0x408d56
sub ecx, dword [ebp - 4]
sar ecx, 1
inc ecx
lea edi, [edi + ecx*2]
lea esi, [esi + ecx*2]
cmp ecx, 1
jne 0x408d4e
push esi
push edx
push 7
xor eax, eax
push eax
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x408d8e
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push esi
mov esi, ecx
test edx, edx
jne 0x408da0
push 0xd
pop eax
jmp 0x408dd2
mov ecx, edx
push ebx
push edi
xor ebx, ebx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x408da9
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push dword [ebp + 0x10]
push ebx
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop ebx
pop esi
pop ebp
ret 0xc

Function at 0x409cdc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4132a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x210]
push edi
mov edi, dword [ebp + 0xc]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], 0x208
push eax
push 0
push 2
push esi
push 0x4127c0
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x409d45
cmp dword [ebp - 0x210], 4
jb 0x409d45
test edi, edi
lea eax, [ebp - 0x20c]
cmovne esi, edi
push esi
push eax
call fcn.00409dff
jmp 0x409d47
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0040d74d
mov esp, ebp
pop ebp
ret 8

Function at 0x409d59
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x4132a4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x210], 0x208
push eax
push 0
push 2
push str.CommonFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegGetValueW]
test eax, eax
jne 0x409dec
mov ecx, dword [ebp - 0x210]
cmp ecx, 4
jb 0x409dec
shr ecx, 1
push 0xffffffffffffffff
cmp word [ebp + ecx*2 - 0x210], 0x5c
sete al
lea eax, [eax*2 + str.Microsoft_SharedOffice16_]
push eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00409dff
jmp 0x409dee
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040d74d
mov esp, ebp
pop ebp
ret 4
Function at 0x40d1b2
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x101
push ebx
mov edi, str.SoftwareMicrosoftClickToRunOverRide
mov dword [ebp - 4], ebx
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40d233
lea eax, [ebp - 8]
mov edi, str.AllowJitvInAppvVirtualizedProcess
push eax
push edi
push dword [ebp - 4]
call fcn.0040d714
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Registry_override
test al, al
je 0x40d21c
cmp dword [ebp - 8], ebx
setne bl
call esi
push edi
call esi
test bl, bl
je 0x40d215
push str._is_enabled.__C2R_JitV_will_run_in_AppV_virtualized_processes._n
jmp 0x40d226
push str._is_disabled.__C2R_JitV_will_NOT_run_in_AppV_virtualized_processes._n
jmp 0x40d226
call esi
push edi
call esi
push str._not_found_n
call esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40d24a
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Registry_override_key
call esi
push edi
call esi
push str._does_not_exist_n
call esi
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d75a
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
xor eax, eax
push ebx
mov ebx, 0xbb40e64e
cmp dword [0x4132a4], eax
je 0x40d77c
cmp dword [0x4132a4], ebx
jne 0x40d810
push edi
push eax
push eax
push 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapSetInformation]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov edi, dword [ebp - 8]
xor edi, dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor edi, eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x10]
xor eax, dword [ebp - 0x14]
xor edi, eax
lea eax, [ebp - 4]
push eax
push 0x40
push 4
push 0x4132a4
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 4]
test edi, edi
push eax
push dword [ebp - 4]
cmovne ebx, edi
mov edi, 0x4132a4
push 4
push edi
mov dword [0x4132a4], ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push 4
push edi
call sub.KERNEL32.dll_WerRegisterMemoryBlock
mov eax, dword [0x4132a4]
not eax
mov dword [0x417220], eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40da4b
Capabilities:
Terminate process

Disassembly:
push 0x14
push 0x415438
call fcn.0040dfe3
push 1
call fcn.0040dace
pop ecx
test al, al
jne 0x40d8f4
push 7
call fcn.0040e634
xor bl, bl
mov byte [ebp - 0x19], bl
and dword [ebp - 4], 0
call fcn.0040da99
mov byte [ebp - 0x24], al
mov eax, dword [0x4175dc]
xor ecx, ecx
inc ecx
cmp eax, ecx
je 0x40d8ed
test eax, eax
jne 0x40d95e
mov dword [0x4175dc], ecx
push 0x4112c4
push 0x4112ac
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm_e
pop ecx
pop ecx
test eax, eax
je 0x40d941
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x40da45
push 0x4112a8
push 0x411274
call sub.api_ms_win_crt_runtime_l1_1_0.dll__initterm
pop ecx
pop ecx
mov dword [0x4175dc], 2
jmp 0x40d963
mov bl, cl
mov byte [ebp - 0x19], bl
push dword [ebp - 0x24]
call fcn.0040dc2b
pop ecx
call fcn.0040e628
mov esi, eax
xor edi, edi
cmp dword [esi], edi
je 0x40d993
push esi
call fcn.0040db9e
pop ecx
test al, al
je 0x40d993
push edi
push 2
push edi
mov esi, dword [esi]
mov ecx, esi
call fcn.0040e863
call esi
call fcn.0040e62e
mov esi, eax
cmp dword [esi], edi
je 0x40d9b1
push esi
call fcn.0040db9e
pop ecx
test al, al
je 0x40d9b1
push dword [esi]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__register_thread_local_exe_atexit_callback
pop ecx
push edi
call sub.VCRUNTIME140.dll___telemetry_main_invoke_trigger
pop ecx
call fcn.0040e749
movzx eax, ax
push eax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__get_wide_winmain_command_line
push eax
push edi
push 0x400000
call main
mov esi, eax
push edi
call sub.VCRUNTIME140.dll___telemetry_main_return_trigger
pop ecx
call fcn.0040e77c
test al, al
jne 0x40d9ea
push esi
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
test bl, bl
jne 0x40d9f3
call sub.api_ms_win_crt_runtime_l1_1_0.dll__cexit
push edi
push 1
call fcn.0040dc48
pop ecx
pop ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, esi
jmp 0x40da45
call fcn.0040e029
ret
call fcn.0040d75a
jmp 0x40d8d5
Function at 0x4050b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x4050dc
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x405104
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40510a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x405172
jg 0x405121
test esi, esi
je 0x405172
test ecx, ecx
jl 0x40516d
jg 0x40512b
test eax, eax
je 0x40516d
cmp edi, ecx
jg 0x40513f
jl 0x405135
cmp esi, eax
jae 0x40513f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x405175
mov ecx, dword [ebp + 8]
jmp 0x40517f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x405199
jg 0x40517f
test esi, esi
je 0x405199
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x405199
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4051b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x4051dc
jl 0x4051d0
test ecx, ecx
jne 0x4051dc
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x4051f5
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x405243
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x405249
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x405249
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x4052b6
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x405272
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x4052a4
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x4052b6
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x405280
test edi, edi
je 0x4052b6
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x405610
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x405640
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
mov eax, dword [eax]
test eax, eax
je 0x405670
mov edx, dword [esi + 0x30]
mov edx, dword [edx]
add edx, eax
cmp eax, edx
jae 0x405670
call dword [sym.imp.MSVCP140.dll_protected:_char____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::_Pninc_void_]
pop esi
mov byte [eax], bl
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
push edi
je 0x405748
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x405699
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4056a5
movsx eax, bl
jmp 0x4056dd
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x405707
sub eax, 1
je 0x405707
sub eax, 2
jne 0x405748
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x405725
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x405748
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
Function at 0x406380
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40643c
cmp byte [esi + 0x3d], 0
je 0x40643c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40642a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x4063f1
sub eax, 1
je 0x4063f5
sub eax, 2
jne 0x40642a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x406413
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x40642a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00409942
mov esp, ebp
pop ebp
ret

Function at 0x407df0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, edx
push edi
mov edi, ecx
test esi, esi
jne 0x407e15
push 0x57
jmp 0x407ea1
push 0x1c
lea eax, [ebp - 0x24]
mov dword [ebp - 0xc], 0
push eax
xorps xmm0, xmm0
push esi
push edi
movups xmmword [ebp - 0x24], xmm0
movq qword [ebp - 0x14], xmm0
call dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
test eax, eax
je 0x407ea7
push 0
push 0x40
lea eax, [ebp - 0x64]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x407ea7
mov eax, 0x5a4d
cmp word [ebp - 0x64], ax
jne 0x407e9c
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x18]
ja 0x407e9c
cmp eax, 0x40
jb 0x407e9c
push 0
push 0xf8
push ebx
add eax, esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x407ea7
cmp dword [ebx], 0x4550
jne 0x407e9c
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov ecx, dword [ebp - 8]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409942
mov esp, ebp
pop ebp
ret 4
Function at 0x408e80
Capabilities:
Query environment variable
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
mov eax, dword [0x40e008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x480], eax
mov edi, ecx
push 0x104
lea eax, [ebp - 0x210]
mov dword [ebp - 0x41c], 0
push eax
push 0x40b4d4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push esi
push ecx
mov edx, edi
mov dword [ebp - 0x47c], eax
lea ecx, [ebp - 0x41c]
call fcn.00408cc0
mov ebx, dword [ebp - 0x41c]
test eax, eax
je 0x409064
mov eax, dword [ebp - 0x47c]
test eax, eax
je 0x409064
cmp eax, 0x104
jae 0x409064
mov ecx, 0x104
lea eax, [ebp - 0x210]
nop dword [eax]
cmp word [eax], 0
je 0x408f1e
add eax, 2
sub ecx, 1
jne 0x408f10
mov edx, 0x104
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x409064
lea ecx, [ebp - 0x210]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x408f69
mov edi, str._sysnative_rundll32.exe
mov eax, 0x7ffffffe
sub edi, ecx
test eax, eax
je 0x408f69
movzx esi, word [edi + ecx]
test si, si
je 0x408f69
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x408f50
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test edx, edx
je 0x409064
lea eax, [ebx + 0xc]
push eax
push str.rundll32.exe___hs__1
lea eax, [ebp - 0x418]
push 0x104
push eax
call fcn.00407d70
add esp, 0x10
test eax, eax
js 0x409064
lea eax, [ebp - 0x478]
mov dword [ebp - 0x468], 0x44
push eax
lea eax, [ebp - 0x468]
xorps xmm0, xmm0
push eax
push 0
push 0
push 4
push 0
push 0
push 0
lea eax, [ebp - 0x418]
movlpd qword [ebp - 0x464], xmm0
push eax
lea eax, [ebp - 0x210]
movlpd qword [ebp - 0x45c], xmm0
push eax
movups xmmword [ebp - 0x478], xmm0
movlpd qword [ebp - 0x454], xmm0
movlpd qword [ebp - 0x44c], xmm0
movlpd qword [ebp - 0x444], xmm0
movlpd qword [ebp - 0x43c], xmm0
movlpd qword [ebp - 0x434], xmm0
movlpd qword [ebp - 0x42c], xmm0
call dword [ebp - 0x480]
test eax, eax
je 0x409064
push dword [ebx]
mov ecx, dword [ebp - 0x478]
mov edx, 0x40b49c
push ebx
call fcn.00408a50
test eax, eax
jne 0x409088
push 0xffffffffffffffff
push dword [ebp - 0x478]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x478]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x474]
call esi
xor esi, esi
test ebx, ebx
je 0x409073
push ebx
call fcn.00409bfc
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00409942
mov esp, ebp
pop ebp
ret 8
push dword [ebp - 0x474]
mov esi, dword [sym.imp.KERNEL32.dll_ResumeThread]
call esi
push dword [ebp - 0x474]
call esi
push 0xffffffffffffffff
push dword [ebp - 0x478]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x41c]
mov dword [ebp - 0x41c], 0x1f4
push eax
push dword [ebp - 0x478]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [ebp - 0x478]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x474]
call esi
xor esi, esi
mov eax, 1
cmp dword [ebp - 0x41c], esi
cmove esi, eax
jmp 0x409066
Function at 0x40a24a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40a289
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40a289
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40a289
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40a289
cmp dword [ecx + 0x74], 0xe
jbe 0x40a289
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x401000
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 8]
push eax
lea eax, [ebp + 0xc]
push eax
xor ebx, ebx
push ebx
push 2
push ebx
push ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x401056
mov eax, dword [ebp + 0x14]
push esi
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x40102b
sub eax, esi
inc eax
push eax
push dword [ebp + 0x14]
push 1
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
pop esi
jmp 0x401058
xor al, al
pop ebx
pop ebp
ret 0x10
Function at 0x4012f9
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
movzx eax, word [esp + 0xc]
push 0x63
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push ebx
push edi
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
pop edi
mov dword [esi], eax
mov eax, esi
pop ebx
ret 4

Function at 0x401339
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
lea eax, [ebp - 4]
push eax
push 1
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40139e
lea eax, [ebp - 8]
push eax
push edi
push ebx
push ebx
push str.Common_AppData
push dword [ebp - 4]
mov dword [ebp - 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x40139e
mov eax, dword [ebp - 8]
cmp eax, 0x104
jb 0x401396
mov eax, 0x103
mov byte [eax + edi], 0
mov al, 1
jmp 0x4013b3
mov eax, 0x4020b0
mov edx, edi
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4013a7
xor al, al
pop ebx
leave
ret