joyce8/EMBER2024-capa huggingface dataset:
Function at 0x408f30
Capabilities:
Parse pe header

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffedc
mov ebp, ecx
mov esi, edx
mov edi, eax
xor ebx, ebx
push 0x1c
lea eax, [esp + 4]
push eax
push edi
call sub.kernel32.dll_VirtualQuery
cmp eax, 0x1c
jne 0x408fac
cmp dword [esp + 0x10], 0x1000
jne 0x408fac
cmp dword [esp + 4], 0
je 0x408fac
push 0x104
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0xc]
push eax
call sub.kernel32.dll_GetModuleFileNameA
test eax, eax
je 0x408fac
mov eax, dword [esp + 4]
mov dword [esi], eax
mov eax, dword [esi]
cmp word [eax], 0x5a4d
jne 0x408fac
mov eax, dword [esi]
mov edx, dword [esi]
add edx, 0x3c
add eax, dword [edx]
cmp dword [eax], 0x4550
jne 0x408fac
mov edx, dword [esi]
add edx, dword [eax + 0x78]
mov dword [ebp], edx
cmp dword [ebp], 0
setne bl
mov eax, ebx
add esp, 0x124
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40bc64
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
mov byte [ebp - 1], al
xor eax, eax
push ebp
push 0x40bd1d
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea edx, [ebp - 0xc]
mov eax, 0x40bd34
call fcn.004059fc
push dword [ebp - 0xc]
push 0x40bd48
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov edx, dword [eax - 4]
mov cl, byte [ebp - 1]
mov eax, 0x40bd54
call fcn.0040bb28
push dword [ebp - 0x10]
lea eax, [ebp - 8]
mov edx, 3
call fcn.00403760
push 0xffffffffffffffff
mov eax, dword [ebp - 8]
call fcn.004038a0
push eax
call fcn.0040ba38
mov esi, eax
test esi, esi
je 0x40bd02
push 0
push 0
push 0
push 4
push esi
call sub.kernel32.dll_MapViewOfFile
test eax, eax
je 0x40bcfc
mov edx, dword [ebp + 8]
mov edx, dword [edx + 8]
mov ecx, dword [eax]
mov dword [edx - 4], ecx
push eax
call sub.kernel32.dll_UnmapViewOfFile
mov bl, 1
push esi
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40bd24
lea eax, [ebp - 0x10]
mov edx, 3
call fcn.00403540
ret

Function at 0x40bfa4
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffe4
mov edi, eax
xor esi, esi
call sub.kernel32.dll_GetVersion_1
test eax, 0x80000000
jne 0x40c015
mov ebx, 0x5f040000
jmp 0x40c003
cmp dword [esp + 0x10], 0x10000
jne 0x40bfe1
push 0x40
push 0x2000
push edi
mov eax, dword [esp + 0xc]
push eax
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
jmp 0x40c015
cmp dword [esp + 0xc], 0x10000
jae 0x40bff5
mov dword [esp + 0xc], 0x10000
jmp 0x40bffd
and dword [esp + 0xc], 0xffff0000
mov eax, dword [esp + 0xc]
add ebx, eax
push 0x1c
lea eax, [esp + 4]
push eax
push ebx
call sub.kernel32.dll_VirtualQuery
cmp eax, 0x1c
je 0x40bfc1
push 0x40
push 0x1000
push edi
push esi
call sub.kernel32.dll_VirtualAlloc_1
mov esi, eax
mov eax, esi
add esp, 0x1c
pop edi
pop esi
pop ebx
ret

