joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404930
Capabilities:
Enumerate process modules

Disassembly:
push esi
mov esi, ecx
push edi
lea edi, [esi + 4]
mov dword [esi + 8], 0xffffffff
mov dword [edi], 0
mov eax, dword [esi]
push eax
call fcn.00405ade
push 0x1000
call fcn.00409d4e
add esp, 8
mov dword [esi], eax
push edi
push 0x1000
push eax
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
je 0x404979
mov eax, dword [edi]
mov dword [esi + 8], 1
shr eax, 2
mov dword [edi], eax
cmp dword [edi], 0x400
jae 0x404944
mov eax, dword [esi]
test eax, eax
je 0x40499a
mov ecx, dword [esi + 8]
mov edx, dword [edi]
cmp ecx, edx
jae 0x40499a
mov eax, dword [eax + ecx*4]
inc ecx
mov dword [esi + 8], ecx
pop edi
pop esi
ret
pop edi
xor eax, eax
pop esi
ret

Function at 0x4049e0
Capabilities:
Enumerate process modules

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi]
lea edi, [esi + 8]
test eax, eax
mov dword [edi], 0
mov dword [esi + 0xc], 0xffffffff
mov dword [esi + 4], 0
je 0x404a5f
mov eax, dword [esi + 4]
push eax
call fcn.00405ade
push 0x1000
call fcn.00409d4e
mov ecx, dword [esi]
add esp, 8
mov dword [esi + 4], eax
push edi
push 0x1000
push eax
push ecx
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x404a3b
mov eax, dword [edi]
mov dword [esi + 0xc], 0
shr eax, 2
mov dword [edi], eax
cmp dword [edi], 0x400
jae 0x404a01
cmp dword [esi], 0
je 0x404a5f
mov ecx, dword [esi + 0xc]
mov eax, dword [edi]
cmp ecx, eax
jae 0x404a5f
mov edx, dword [esi + 4]
inc ecx
pop edi
mov eax, dword [edx + ecx*4 - 4]
mov dword [esi + 0xc], ecx
pop esi
ret
pop edi
xor eax, eax
pop esi
ret
Function at 0x404ed0
Capabilities:
Enumerate gui resources
Terminate process

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push ebp
push esi
push edi
push 0x400
push 1
push eax
lea ecx, [esp + 0x1c]
call fcn.00404b20
lea ecx, [esp + 0x10]
push ecx
push 0x404ad0
call dword [sym.imp.USER32.dll_EnumWindows]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], 0
test eax, eax
je 0x404f81
mov ecx, dword [esp + 0x1c]
test ecx, ecx
jbe 0x404f81
mov esi, dword [eax]
mov dword [esp + 0x20], 1
test esi, esi
je 0x404f81
mov ebp, dword [sym.imp.USER32.dll_SendMessageTimeoutA]
mov edi, dword [sym.imp.USER32.dll_PostMessageA]
lea edx, [esp + 0xc]
mov dword [esp + 0xc], 0
push edx
push 0x64
push 0xa
push 0
push 0
push 0x11
push esi
call ebp
mov eax, dword [esp + 0xc]
test eax, eax
je 0x404fc1
push 0
push 0
push 0x10
push esi
call edi
push 0
push 0
push 0x10
push esi
call edi
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x404f81
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
cmp eax, edx
jae 0x404f81
mov esi, dword [ecx + eax*4]
inc eax
test esi, esi
mov dword [esp + 0x20], eax
jne 0x404f2d
mov eax, dword [esp + 0x30]
mov edi, 1
push eax
push 0
push 0x100001
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x404fde
push 0x1388
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x404fd7
mov eax, dword [esp + 0x34]
test eax, eax
je 0x404fd5
push 0
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x404fd7
lea ecx, [esp + 0x10]
call fcn.00404b50
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x20
ret 8
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x10]
call fcn.00404b50
mov eax, edi
pop edi
pop esi
pop ebp
add esp, 0x20
ret 8
Function at 0x405150
Capabilities:
Delete service

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x414cc1
push eax
mov dword fs:[0], esp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x4051cc
push 0xffc
call fcn.00409d4e
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], esi
je 0x4052ab
push str.Error_while_OpenSCManager.
push 0x3a99
push esi
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x59
push eax
call fcn.00405780
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
mov eax, dword [esp + 0x18]
push 0xf01ff
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x40523e
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xffc
call fcn.00409d4e
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], 1
je 0x4052ab
push str.Error_while_OpenService.
push 0x3a9b
push edi
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x65
push eax
call fcn.00405780
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jne 0x4052a6
call edi
push esi
call edi
push 0xffc
call fcn.00409d4e
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov dword [esp + 0x10], 2
je 0x4052ab
push str.Error_while_DeleteService.
push 0x3a9c
push 0
push str.Nov_11_2010
push str.E:CommonSourceCSServiceControlCSServiceControl.cpp
push 0x6f
push eax
call fcn.00405780
add esp, 0x1c
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
pop edi
pop esi
add esp, 0xc
ret 4
call edi
push esi
call edi
mov ecx, dword [esp + 8]
pop edi
xor eax, eax
mov dword fs:[0], ecx
pop esi
add esp, 0xc
ret 4
Function at 0x4052c0
Capabilities:
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebx
push ebp
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
je 0x405371
mov eax, dword [esp + 0x30]
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x405361
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push ecx
push esi
call ebx
test eax, eax
je 0x405361
cmp dword [esp + 0x14], 1
je 0x405349
lea edx, [esp + 0x10]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x405361
cmp dword [esp + 0x14], 3
jne 0x405349
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x3e8
call edi
lea eax, [esp + 0x10]
push eax
push esi
call ebx
test eax, eax
je 0x405361
cmp dword [esp + 0x14], 3
je 0x40532f
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call edi
push esi
call edi
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x1c
ret 4
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call edi
test esi, esi
je 0x405371
push esi
call edi
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x1c
ret 4

