joyce8/EMBER2024-capa huggingface dataset:
Function at 0x406f40
Capabilities:
Link many functions at runtime

Disassembly:
push esi
push edi
mov esi, ecx
call fcn.004380e0
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x407044
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.NtDll.dll
call ebx
push 0x47c7d0
mov dword [esi + 0x30], eax
call ebx
push str.psapi.dll
mov dword [esi + 0x34], eax
call ebx
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x38], eax
test ecx, ecx
pop ebx
je 0x407096
mov edx, dword [esi + 0x34]
test edx, edx
je 0x407096
test eax, eax
je 0x407096
push str.NtQuerySystemInformation
push ecx
call edi
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x30]
push str.NtQueryInformationProcess
push eax
call edi
mov ecx, dword [esi + 0x38]
push str.EnumProcesses
push ecx
mov dword [esi + 0x28], eax
call edi
mov edx, dword [esi + 0x38]
push str.GetModuleFileNameExA
push edx
mov dword [esi + 0x18], eax
call edi
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x38]
push str.GetModuleFileNameExW
push eax
call edi
mov dword [esi + 0x20], eax
call fcn.00438130
test eax, eax
je 0x406ff5
mov ecx, dword [esi + 0x34]
push str.ProcessIdToSessionId
push ecx
call edi
mov dword [esi + 0x2c], eax
mov eax, dword [esi + 0x24]
test eax, eax
je 0x407096
mov eax, dword [esi + 0x28]
test eax, eax
je 0x407096
mov eax, dword [esi + 0x18]
test eax, eax
je 0x407096
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x407096
mov eax, dword [esi + 0x20]
test eax, eax
je 0x407096
mov dword [esi + 0x3c], 1
call fcn.00438130
test eax, eax
je 0x407096
mov eax, dword [esi + 0x2c]
test eax, eax
jne 0x407096
mov dword [esi + 0x3c], 0
jmp 0x407096
push 0x47c7d0
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [esi + 0x34], eax
je 0x407096
push str.CreateToolhelp32Snapshot
push eax
call edi
mov edx, dword [esi + 0x34]
push str.Process32First
push edx
mov dword [esi + 0xc], eax
call edi
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x34]
push str.Process32Next
push eax
call edi
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x14], eax
test ecx, ecx
je 0x407096
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x407096
test eax, eax
je 0x407096
mov dword [esi + 0x40], 1
mov eax, dword [esi + 0x34]
test eax, eax
je 0x4070b6
push str.GetLongPathNameA
push eax
call edi
mov ecx, dword [esi + 0x34]
push str.GetLongPathNameW
push ecx
mov dword [esi + 4], eax
call edi
mov dword [esi + 8], eax
mov eax, dword [esi + 0x40]
test eax, eax
jne 0x4070cb
mov eax, dword [esi + 0x3c]
test eax, eax
jne 0x4070cb
mov ecx, esi
call fcn.004070d0
pop edi
pop esi
ret

Function at 0x407150
Capabilities:
Acquire debug privileges