Function at 0x40c17c
Capabilities:
Packed with generic packer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
pushal
pushfd
xor ebx, ebx
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x20], 0
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [0x413a40]
cmp eax, 0x1c
jne 0x40c1f7
cmp dword [ebp - 0xc], 0x1000
jne 0x40c1f2
cmp dword [ebp - 0x18], 0
je 0x40c1f2
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x20], eax
je 0x40c1f2
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0x10]
cmp eax, 0
jne 0x40c1d1
mov eax, dword [ebp - 0x18]
cmp eax, 0x80000000
jae 0x40c1f7
push 2
lea eax, [ebp - 0x1c]
push eax
mov eax, dword [ebp - 0x18]
push eax
call dword [0x413a10]
cmp eax, 0
je 0x40c1f2
push edi
push esi
mov eax, dword [ebp - 0x18]
push eax
call dword [0x413a58]
add ebx, dword [ebp - 0x10]
jmp 0x40c193
popfd
popal
add esp, 0x20
pop ebp
ret 0xc
Function at 0x411474
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
xor eax, eax
push ebp
push 0x4115ff
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 4]
push eax
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
je 0x4115e4
xor eax, eax
push ebp
push 0x4115dd
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 3
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_GetTokenInformation
cmp dword [ebp - 8], 0
je 0x4115c6
mov eax, dword [ebp - 8]
add eax, eax
push eax
push 0x40
call sub.kernel32.dll_LocalAlloc_2
mov ebx, eax
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 8]
add eax, eax
push eax
push ebx
push 3
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_GetTokenInformation
test eax, eax
je 0x4115c0
lea eax, [ebp - 0x10]
push eax
lea edx, [ebp - 0x1c]
mov eax, 0x411618
call fcn.004059fc
mov eax, dword [ebp - 0x1c]
call fcn.004038a0
push eax
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
test eax, eax
jne 0x41153c
mov dword [ebp - 0x10], 0
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0x18]
push eax
lea edx, [ebp - 0x20]
mov eax, 0x411634
call fcn.004059fc
mov eax, dword [ebp - 0x20]
call fcn.004038a0
push eax
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
test eax, eax
jne 0x41156f
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov esi, dword [ebx]
dec esi
test esi, esi
jl 0x4115ac
inc esi
xor ecx, ecx
lea edi, [ecx + ecx*2]
mov eax, dword [ebx + edi*4 + 4]
mov edx, dword [ebx + edi*4 + 8]
cmp edx, dword [ebp - 0xc]
jne 0x41158c
cmp eax, dword [ebp - 0x10]
je 0x4115a8
lea eax, [ecx + ecx*2]
mov edx, dword [ebx + eax*4 + 8]
mov eax, dword [ebx + eax*4 + 4]
cmp edx, dword [ebp - 0x14]
jne 0x4115a1
cmp eax, dword [ebp - 0x18]
je 0x4115a8
or dword [ebx + edi*4 + 0xc], 2
inc ecx
dec esi
jne 0x411579
push 0
push 0
mov eax, dword [ebp - 8]
push eax
push ebx
push 0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
push ebx
call sub.kernel32.dll_LocalFree_2
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4115e4
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_CloseHandle
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x411606
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.00403540
ret
Function at 0x4122b8
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov ecx, 6
push 0
push 0
dec ecx
jne 0x4122c0
push ebx
push esi
push edi
xor eax, eax
push ebp
push 0x4124e1
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x4122ea
cmp dword [0x413b20], 0
jne 0x4122ff
push 0
call sub.kernel32.dll_GetModuleHandleA
mov dword [0x413b20], eax
lea eax, [ebp - 0x18]
push eax
call sub.kernel32.dll_GetSystemTime
lea edx, [ebp - 0x20]
movzx eax, word [ebp - 0x18]
call fcn.004117a4
push dword [ebp - 0x20]
lea edx, [ebp - 0x24]
movzx eax, word [ebp - 0x16]
call fcn.004117a4
push dword [ebp - 0x24]
lea edx, [ebp - 0x28]
movzx eax, word [ebp - 0x18]
call fcn.004117a4
push dword [ebp - 0x28]
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00403760
mov eax, dword [ebp - 0x1c]
call fcn.004038a0
push eax
push 0
push 0xf001f
call sub.kernel32.dll_OpenFileMappingA
mov dword [0x413b1c], eax
cmp dword [0x413b1c], 0
jne 0x412371
push 0
call sub.kernel32.dll_ExitProcess_1
push 0
push 0
push 0
push 0xf001f
mov eax, dword [0x413b1c]
push eax
call sub.kernel32.dll_MapViewOfFile
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3ec]
mov dword [0x413b1c], eax
push 0x413b28
push 0x40
push 4
mov eax, dword [0x413b1c]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [0x413b1c]
mov dx, 0xe990
mov word [eax], dx
push 0x413b28
mov eax, dword [0x413b28]
push eax
push 4
mov eax, dword [0x413b1c]
push eax
call sub.kernel32.dll_VirtualProtect
lea eax, [ebp - 8]
mov edx, dword [ebp - 4]
mov ecx, 0x1f5
call fcn.00403688
xor eax, eax
push ebp
push 0x41240b
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 8]
call fcn.004038a0
push eax
call sub.kernel32.dll_LoadLibraryA
mov dword [0x413b1c], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x41241c
cmp dword [0x413b1c], 0
jne 0x41242c
push 0
call sub.kernel32.dll_ExitProcess_1
xor eax, eax
call fcn.00404950
or ax, 1
movzx eax, ax
push eax
mov eax, dword [0x413b1c]
push eax
call sub.kernel32.dll_GetProcAddress
mov esi, eax
mov ebx, esi
test esi, esi
jne 0x412457
push 0
call sub.kernel32.dll_ExitProcess_1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x3f0]
mov dword [0x413b28], eax
lea edx, [ebp - 0x2c]
mov eax, dword [ebp - 4]
movzx eax, byte [eax + 0x3ea]
call fcn.004117a4
mov eax, dword [ebp - 0x2c]
push eax
lea eax, [ebp - 0x30]
mov edx, dword [ebp - 4]
add edx, 0x1f5
mov ecx, 0x1f5
call fcn.00403688
mov ecx, dword [ebp - 0x30]
lea eax, [ebp - 8]
pop edx
call fcn.004036ec
mov eax, dword [ebp - 8]
push eax
call ebx
mov eax, dword [0x413b1c]
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x4124be
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4124e8
lea eax, [ebp - 0x30]
mov edx, 6
call fcn.00403540
lea eax, [ebp - 8]
call fcn.0040351c
ret
Function at 0x401000
Capabilities:
Create service