Function at 0x405860
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x2000
call fcn.0040a980
mov ecx, dword [esp + 0x2004]
lea eax, [esp + 0x2008]
push eax
lea edx, [esp + 4]
push ecx
push edx
call dword [sym.imp.USER32.dll_wvsprintfA]
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x2000
ret

Function at 0x4063f0
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x406417
add esp, 0x1c
ret
lea ecx, [esp + 4]
push esi
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
mov esi, eax
test esi, esi
je 0x40646a
mov edx, dword [esp + 8]
mov eax, dword [esp + 0xc]
push 0
push 0
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0xc]
push 0x10
push ecx
push 0
push edx
mov dword [esp + 0x28], 1
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
mov esi, eax
mov eax, dword [esp + 4]
test eax, eax
je 0x406479
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x1c
ret
Function at 0x406690
Capabilities:
Enumerate process modules

Disassembly:
sub esp, 0x22c
push ebx
push ebp
mov ebp, dword [esp + 0x238]
push esi
push edi
xor edx, edx
mov ecx, 0x88
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], edx
rep stosd dword es:[edi], eax
cmp ebp, edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], edx
mov edi, 1
jne 0x4066d2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x22c
ret
mov ebx, dword [esp + 0x244]
push ebx
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x406722
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
je 0x4066c5
call ebp
cmp eax, 5
jne 0x4066c5
push str.SE_DEBUG_NAME
xor edi, edi
call fcn.00406480
add esp, 4
test eax, eax
je 0x4066c5
push ebx
push 8
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
je 0x4066ee
mov ebp, dword [esp + 0x240]
push 0x5c
push ebp
call fcn.00409d70
add esp, 8
test eax, eax
je 0x406739
mov dword [esp + 0x14], 1
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x224
push eax
push esi
call sub.KERNEL32.dll_Module32First
mov eax, dword [esp + 0x14]
push ebp
test eax, eax
je 0x40676b
lea ecx, [esp + 0x13c]
push ecx
call fcn.00411680
add esp, 8
test eax, eax
je 0x40678d
jmp 0x40677c
lea edx, [esp + 0x3c]
push edx
call fcn.00411680
add esp, 8
test eax, eax
je 0x406797
lea eax, [esp + 0x18]
push eax
push esi
call sub.KERNEL32.dll_Module32Next
test eax, eax
je 0x40679f
jmp 0x40674c
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
jmp 0x40679f
mov edx, dword [esp + 0x34]
mov dword [esp + 0x10], edx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x4067bf
mov eax, dword [esp + 0x248]
test eax, eax
je 0x4067bf
mov edx, dword [esp + 0x28]
mov dword [eax], edx
pop edi
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x22c
ret
Function at 0x4067d0
Capabilities:
Create thread
Inject thread

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x24]
push edi
mov edi, dword [esp + 0x20]
xor ebp, ebp
mov ebx, 1
cmp edi, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], esi
je 0x40695d
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp edi, eax
je 0x40695d
test byte [esp + 0x30], 3
jne 0x406813
mov dword [esp + 0x30], ebx
push edi
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x43a
call ebp
mov esi, eax
test esi, esi
jne 0x406859
test ebx, ebx
je 0x406891
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x406891
push str.SE_DEBUG_NAME
xor ebx, ebx
call fcn.00406480
add esp, 4
test eax, eax
je 0x406891
push edi
push ebx
push 0x43a
call ebp
mov esi, eax
test esi, esi
je 0x406828
mov ebp, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
mov edi, ebp
neg edi
sbb edi, edi
and edi, eax
je 0x4068bc
push 4
push 0x103000
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
jne 0x40689f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
jmp 0x406933
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
lea eax, [esp + 0x20]
push eax
push edi
push ebp
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x406882
cmp dword [esp + 0x20], edi
jne 0x406882
mov eax, ebx
jmp 0x4068c4
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x24]
push 0
push 0
push eax
push ecx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov ebp, eax
test ebp, ebp
je 0x40691e
push 0xffffffffffffffff
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x34]
test eax, eax
je 0x4068fc
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40691e
test ebx, ebx
je 0x406928
test byte [esp + 0x30], 2
je 0x406928
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x30]
push edx
push edi
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x406928
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x406933
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x406946
push 0x8000
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test esi, esi
je 0x406951
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push esi
call dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
cmp ecx, ebp
je 0x40696c
mov dword [ecx], eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret
Function at 0x406980
Capabilities:
Start service

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
xor esi, esi
cmp ebx, 0xffffffff
jne 0x406993
xor ebx, ebx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebp, eax
test ebp, ebp
jne 0x4069c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406a5b
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x2c]
push edi
push 0xf01ff
push eax
push ebp
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x406a09
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x4069f5
push ebp
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
push ebp
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
test ebx, ebx
jne 0x406a28
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x406a4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406a47
mov esi, eax
jmp 0x406a4a
lea ecx, [esp + 0x10]
push ecx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x406a4a
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406a47
mov esi, eax
jmp 0x406a4a
or esi, 0xffffffff
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret

