joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403480
Capabilities:
Delete file
Delete service
Get common file path
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x43a128]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
xor esi, esi
mov dword [ebp - 0x834], ebx
cmp byte [ebp + 8], 0
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x830], eax
je 0x4035c8
push 0xf003f
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
push edi
push eax
mov dword [ebp - 0x828], eax
call fcn.00403ab0
add esp, 8
push 0xf01ff
push edi
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
test edi, edi
je 0x4034fa
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push dword [ebp - 0x828]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x82c], 0x104
push eax
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea eax, [ebp - 0x414]
push ebx
push eax
call fcn.0040aa3e
add esp, 8
test eax, eax
jne 0x40356d
push 0x104
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x20c]
push 0x5c
push eax
call fcn.00408a04
add esp, 8
lea ebx, [ebp - 0x20c]
xor ecx, ecx
mov word [eax], cx
mov eax, str._s_s
jmp 0x403572
mov eax, str._sADMIN__s
push dword [ebp - 0x830]
push ebx
push eax
lea eax, [ebp - 0x61c]
push eax
call fcn.00403b70
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
nop word [eax + eax]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x4035c2
call ebx
cmp eax, 5
jne 0x4035c2
push 0x64
call edi
inc esi
cmp esi, 0xa
jb 0x4035a0
mov ebx, dword [ebp - 0x834]
cmp byte [0x43aaa8], 0
je 0x4035f6
push ebx
lea eax, [ebp - 0x824]
push str._sIPC_
push eax
call fcn.00403b70
add esp, 0xc
lea eax, [ebp - 0x824]
push 1
push 0
push eax
call sub.MPR.dll_WNetCancelConnection2W
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040760d
mov esp, ebp
pop ebp
ret
Function at 0x403990
Capabilities:
Check for time delay via gettickcount
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43a128]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
call ebx
mov ecx, dword [0x43aaac]
mov dword [ebp - 0x24], eax
test ecx, ecx
je 0x4039c5
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 0xf01ff
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [0x43aaac], eax
test eax, eax
jne 0x4039ec
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040760d
mov esp, ebp
pop ebp
ret
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x403a08
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
jne 0x403a54
mov esi, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push dword [0x43aaac]
mov edi, 1
call esi
test eax, eax
je 0x403a54
mov eax, dword [ebp - 0x1c]
cmp eax, 4
je 0x403a56
cmp eax, 1
je 0x403a54
call ebx
sub eax, dword [ebp - 0x24]
cmp eax, 0xea60
ja 0x403a90
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x20]
push eax
push dword [0x43aaac]
call esi
test eax, eax
jne 0x403a23
xor edi, edi
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [0x43aaac]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push esi
mov dword [0x43aaac], 0
call ebx
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040760d
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0x41d
call ebx
xor edi, edi
jmp 0x403a5c

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x43a128]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0xf01ff
push esi
push edi
mov dword [ebp - 0x24], eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
jne 0x403af4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040760d
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x20]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edi, eax
test edi, edi
je 0x403b51
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
test eax, eax
je 0x403b4e
nop dword [eax]
cmp dword [ebp - 0x1c], 1
je 0x403b50
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x24]
cmp eax, 0xea60
ja 0x403b43
lea eax, [ebp - 0x20]
push eax
push esi
call ebx
test eax, eax
jne 0x403b20
jmp 0x403b4e
push 0x41d
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor edi, edi
pop ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.0040760d
mov esp, ebp
pop ebp
ret
Function at 0x403bf0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using aes via winapi
Hash data using sha1
Hash data using sha1 via wincrypt
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0x42e0f4
call fcn.00402df0
mov edi, dword [ebp + 0xc]
add esp, 4
cmp dword [edi], 0
jne 0x403ca3
mov esi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 0
push 0x18
push 0
push 0
push edi
call esi
test eax, eax
jne 0x403ca3
push 0x42dec8
push 0x42df54
call fcn.00402df0
add esp, 8
push 8
push 0x18
push 0
push 0
push edi
call esi
test eax, eax
jne 0x403ca3
push 0x42df60
push 0x42df54
call fcn.00402df0
add esp, 8
push 0x20
push 0x18
push 0
push 0
push edi
call esi
test eax, eax
jne 0x403ca3
push 0x42dfd8
push 0x42df54
call fcn.00402df0
add esp, 8
push 0x28
push 0x18
push 0
push 0
push edi
call esi
test eax, eax
jne 0x403ca3
push 0x42e068
push 0x42df54
call fcn.00402df0
add esp, 8
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 8]
mov ebx, dword [esi]
add ebx, 0x13
push ebx
call fcn.0040ab5a
push dword [esi]
mov dword [ebp + 0xc], eax
push dword [esi + 8]
push eax
call fcn.004083e0
mov ecx, dword [esi]
add esp, 0x10
mov esi, dword [ebp + 0xc]
movups xmm0, xmmword [0x42e11c]
movups xmmword [ecx + esi], xmm0
mov ax, word [0x42e12c]
mov word [ecx + esi + 0x10], ax
mov al, byte [0x42e12e]
mov byte [ecx + esi + 0x12], al
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0x8004
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x403c9a
push 0
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
je 0x403c9a
push dword [ebp + 0x10]
push 0
push dword [ebp - 4]
push 0x6610
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_CryptDeriveKey]
pop edi
test eax, eax
pop esi
setne al
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x403e70
Capabilities:
Create new key via cryptacquirecontext

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
cmp dword [esi], 0
jne 0x403f11
mov edi, dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
push 0
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403f11
push 0x42dec8
push 0x42df54
call fcn.00402df0
add esp, 8
push 8
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403f11
push 0x42df60
push 0x42df54
call fcn.00402df0
add esp, 8
push 0x20
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403f11
push 0x42dfd8
push 0x42df54
call fcn.00402df0
add esp, 8
push 0x28
push 0x18
push 0
push 0
push esi
call edi
test eax, eax
jne 0x403f11
push 0x42e068
push 0x42df54
call fcn.00402df0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
ret
pop edi
mov eax, 1
pop esi
pop ebp
ret
Function at 0x403f20
Capabilities:
Encrypt or decrypt via wincrypt
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push 0
test ebx, ebx
jne 0x403f48
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
pop edi
mov ebx, eax
pop esi
pop ebx
pop ebp
ret
mov edi, dword [ebp + 0x18]
lea eax, [ebp + 8]
push edi
push 4
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403f7a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42e0b8
call fcn.00402df0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
push dword [ebp + 8]
call fcn.0040ab5a
add esp, 4
mov esi, eax
push 0
push edi
push dword [ebp + 8]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403fbc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42e0cc
call fcn.00402df0
push esi
call fcn.0040ab3f
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
push edi
push esi
push 0
push 1
push 0
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_CryptDecrypt]
mov ebx, eax
test ebx, ebx
je 0x403ff0
push dword [edi]
push esi
push dword [ebp + 0x10]
call fcn.004083e0
add esp, 0xc
push esi
call fcn.0040ab3f
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x42e0e0
call fcn.00402df0
add esp, 8
push esi
call fcn.0040ab3f
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x404020
Capabilities:
Encrypt or decrypt via wincrypt
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 8
push ebx
push esi
push edi
push 0
test eax, eax
jne 0x40404e
lea eax, [ebp - 8]
push eax
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop edi
mov esi, eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp + 0x14]
lea ecx, [ebp - 4]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push ecx
push 0
push 0
push 1
push 0
push dword [eax]
mov dword [ebp - 4], esi
call edi
push dword [ebp - 4]
call fcn.0040ab5a
push dword [ebp - 4]
mov ebx, eax
push dword [ebp + 0x10]
push ebx
call fcn.004083e0
add esp, 0x10
mov dword [ebp - 8], esi
lea eax, [ebp - 8]
push dword [ebp - 4]
push eax
mov eax, dword [ebp + 8]
push ebx
push 0
push 1
push 0
push dword [eax]
call edi
test eax, eax
je 0x4040dc
mov esi, dword [ebp + 0xc]
lea eax, [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
push eax
push 4
lea eax, [ebp - 4]
push eax
push esi
call edi
test eax, eax
je 0x4040dc
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
push esi
call edi
push ebx
mov esi, eax
call fcn.0040ab3f
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.0040ab3f
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4040f0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x89c
mov eax, dword [0x43a128]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x804]
mov dword [ebp - 0x874], ecx
push str.DeviceLanmanRedirector_sipc_
push eax
call fcn.00403b70
mov eax, dword [0x43aacc]
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x404150
push 0x42e15c
push 0x42e148
call edi
push eax
call esi
mov dword [0x43aacc], eax
lea ecx, [ebp - 0x804]
push ecx
lea ecx, [ebp - 0x89c]
push ecx
call eax
lea eax, [ebp - 0x89c]
mov dword [ebp - 0x894], 0x18
mov dword [ebp - 0x88c], eax
mov eax, dword [0x43aad0]
mov dword [ebp - 0x890], 0
mov dword [ebp - 0x888], 0x40
mov dword [ebp - 0x884], 0
mov dword [ebp - 0x880], 0
test eax, eax
jne 0x4041bb
push 0x42e174
push 0x42e148
call edi
push eax
call esi
mov dword [0x43aad0], eax
push 0x90
push 1
lea ecx, [ebp - 0x87c]
push ecx
lea ecx, [ebp - 0x894]
push ecx
push 0x100001
lea ecx, [ebp - 0x870]
push ecx
call eax
mov ebx, eax
test ebx, ebx
jne 0x4042d5
mov eax, dword [0x43aad4]
mov ebx, dword [ebp - 0x870]
mov dword [ebp - 0x824], 6
mov dword [ebp - 0x820], 2
test eax, eax
jne 0x40421f
push 0x42e180
push 0x42e148
call edi
push eax
call esi
mov dword [0x43aad4], eax
push 0x44
lea ecx, [ebp - 0x86c]
push ecx
push 0x24
lea ecx, [ebp - 0x828]
push ecx
push 0x1401a3
lea ecx, [ebp - 0x87c]
push ecx
push 0
push 0
push 0
push ebx
call eax
mov ebx, eax
test ebx, ebx
jne 0x40425c
mov eax, dword [ebp - 0x874]
movups xmm0, xmmword [ebp - 0x840]
movups xmmword [eax], xmm0
mov eax, dword [ebp - 0x870]
mov dword [ebp - 0x874], eax
mov eax, dword [0x43aad4]
mov dword [ebp - 0x824], 6
mov dword [ebp - 0x820], 1
test eax, eax
jne 0x404299
push 0x42e180
push 0x42e148
call edi
push eax
call esi
mov dword [0x43aad4], eax
push 0
push 0
push 0x24
lea ecx, [ebp - 0x828]
push ecx
push 0x1401ac
lea ecx, [ebp - 0x87c]
push ecx
push 0
push 0
push 0
push dword [ebp - 0x874]
call eax
cmp eax, 0x103
jne 0x4042d5
push 0xffffffffffffffff
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x870]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x43aac8]
test eax, eax
jne 0x4042fe
push 0x42e130
push 0x42e148
call edi
push eax
call esi
mov dword [0x43aac8], eax
push ebx
call eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040760d
mov esp, ebp
pop ebp
ret
Function at 0x404420
Capabilities:
Copy file
Get file version info
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 0x14]
xor eax, eax
push esi
mov esi, dword [ebp + 0xc]
xorps xmm0, xmm0
push edi
mov dword [ebp + 0xc], eax
movlpd qword [ebp - 8], xmm0
movlpd qword [ebp - 0x1c], xmm0
mov byte [ebx], al
call fcn.00402930
mov edi, dword [ebp + 8]
push edi
push 0x460a80
push 0x42e214
call fcn.00402e90
push 0x5c
push 0x460a80
call fcn.00408a04
add esp, 0x14
mov dword [esi], eax
test eax, eax
jne 0x404477
mov eax, 0x460a80
jmp 0x40447a
add eax, 2
push eax
push edi
mov edi, dword [ebp + 0x10]
push str._sADMIN__s
push edi
mov dword [esi], eax
call fcn.00403b70
add esp, 0x10
cmp byte [0x43fef4], 0
je 0x404599
lea eax, [ebp - 0x10]
mov byte [0x43aadf], 1
push eax
push edi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
push esi
call fcn.0040ab5a
add esp, 4
mov ebx, eax
mov dword [ebp - 0x14], ebx
push ebx
push esi
push 0
push edi
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404516
mov ecx, dword [ebx + 0x30]
xor eax, eax
or eax, dword [ebx + 0x34]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
push 0x460a80
mov dword [ebp - 0xc], ecx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
push esi
call fcn.0040ab5a
add esp, 4
mov ebx, eax
mov dword [ebp + 0xc], ebx
push ebx
push esi
push 0
push 0x460a80
call sub.VERSION.dll_GetFileVersionInfoW
test eax, eax
je 0x404522
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebx + 0x30]
or esi, dword [eax + 0x34]
jmp 0x404528
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov esi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x404538
push eax
call fcn.0040ab3f
add esp, 4
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x404548
push eax
call fcn.0040ab3f
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, ecx
mov edx, dword [ebp - 0xc]
or eax, edx
je 0x40455e
cmp edx, ebx
ja 0x4045b0
jb 0x40455e
cmp ecx, esi
jae 0x4045b0
lea eax, [ebp - 0x24]
push eax
push edi
call fcn.00404cd0
add esp, 8
test al, al
je 0x404596
lea eax, [ebp - 0x2c]
push eax
push 0x460a80
call fcn.00404cd0
add esp, 8
test al, al
je 0x404596
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x28]
ja 0x4045b0
jb 0x404596
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0x2c]
jae 0x4045b0
mov ebx, dword [ebp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CopyFileW]
push 1
push edi
push 0x460a80
call esi
test eax, eax
je 0x4045b9
mov byte [ebx], 1
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [0x43aadf], 0
je 0x4045dc
push 0x80
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0
push edi
push 0x460a80
call esi
test eax, eax
jne 0x4045b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
je 0x4045b0
call fcn.00402930
push 0x460a80
push str._rError_copying__s_to_remote_system:_n
push 2
call fcn.0040af7e
add esp, 4
push eax
call fcn.00402180
push esi
call fcn.00402e00
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404620
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x10], 0
mov dword [ebp - 4], 0
call fcn.00403e70
add esp, 4
test eax, eax
jne 0x404655
call fcn.00402930
push str._rError_initializing_crypto:_n
jmp 0x404750
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xc]
push 0
push eax
push 4
lea eax, [ebp - 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40467e
call fcn.00402930
push str._rError_reading_public_key_length_from_PsExec_services:_n
jmp 0x404750
push dword [ebp - 8]
call fcn.0040ab5a
add esp, 4
mov dword [ebp - 4], eax
lea ecx, [ebp - 0xc]
push 0
push ecx
push dword [ebp - 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4046b0
call fcn.00402930
push str._rError_reading_public_key_from_PsExec_service:_n
jmp 0x404750
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push 0
push dword [edi]
call fcn.00403e50
add esp, 0x14
test eax, eax
jne 0x4046d6
call fcn.00402930
push str._rError_importing_public_key:_n
jmp 0x404750
push dword [ebp - 4]
call fcn.0040ab3f
lea eax, [ebp - 8]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 0x10]
push 0x6610
push dword [ebp - 0x10]
push dword [edi]
call fcn.00403d70
add esp, 0x1c
test eax, eax
jne 0x404712
call fcn.00402930
push str._rError_generation_session_key:_n
jmp 0x404750
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push 0
push eax
push 4
lea eax, [ebp - 8]
push eax
push esi
call edi
test eax, eax
je 0x404746
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push dword [ebp - 4]
push esi
call edi
test eax, eax
je 0x404746
pop edi
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00402930
push str._rError_sending_session_key_to_PsExec_service:_n
push 2
call fcn.0040af7e
add esp, 4
push eax
call fcn.00402180
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00402e00
mov eax, dword [ebp - 0x10]
add esp, 4
test eax, eax
je 0x404780
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov eax, dword [ebp - 4]
test eax, eax
je 0x404790
push eax
call fcn.0040ab3f
add esp, 4
pop edi
xor al, al
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x404b50
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404b87
mov ecx, dword [ebp + 0x14]
sub ecx, esi
nop dword [eax]
movzx eax, word [esi]
lea esi, [esi + 2]
mov word [ecx + esi - 2], ax
test ax, ax
jne 0x404b70
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404b90
mov eax, dword [ebp + 0x10]
sub ecx, edx
sar ecx, 1
add eax, ecx
push ebx
push edi
lea eax, [eax*2 + 4]
push eax
call fcn.0040ab5a
mov ebx, dword [ebp + 0xc]
add esp, 4
mov edi, eax
mov dword [ebp - 4], edi
test ebx, ebx
je 0x404c86
cmp word [ebx], 0
je 0x404c86
mov edx, edi
mov eax, ebx
sub edx, ebx
nop word [eax + eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x404be0
push 0x3b
push edi
call fcn.00408954
add esp, 8
test eax, eax
je 0x404c04
xor ecx, ecx
mov word [eax], cx
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x404c10
mov eax, dword [0x42e210]
mov edx, esi
mov dword [edi], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x404c25
mov edi, dword [ebp - 4]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x404c40
mov ecx, edx
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 [ebp - 4]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x404c98
push 0x3b
push ebx
call fcn.00408954
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x404c86
mov esi, dword [ebp + 8]
add ebx, 2
jne 0x404bc6
push edi
call fcn.0040ab3f
add esp, 4
xor al, al
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x14]
mov ecx, edi
sub edx, edi
nop
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x404ca0
push edi
call fcn.0040ab3f
add esp, 4
mov al, 1
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x407f44
Capabilities:
Parse pe header

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

Function at 0x4195ae
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x43354c
push 0x433544
push 0x430ddc
push 0x1f
call fcn.0041944c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4195e2
push dword [ebp + 8]
mov ecx, esi
call dword [0x4272e0]
call esi
jmp 0x4195e8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41962c
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x43355c
push 0x433554
push 0x430e00
push 0x21
call fcn.0041944c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x419663
push dword [ebp + 8]
mov ecx, esi
call dword [0x4272e0]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41966b
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x433564
push 0x43355c
push 0x430e14
push 0x22
call fcn.0041944c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4196a5
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4272e0]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]