Disassembly:
mov eax, dword [esp + 0xc]
push 0
push 0
push 0
mov ecx, dword [esp + 0x10]
push 0
push 0
push eax
mov eax, dword [esp + 0x20]
push 1
push 3
push 0x10
push 0xf01ff
push eax
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
test eax, eax
jne 0x401030
ret
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
ret

Function at 0x401040
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov ebx, eax
mov eax, dword [0x40ab38]
test eax, eax
je 0x40105f
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x28]
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
mov dword [0x40ab38], eax
jne 0x401083
pop esi
pop ebx
add esp, 0x1c
ret
push ebp
push edi
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x4010a1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x4010e1
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov edi, 1
mov eax, dword [0x40ab38]
lea edx, [esp + 0x10]
push edx
push eax
call ebp
test eax, eax
je 0x4010e1
mov eax, dword [esp + 0x14]
cmp eax, 4
je 0x4010e3
cmp eax, 1
je 0x4010e1
call esi
sub eax, ebx
cmp eax, 0xea60
jbe 0x4010ac
push 0x41d
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [0x40ab38]
mov esi, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
mov dword [0x40ab38], 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x401120
Capabilities:
Check for time delay via gettickcount
Query service status
Stop service

Disassembly:
sub esp, 0x1c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
push esi
call ebx
mov ecx, dword [esp + 0x2c]
mov ebp, eax
mov eax, dword [esp + 0x30]
push 0xf01ff
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401152
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
lea edx, [esp + 0xc]
push edi
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, eax
test edi, edi
je 0x401196
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401194
cmp dword [esp + 0x14], 1
je 0x401196
call ebx
sub eax, ebp
cmp eax, 0xea60
jbe 0x401167
push 0x41d
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret
Function at 0x401320
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
push ebx
push esi
push edi
push str.BINRES
push eax
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x401341
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, dword [esp + 0x14]
push 0x409088
push ecx
mov edi, eax
call fcn.00402a26
mov esi, eax
add esp, 8
test esi, esi
jne 0x40137e
pop edi
pop esi
xor al, al
pop ebx
ret
push esi
push ebx
push 1
push edi
call fcn.004028bc
push esi
call fcn.0040283f
add esp, 0x14
mov al, 1
pop edi
pop esi
pop ebx
ret