Function at 0x406a70
Capabilities:
Query service status

Disassembly:
push ebx
push esi
xor esi, esi
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x406a97
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406b0c
pop esi
or eax, 0xffffffff
pop ebx
ret
mov eax, dword [esp + 0xc]
push ebp
push edi
push 4
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
test edi, edi
jne 0x406ad6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406ac9
push ebx
mov esi, eax
call ebp
pop edi
mov eax, esi
pop ebp
pop esi
pop ebx
ret
push ebx
or esi, 0xffffffff
call ebp
pop edi
mov eax, esi
pop ebp
pop esi
pop ebx
ret
mov ecx, dword [esp + 0x18]
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
jne 0x406b02
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406aff
push edi
mov esi, eax
call ebp
push ebx
call ebp
pop edi
mov eax, esi
pop ebp
pop esi
pop ebx
ret
or esi, 0xffffffff
push edi
call ebp
push ebx
call ebp
pop edi
mov eax, esi
pop ebp
pop esi
pop ebx
ret
Function at 0x406b10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x10c
mov al, byte [0x41ed78]
push edi
mov byte [esp + 0xc], al
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x114]
lea edx, [esp + 0xc]
stosw word es:[edi], ax
push ecx
push str.SYSTEMCurrentControlSetServices_s
push 0x103
push edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 2
stosb byte es:[edi], al
call fcn.00409af4
add esp, 0x10
lea eax, [esp + 8]
lea ecx, [esp + 4]
lea edx, [esp + 0xc]
push eax
push ecx
push 0
push 2
push 0
push 0
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
pop edi
jne 0x406bc6
mov eax, dword [esp + 0x120]
mov ecx, dword [esp + 0x11c]
mov edx, dword [esp + 0x118]
push esi
push eax
mov eax, dword [esp + 0x11c]
push ecx
mov ecx, dword [esp + 0xc]
push edx
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [esp + 4]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret

Function at 0x406d60
Capabilities:
Start service

Disassembly:
push ebx
push edi
xor edi, edi
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
jne 0x406d87
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x406dfb
pop edi
or eax, 0xffffffff
pop ebx
ret
mov eax, dword [esp + 0xc]
push ebp
push esi
push 0x14
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
test esi, esi
jne 0x406dc6
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406db9
push ebx
mov edi, eax
call ebp
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
ret
push ebx
or edi, 0xffffffff
call ebp
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
ret
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x406df1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x406dee
push esi
mov edi, eax
call ebp
push ebx
call ebp
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
ret
or edi, 0xffffffff
push esi
call ebp
push ebx
call ebp
pop esi
mov eax, edi
pop ebp
pop edi
pop ebx
ret
Function at 0x4085f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x110
mov eax, dword [esp + 0x114]
push ebx
mov ebx, dword [esp + 0x120]
push eax
lea ecx, [esp + 0x14]
push str.SYSTEMCurrentControlSetControlClass_s
push ecx
mov dword [esp + 0x14], ebx
call fcn.00409aa2
add esp, 0xc
lea edx, [esp + 4]
lea eax, [esp + 0x10]
push edx
push 0x20019
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x408682
push esi
mov esi, dword [esp + 0x120]
lea ecx, [esp + 0xc]
push edi
push ecx
lea edx, [esp + 0x18]
push esi
push edx
push eax
mov eax, dword [esp + 0x1c]
push str.NetCfgInstanceId
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
test edi, edi
jne 0x408673
mov eax, dword [esp + 0x10]
cmp eax, ebx
jae 0x408673
mov byte [eax + esi], 0
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
add esp, 0x110
ret