Disassembly:
mov eax, dword [0x4861b4]
test eax, eax
jne 0x40716f
push 1
push 0x47cabc
push 0xffffffffffffffff
call fcn.0043aa40
add esp, 0xc
mov dword [0x4861b4], eax
ret
Function at 0x407cb0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x30c
push ebp
push esi
mov esi, dword [esp + 0x318]
push edi
test esi, esi
mov ebp, ecx
je 0x407eb0
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x407eb0
mov ecx, 0x40
lea edi, [esp + 0xd]
mov byte [esp + 0xc], al
push 0x103
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push esi
push eax
call fcn.00411280
mov al, byte [esp + 0x18]
add esp, 0xc
cmp al, 0x5c
jne 0x407e20
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x111]
mov byte [esp + 0x110], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0xc
lea ecx, [esp + 0x10]
push 0x47cb6c
push ecx
stosb byte es:[edi], al
call fcn.00416a60
add esp, 0xc
test eax, eax
jne 0x407dce
mov edi, 0x47cb5c
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x110]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x11d]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push 0x104
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov byte [esp + 0x120], 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x114]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x407eb0
cmp eax, 0x104
jb 0x407e19
pop edi
pop esi
pop ebp
add esp, 0x30c
ret 8
push 4
lea eax, [esp + 0x10]
push 0x47cb54
push eax
call fcn.00416a60
add esp, 0xc
test eax, eax
jne 0x407e20
lea ecx, [esp + 0x10]
push 0x103
lea edx, [esp + 0x114]
push ecx
push edx
call fcn.00411280
lea eax, [esp + 0x11c]
push 0x103
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.00411280
add esp, 0x18
jmp 0x407e20
mov esi, dword [esp + 0x31c]
lea edx, [esp + 0xc]
push 0x104
push edx
mov ecx, ebp
call fcn.004080a0
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x215]
mov byte [esp + 0x214], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 4]
test eax, eax
je 0x407e99
lea eax, [esp + 0xc]
push 0x7e
push eax
call fcn.00411460
add esp, 8
test eax, eax
je 0x407e99
lea ecx, [esp + 0x214]
push 0x104
lea edx, [esp + 0x10]
push ecx
push edx
call dword [ebp + 4]
test eax, eax
jbe 0x407e99
cmp eax, 0x104
jae 0x407e99
mov eax, dword [esp + 0x320]
lea ecx, [esp + 0x214]
dec eax
push eax
push ecx
jmp 0x407ea7
mov edx, dword [esp + 0x320]
lea eax, [esp + 0xc]
dec edx
push edx
push eax
push esi
call fcn.00411280
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x30c
ret 8
Function at 0x407ec0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x618
push ebx
mov ebx, dword [esp + 0x620]
push esi
push edi
test ebx, ebx
mov esi, ecx
je 0x40808e
push ebx
call fcn.00410fb4
add esp, 4
test eax, eax
je 0x40808e
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x103
lea eax, [esp + 0x10]
push ebx
push eax
call fcn.00411020
add esp, 0xc
cmp word [esp + 0xc], 0x5c
jne 0x407ffd
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x216]
mov word [esp + 0x214], 0
rep stosd dword es:[edi], eax
push 0xc
lea ecx, [esp + 0x10]
push str.SystemRoot_
push ecx
stosw word es:[edi], ax
call fcn.00458c60
add esp, 0xc
test eax, eax
jne 0x407fb8
lea edx, [esp + 0x214]
push str._SystemRoot_
push edx
call fcn.00410ffb
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x236]
push eax
push ecx
mov word [esp + 0x23c], 0x5c
call fcn.00410ffb
add esp, 0x10
lea edx, [esp + 0xc]
lea eax, [esp + 0x214]
push 0x104
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x40808e
cmp eax, 0x104
jb 0x407ffd
pop edi
pop esi
pop ebx
add esp, 0x618
ret 8
push 4
push str.___
push ebx
call fcn.00458c60
add esp, 0xc
test eax, eax
jne 0x407ffd
lea ecx, [esp + 0x14]
push 0x103
lea edx, [esp + 0x218]
push ecx
push edx
call fcn.00411020
lea eax, [esp + 0x220]
push 0x103
lea ecx, [esp + 0x1c]
push eax
push ecx
call fcn.00411020
add esp, 0x18
lea edx, [esp + 0xc]
push 0x104
push edx
mov ecx, esi
call fcn.00408130
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x41e]
mov word [esp + 0x41c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov eax, dword [esi + 8]
test eax, eax
je 0x408077
lea eax, [esp + 0xc]
push 0x7e
push eax
call fcn.0041151c
add esp, 8
test eax, eax
je 0x408077
lea ecx, [esp + 0x41c]
push 0x104
lea edx, [esp + 0x10]
push ecx
push edx
call dword [esi + 8]
test eax, eax
jbe 0x408077
cmp eax, 0x104
jae 0x408077
mov eax, dword [esp + 0x62c]
lea ecx, [esp + 0x41c]
dec eax
push eax
push ecx
jmp 0x408085
mov edx, dword [esp + 0x62c]
lea eax, [esp + 0xc]
dec edx
push edx
push eax
push ebx
call fcn.00411020
add esp, 0xc
pop edi
pop esi
pop ebx
add esp, 0x618
ret 8
Function at 0x4081c0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x110
push ebx
push ebp
mov ebp, dword [esp + 0x11c]
push edi
mov edi, ecx
xor eax, eax
push 2
lea ecx, [esp + 0x10]
xor ebx, ebx
mov word [esp + 0x11], ax
push ebp
push ecx
mov byte [esp + 0x18], bl
mov byte [esp + 0x1b], al
call fcn.0041137e
mov al, byte [esp + 0x18]
add esp, 0xc
cmp al, 0x43
jl 0x4081ff
cmp al, 0x5a
jle 0x408207
cmp al, 0x63
jl 0x408231
cmp al, 0x7a
jg 0x408231
cmp byte [esp + 0xd], 0x3a
jne 0x408231
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
cmp eax, ebx
je 0x408231
cmp eax, 2
je 0x408231
cmp eax, 3
je 0x408231
cmp eax, 5
je 0x408231
cmp eax, 6
jne 0x40823f
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret 8
mov eax, dword [edi + 0x44]
push esi
push eax
xor esi, esi
call fcn.0043b550
mov dword [esp + 0x1c], eax
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x21]
mov byte [esp + 0x20], bl
add esp, 4
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x1c]
stosb byte es:[edi], al
push ecx
lea eax, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x20], 0x104
call sub.MPR.dll_WNetGetConnectionA
test eax, eax
jne 0x4082f0
lea edx, [ebp + 2]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edi, [esp + 0x1c]
mov ebx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add ebx, ecx
cmp ebx, 0x104
jae 0x4082f0
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea ebx, [esp + 0x1c]
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x128]
mov ecx, edx
and ecx, 3
dec eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push eax
push ecx
push ebp
call fcn.0041137e
add esp, 0xc
mov esi, 1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4082fd
call fcn.0043b960
mov eax, esi
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x110
ret 8