Function at 0x4013e0
Capabilities:
Connect network resource

Disassembly:
sub esp, 0x128
push esi
mov esi, dword [esp + 0x134]
mov byte [esp + 7], 0
cmp byte [esi], 0
jne 0x401402
xor al, al
pop esi
add esp, 0x128
ret
mov eax, dword [esp + 0x130]
push edi
push eax
lea ecx, [esp + 0x30]
push str._sIPC_
push ecx
call fcn.004027ac
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x18]
add esp, 0xc
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x13c]
lea edx, [esp + 0xb]
mov dword [esp + 0x1c], edx
push 0
mov dword [esp + 0x14], eax
push esi
lea edx, [esp + 0x14]
lea eax, [esp + 0x34]
push ecx
push edx
mov dword [esp + 0x28], 3
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], 0
call sub.MPR.dll_WNetAddConnection2A
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
add esp, 0x128
ret

Function at 0x401480
Capabilities:
Delete file

Disassembly:
mov al, byte [esp + 4]
sub esp, 0x104
push ebx
push ebp
push esi
xor esi, esi
test al, al
push edi
je 0x4014f2
mov eax, dword [esp + 0x120]
mov edi, dword [esp + 0x11c]
push eax
push edi
call fcn.00401290
mov ecx, dword [esp + 0x12c]
lea edx, [esp + 0x18]
push ecx
push edi
push str._sADMIN_System32_s
push edx
call fcn.004027ac
mov ebp, dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
add esp, 0x18
lea eax, [esp + 0x10]
push eax
call ebp
test eax, eax
jne 0x4014f2
call ebx
cmp eax, 5
jne 0x4014f2
push 0x64
call edi
inc esi
cmp esi, 0xa
jb 0x4014d6
mov ecx, dword [esp + 0x11c]
push ecx
call fcn.004013a0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
Function at 0x4016c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4016fa
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, dword [esp + 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.00402b5c
mov ebp, dword [esp + 0x1c]
add esp, 4
test ebp, ebp
mov ebx, eax
je 0x4017c5
cmp byte [ebp], 0
je 0x4017c5
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
push 0x3b
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00402aa0
add esp, 8
test eax, eax
je 0x401750
mov byte [eax], 0
mov edi, 0x40915c
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
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 ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4017d5
push 0x3b
push ebp
call fcn.00402aa0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x4017c5
inc ebp
jne 0x401715
push ebx
call fcn.00402a39
add esp, 4
xor al, al
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00402a39
add esp, 4
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x402640
Capabilities:
Accept command line arguments
Get hostname
Terminate process

Disassembly:
sub esp, 0x10c
push esi
push str._nPsExec_v1.21___execute_processes_remotely_n
call fcn.004027fe
push str.Copyright__C__2001_Mark_Russinovich_n
call fcn.004027fe
push str.www.sysinternals.com_n_n
call fcn.004027fe
add esp, 0xc
lea eax, [esp + 8]
mov dword [esp + 8], 0x10
push eax
push 0x40b0d0
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jb 0x4026a5
push str.PsExec_requires_Windows_NT_or_Windows_2000._n_n
call fcn.004027fe
add esp, 4
or eax, 0xffffffff
pop esi
add esp, 0x10c
ret
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
cmp byte [esp + 0x10], 0x22
jne 0x4026f0
lea edi, [esp + 0x11]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x11]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x11], al
lea ecx, [esp + 8]
push ecx
push 0x40b0e0
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
mov eax, dword [esp + 8]
pop edi
test eax, eax
je 0x402712
mov byte [eax], 0
mov edx, dword [esp + 0x118]
mov eax, dword [esp + 0x114]
push edx
push eax
call fcn.00402150
add esp, 8
test al, al
jne 0x402735
push 0xffffffffffffffff
call fcn.0040308a
mov al, byte [0x40ab4c]
test al, al
je 0x40278c
mov al, byte [0x40ac54]
test al, al
jne 0x40278c
push str.Password:
call fcn.004027fe
push 0x409b70
call fcn.00402d97
add esp, 8
xor esi, esi
call fcn.00407b86
cmp al, 0xd
je 0x402778
mov byte [esi + 0x40afc0], al
inc esi
cmp esi, 0x103
jb 0x402760
push 0x409394
mov byte [esi + 0x40afc0], 0
call fcn.004027fe
add esp, 4
call fcn.00401a10
pop esi
add esp, 0x10c
ret
Function at 0x405b45
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x40a0d8
cmp edx, dword [eax]
je 0x405b67
add eax, 8
inc ecx
cmp eax, 0x40a168
jl 0x405b58
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x40a0d8]
jne 0x405c95
mov eax, dword [0x40acb0]
cmp eax, 1
je 0x405c6f
test eax, eax
jne 0x405b98
cmp dword [0x409dd4], 1
je 0x405c6f
cmp edx, 0xfc
je 0x405c95
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405bcf
lea eax, [ebp - 0x1a4]
push 0x4084e4
push eax
call fcn.00406960
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405de0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x405c12
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405de0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4084e0
push edi
call fcn.00406ed0
add esp, 0x10
lea eax, [ebp - 0xa0]
push 0x4084c4
push eax
call fcn.00406960
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00406970
lea eax, [ebp - 0xa0]
push 0x4084c0
push eax
call fcn.00406970
push dword [esi + 0x40a0dc]
lea eax, [ebp - 0xa0]
push eax
call fcn.00406970
push 0x12010
lea eax, [ebp - 0xa0]
push 0x408498
push eax
call fcn.00406e44
add esp, 0x2c
pop edi
jmp 0x405c95
lea eax, [ebp + 8]
lea esi, [esi + 0x40a0dc]
push 0
push eax
push dword [esi]
call fcn.00405de0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x41b2e4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040acb0
mov eax, dword [0x4370f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.00418fd0
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41b326
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41b482
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00426b00
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x470e58]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.0041b70a
mov ecx, dword [esi*4 + 0x470e58]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x41b47b
cmp eax, dword [edi + ecx + 0x24]
jne 0x41b47b
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41b47b
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0041b70a
add esp, 0x14
test edx, edx
jl 0x41b47b
jg 0x41b3f1
test eax, eax
jb 0x41b47b
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41b47b
jl 0x41b40b
cmp dword [ebp - 0x1008], eax
ja 0x41b47b
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41b429
test ebx, ebx
je 0x41b462
cmp ecx, edi
jae 0x41b462
mov al, byte [ecx]
cmp al, 0xd
jne 0x41b443
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41b44f
cmp byte [ecx + 1], 0xa
jne 0x41b44f
inc ecx
jmp 0x41b44f
movzx eax, al
movsx eax, byte [eax + 0x437a30]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41b429
cmp edx, ebx
jne 0x41b429
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41b480
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00409e55
leave
ret