Function at 0x408b10
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x1114
call fcn.0040a980
movsx eax, byte [esp + 0x1118]
push esi
push eax
lea ecx, [esp + 0x18]
push str.._c:
push ecx
call fcn.00409aa2
add esp, 0xc
lea edx, [esp + 0x14]
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408b61
or eax, eax
pop esi
add esp, 0x1114
ret
xor eax, eax
lea ecx, [esp + 0x10]
mov dword [esp + 4], eax
lea edx, [esp + 0x118]
mov dword [esp + 8], eax
push eax
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], eax
push 0x1000
push edx
lea eax, [esp + 0x14]
push 0xc
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
push esi
jne 0x408bb3
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop esi
add esp, 0x1114
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x134]
pop esi
add esp, 0x1114
ret

Function at 0x408bd0
Capabilities:
Get disk information

Disassembly:
push ebx
mov ebx, dword [esp + 8]
lea eax, [esp + 8]
mov byte [esp + 8], bl
push eax
mov byte [esp + 0xd], 0x3a
mov byte [esp + 0xe], 0x5c
mov byte [esp + 0xf], 0
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, 6
ja case.default.0x408bf8
jmp dword [eax*4 + 0x408c50]
xor eax, eax
pop ebx
ret
mov eax, 1
pop ebx
ret
mov eax, 2
pop ebx
ret
push ebx
call fcn.00408b10
sub eax, 7
add esp, 4
neg eax
sbb eax, eax
pop ebx
add eax, 4
ret
mov eax, 5
pop ebx
ret
push ebx
call fcn.00408b10
sub eax, 7
add esp, 4
neg eax
sbb eax, eax
pop ebx
add eax, 7
ret
mov eax, 8
pop ebx
ret
mov eax, 9
pop ebx
ret
Function at 0x408c70
Capabilities:
Get disk information

Disassembly:
sub esp, 0x100
mov ecx, 0x40
xor eax, eax
push esi
push edi
lea edi, [esp + 8]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
push eax
push pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
mov edi, dword [esp + 0x10c]
xor esi, esi
lea ecx, [esp + 0xa]
mov dl, byte [ecx - 1]
mov al, byte [ecx]
test dl, dl
jne 0x408caf
test al, al
je 0x408cbb
mov dl, byte [ecx - 2]
mov byte [esi + edi], dl
inc esi
add ecx, 4
jmp 0x408ca2
mov eax, esi
pop edi
pop esi
add esp, 0x100
ret

Function at 0x408cd0
Capabilities:
Get disk information via ioctl

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x46c
cmp eax, 2
push ebx
push ebp
push esi
push edi
jb 0x408e6d
cmp eax, 3
jbe 0x408cff
cmp eax, 5
jne 0x408e6d
mov dword [esp + 0x10], 0x4170b0
jmp 0x408d07
mov dword [esp + 0x10], 0x4170c0
mov eax, dword [esp + 0x10]
push 0x12
push 0
push 0
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
cmp esi, 0xffffffff
je 0x408e6d
mov ebx, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
xor ebp, ebp
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
mov eax, 0x1c
mov dword [esp + 0x60], eax
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0x10]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
lea ecx, [esp + 0x60]
push ecx
push ebp
push edx
push 0
push esi
call edi
test eax, eax
je 0x408e66
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x44]
push eax
push ebp
push ecx
push 0
push esi
call edi
lea edx, [esp + 0x14]
push 0
push edx
push 0
lea eax, [esp + 0x50]
push 0
push eax
push esi
mov dword [esp + 0x2c], 0
call ebx
mov edx, dword [esp + 0x14]
test edx, edx
je 0x408e43
cmp edx, 0x400
ja 0x408e43
mov ecx, 7
xor eax, eax
lea edi, [esp + 0x28]
mov dword [esp + 0x7c], 5
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x14]
push ecx
push eax
push edx
lea ecx, [esp + 0x88]
lea edx, [esp + 0x50]
push ecx
push edx
push esi
mov dword [esp + 0x40], 0x1c
call ebx
test eax, eax
je 0x408e43
push 0
push 0
push 3
push 0
push 3
lea eax, [esp + 0x94]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x408e43
lea ecx, [esp + 0x18]
push 0
push ecx
lea edx, [esp + 0x24]
push 0xc
push edx
push 0
push 0
push 0x2d1080
push edi
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x408e3c
mov eax, dword [esp + 0x480]
mov ecx, dword [esp + 0x20]
cmp eax, ecx
je 0x408e49
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc ebp
jmp 0x408d45
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x3c]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x46c
ret
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x46c
ret