Function at 0x409cb0
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ecx
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
lea eax, [esp]
push esi
xor esi, esi
push eax
push 0x2001f
push esi
push ecx
push edx
mov dword [esp + 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409d28
mov eax, dword [esp + 4]
cmp eax, esi
je 0x409d28
cmp dword [esp + 0x20], esi
je 0x409d01
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
inc ecx
push ecx
mov ecx, dword [esp + 0x18]
push edx
push 1
push esi
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
jmp 0x409d0d
mov edx, dword [esp + 0x14]
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
cmp eax, esi
jne 0x409d16
mov esi, 1
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ecx
ret 0x18
xor eax, eax
pop esi
pop ecx
ret 0x18
Function at 0x409e80
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
push ebx
xor ebx, ebx
cmp eax, ebx
push ebp
je 0x409f69
mov ebp, dword [esp + 0x24]
cmp ebp, ebx
je 0x409f69
xor ecx, ecx
push edi
mov dword [esp + 0x11], ecx
push eax
mov dword [esp + 0x19], ecx
lea edx, [esp + 0x14]
mov dword [esp + 0x1d], ecx
push 0x47cbf8
mov word [esp + 0x25], cx
push edx
xor edi, edi
mov byte [esp + 0x1c], bl
mov byte [esp + 0x2b], cl
call fcn.0041198f
add esp, 0xc
lea eax, [esp + 0x24]
mov dword [esp + 0x24], ebx
push eax
push 0x2001f
push ebx
push str.SOFTWARETECOcular.3ShareDataPID
push SysFreeString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x409f5e
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x409f5e
lea ecx, [esp + 0x28]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push ecx
lea edx, [esp + 0x14]
push ebx
push edx
lea ecx, [esp + 0x20]
push ebx
push ecx
push eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x44], ebx
call esi
test eax, eax
jne 0x409f52
cmp dword [esp + 0x10], 1
jne 0x409f52
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x30]
cmp edx, eax
ja 0x409f52
mov edx, dword [esp + 0x28]
lea eax, [esp + 0x2c]
push eax
push ebp
push ebx
lea ecx, [esp + 0x20]
push ebx
push ecx
push edx
call esi
test eax, eax
jne 0x409f52
mov edi, 1
mov eax, dword [esp + 0x28]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 0x14
ret 0xc
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 0xc

Function at 0x40a760
Capabilities:
Copy file
Delete file

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
push esi
test ebp, ebp
push edi
je 0x40a80a
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
je 0x40a80a
add esi, 2
push esi
call fcn.0045e1f2
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40a80a
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, 6
lea edi, [esp + 0x14]
mov dword [esp + 0x10], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
stosw word es:[edi], ax
push ecx
mov dword [esp + 0x18], 3
mov dword [esp + 0x1c], ebx
mov word [esp + 0x24], 0x614
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
push ebx
call fcn.0045e21b
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x40a820
Capabilities:
Check if file exists
Create directory
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push esi
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a850
test al, 0x10
jne 0x40a868
test al, 1
je 0x40a849
and al, 0xfe
push eax
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
call fcn.004444d0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40a865
pop edi
pop esi
pop ebx
ret
push esi
call edi
mov ecx, dword [esp + 0x14]
cmp eax, ecx
je 0x40a874
push ecx
push esi
call ebx
pop edi
pop esi
mov eax, 1
pop ebx
ret

Function at 0x40aaa0
Capabilities:
Copy file

Disassembly:
mov eax, dword [esp + 8]
mov ecx, dword [esp + 4]
sub esp, 0x208
lea edx, [esp + 0x104]
push eax
push ecx
push 0x47c054
push edx
call fcn.0041198f
mov eax, dword [esp + 0x228]
mov ecx, dword [esp + 0x224]
add esp, 0x10
lea edx, [esp]
push eax
push ecx
push 0x47c054
push edx
call fcn.0041198f
add esp, 0x10
lea eax, [esp]
lea ecx, [esp + 0x104]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
add esp, 0x208
ret

Function at 0x40ad00
Capabilities:
Query or enumerate registry value

Disassembly:
mov eax, dword [esp + 8]
push ebx
push ebp
push esi
test eax, eax
push edi
je 0x40ad23
mov ebp, dword [esp + 0x14]
push 0x20019
push eax
push ebp
call fcn.0040acc0
add esp, 0xc
mov esi, eax
jmp 0x40ad29
mov ebp, dword [esp + 0x14]
mov esi, ebp
test esi, esi
je 0x40adab
mov edi, dword [esp + 0x1c]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push eax
push 0
push ecx
push 0
push edi
push esi
call ebx
test eax, eax
jne 0x40ad9e
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x40ad65
cmp eax, 2
je 0x40ad65
cmp eax, 6
je 0x40ad65
cmp eax, 7
jne 0x40ad9e
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x14]
cmp edx, eax
jb 0x40ad9e
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x14]
push eax
push ecx
push 0
push 0
push edi
push esi
call ebx
test eax, eax
jne 0x40ad9e
cmp esi, ebp
je 0x40ad94
push esi
call fcn.0040acf0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
ret
cmp esi, ebp
je 0x40adab
push esi
call fcn.0040acf0
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x40adc0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x214
push ebx
push esi
push edi
xor bl, bl
mov ecx, 0x43
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], bl
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
lea eax, [esp + 0xc]
push 0x104
push eax
push 0x47c870
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push SysFreeString
call fcn.0040ad00
lea edi, [esp + 0x20]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x40ae9b
mov ecx, 0x40
lea edi, [esp + 0x11d]
mov byte [esp + 0x11c], bl
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea ecx, [esp + 0x120]
push ecx
stosb byte es:[edi], al
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, str.Program_FilesCommon_Files
or ecx, 0xffffffff
xor eax, eax
mov byte [esp + 0x11e], bl
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x11c]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0xc]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x11c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0xb], 0x5c
je 0x40aede
mov edi, 0x47c8d4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x47cd2c
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x228]
mov edx, dword [esp + 0x224]
mov ecx, ebx
and ecx, 3
dec eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0xc]
push eax
push ecx
push edx
call fcn.0041137e
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x214
ret
Function at 0x40af40
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x46a9c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
mov eax, dword [0x48014c]
push ebx
push esi
mov dword [esp + 0xc], eax
xor ebx, ebx
mov dword [esp + 8], eax
mov dword [esp + 0x38], ebx
push str.tpacketv.sys
mov byte [esp + 0x3c], 1
call fcn.0040a880
push eax
lea eax, [esp + 0x14]
push str._sdrivers_s
push eax
call fcn.0045bca4
add esp, 0x10
push str.baktpktv.sys
call fcn.0040a8b0
push eax
lea ecx, [esp + 0x10]
push 0x47c054
push ecx
call fcn.0045bca4
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
add esp, 0x10
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
xor esi, esi
mov ecx, dword [esp + esi + 0x28]
push ecx
lea ecx, [esp + 0x18]
call fcn.004289e0
mov eax, dword [esp + 0x14]
push ebx
lea edx, [esp + 0x24]
push ebx
push edx
push eax
mov byte [esp + 0x48], 2
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
call fcn.00404810
add esp, 0x10
lea ecx, [esp + 0x20]
push 0xffffffffffffffff
push ecx
lea ecx, [esp + 0x18]
call fcn.0045c163
lea edx, [esp + 0x10]
push edx
call fcn.0040a750
mov eax, dword [esp + 0x14]
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + esi + 0x18], eax
mov byte [esp + 0x38], 1
call fcn.00429360
add esi, 4
cmp esi, 8
jb 0x40afc6
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
cmp ecx, eax
je 0x40b04f
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 8]
push ebx
push edx
push eax
call fcn.00406a90
add esp, 0xc
call fcn.0040e050
test eax, eax
je 0x40b06b
call fcn.0040df50
test eax, eax
jne 0x40b066
call fcn.0040e150
call fcn.0040e0a0
lea ecx, [esp + 8]
mov byte [esp + 0x38], bl
call fcn.0045db21
lea ecx, [esp + 0xc]
mov dword [esp + 0x38], 0xffffffff
call fcn.0045db21
mov ecx, dword [esp + 0x30]
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x34
ret
Function at 0x40b100
Capabilities:
Modify service
Query service configuration

Disassembly:
sub esp, 0x80c
push ebx
push edi
xor edi, edi
push 0xf003f
push edi
push edi
mov dword [esp + 0x14], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0xc], ebx
je 0x40b21d
mov eax, dword [esp + 0x818]
push esi
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
je 0x40b20a
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ebp
stosw word es:[edi], ax
push ecx
lea edx, [esp + 0x20]
push 0x400
push edx
push esi
mov dword [esp + 0x28], 0
stosb byte es:[edi], al
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x40b1fe
mov ebx, dword [esp + 0x824]
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x830]
mov ebp, dword [esp + 0x82c]
cmp eax, ebx
jne 0x40b1d8
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x828]
cmp eax, ecx
jne 0x40b1d8
test ebp, ebp
je 0x40b1c2
mov ecx, dword [esp + 0x28]
push ebp
push ecx
call fcn.004110de
add esp, 8
test eax, eax
jne 0x40b1d8
test edi, edi
je 0x40b1fa
mov edx, dword [esp + 0x2c]
push edi
push edx
call fcn.004110de
add esp, 8
test eax, eax
je 0x40b1fa
mov eax, dword [esp + 0x828]
push 0
push 0
push 0
push 0
push 0
push edi
push ebp
push 0xffffffffffffffff
push eax
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [esp + 0x10]
pop ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop esi
pop edi
pop ebx
add esp, 0x80c
ret
mov eax, edi
pop edi
pop ebx
add esp, 0x80c
ret