joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413880
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x88c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
test edi, edi
jne 0x4138b1
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
cmp word [edi], 0
je 0x41389f
push edi
push str.RemoveInstanceMPUSBSTR_pInstanceId___s_n
call fcn.00415550
push 0x802
lea eax, [ebp - 0x808]
push 0
push eax
call fcn.0053e550
push str.MPUSBSTRDISK
lea ecx, [ebp - 0x808]
push 0x401
push ecx
call fcn.0053eeab
push 0x56825c
lea edx, [ebp - 0x808]
push 0x401
push edx
call fcn.0053e396
push edi
lea eax, [ebp - 0x808]
push 0x401
push eax
call fcn.0053e396
lea ecx, [ebp - 0x808]
push ecx
push str.RemoveInstanceMPUSBSTR_TargetDeviceId___s_n
call fcn.00415550
lea eax, [ebp - 0x808]
add esp, 0x40
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413930
push esi
sub eax, edx
sar eax, 1
push 0x90
lea edx, [eax + eax + 2]
push str.delstr9x.cpp
push edx
call fcn.0043e4e0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x41396e
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x808]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413977
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0x808]
push ecx
inc eax
push eax
push esi
call fcn.00413440
push esi
push str.ChildInstanceId___s__n
call fcn.00415550
push ebx
push esi
call fcn.00413500
push esi
call fcn.0043e500
push str.ENUM
lea edx, [ebp - 0x808]
push 0x401
push edx
call fcn.0053eeab
push 0x56825c
lea eax, [ebp - 0x808]
push 0x401
push eax
call fcn.0053e396
push str.MPUSBSTRDISK
lea ecx, [ebp - 0x808]
push 0x401
push ecx
call fcn.0053e396
add esp, 0x48
push 0x56825c
lea edx, [ebp - 0x808]
push 0x401
push edx
call fcn.0053e396
push edi
lea eax, [ebp - 0x808]
push 0x401
push eax
call fcn.0053e396
lea ecx, [ebp - 0x808]
push ecx
push str.Remove_instance_id_key___s
call fcn.00415550
add esp, 0x20
push 3
lea eax, [ebp - 0x808]
lea edx, [ebp - 0x888]
push eax
lea ecx, [ebp - 0x88c]
mov dword [ebp - 0x88c], edx
call fcn.0040b3a0
mov ecx, dword [ebp - 0x88c]
push 0
push 0
push 0
push ecx
push 0x10001
call ebx
mov eax, dword [ebp - 0x88c]
lea edx, [ebp - 0x888]
cmp eax, edx
je 0x413a7c
push eax
call fcn.0053f854
add esp, 4
push str.ENUM
lea eax, [ebp - 0x808]
push 0x401
push eax
call fcn.0053eeab
push 0x56825c
lea ecx, [ebp - 0x808]
push 0x401
push ecx
call fcn.0053e396
push str.MPUSBSTR
lea edx, [ebp - 0x808]
push 0x401
push edx
call fcn.0053e396
lea eax, [ebp - 0x808]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00414480
add esp, 0x2c
test eax, eax
jne 0x413b00
lea ecx, [ebp - 0x808]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00413490
add esp, 8
test eax, eax
jne 0x413b00
lea edx, [ebp - 0x808]
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov ecx, dword [ebp - 4]
pop esi
pop edi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x413de0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x11c
lea eax, [ebp - 0x234]
push 0
push eax
call fcn.0053e550
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea ecx, [ebp - 0x234]
push ecx
mov dword [ebp - 0x234], 0x11c
call esi
test eax, eax
je 0x413e48
mov eax, dword [ebp - 0x230]
cmp eax, 5
jbe 0x413e46
mov eax, 0xc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
je 0x413e32
push 0x114
lea edx, [ebp - 0x118]
push 0
push edx
call fcn.0053e550
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call esi
test eax, eax
jne 0x413e86
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x108]
dec eax
je 0x413ec3
dec eax
jne 0x413e75
cmp dword [ebp - 0x114], 4
jne 0x413eaf
mov eax, 0xb
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, 0xa
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x110], 0
mov eax, 2
ja 0x413ed6
mov eax, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x413ef0
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x11c
lea eax, [ebp - 0x234]
push 0
push eax
call fcn.0053e550
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0xc
lea ecx, [ebp - 0x234]
push ecx
mov dword [ebp - 0x234], 0x11c
call esi
test eax, eax
je 0x413f92
mov eax, dword [ebp - 0x230]
cmp eax, 5
jbe 0x413f56
mov eax, 0xd
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
jne 0x413f92
mov ecx, dword [ebp - 0x22c]
mov eax, ecx
sub eax, 0
je 0x413f7e
dec eax
je 0x413f42
cmp ecx, 1
ja 0x413f42
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, 0xc
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push 0x114
lea edx, [ebp - 0x118]
push 0
push edx
call fcn.0053e550
add esp, 0xc
lea eax, [ebp - 0x118]
push eax
mov dword [ebp - 0x118], 0x114
call esi
test eax, eax
je 0x413f6d
mov eax, dword [ebp - 0x108]
dec eax
je 0x413ffc
dec eax
jne 0x413f6d
cmp dword [ebp - 0x114], 4
jne 0x413fe8
mov eax, 0xb
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, 0xa
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x110]
test eax, eax
je 0x41405a
cmp eax, 0xa
je 0x414028
cmp eax, 0x5a
jne 0x413f6d
mov eax, 3
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
cmp word [ebp - 0x102], 0x41
jne 0x414046
mov eax, 0xc9
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov eax, 2
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov ax, word [ebp - 0x102]
cmp ax, 0x43
je 0x414072
cmp ax, 0x42
mov eax, 1
jne 0x414077
mov eax, 0x65
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x414200
Capabilities:
Delete file
Get common file path
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x20a
lea eax, [ebp - 0x41c]
push 0
push eax
call fcn.0053e550
push 0x20a
lea ecx, [ebp - 0x210]
push 0
push ecx
call fcn.0053e550
add esp, 0x18
push 0x105
lea edx, [ebp - 0x41c]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
je 0x414322
push esi
push edi
push str.inf
lea eax, [ebp - 0x41c]
push 0x105
push eax
call fcn.0053e396
push 0x56825c
lea ecx, [ebp - 0x41c]
push 0x105
push ecx
call fcn.0053e396
lea edx, [ebp - 0x41c]
push edx
lea eax, [ebp - 0x210]
push 0x105
push eax
call fcn.0053eeab
push str.drvdata.bin
lea ecx, [ebp - 0x210]
push 0x105
push ecx
call fcn.0053e396
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add esp, 0x30
push 0x80
lea edx, [ebp - 0x210]
push edx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [ebp - 0x210]
push eax
call edi
lea ecx, [ebp - 0x41c]
push ecx
lea edx, [ebp - 0x210]
push 0x105
push edx
call fcn.0053eeab
push str.drvidx.bin
lea eax, [ebp - 0x210]
push 0x105
push eax
call fcn.0053e396
add esp, 0x18
push 0x80
lea ecx, [ebp - 0x210]
push ecx
call esi
lea edx, [ebp - 0x210]
push edx
call edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x414330
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
xor ebx, ebx
lea eax, [ebp - 0x10]
push eax
push ebx
push 8
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov word [ebp - 8], 0x500
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenThreadToken]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x414399
call esi
cmp eax, 0x3f0
jne 0x414463
lea ecx, [ebp - 0x10]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x414463
mov eax, dword [ebp - 0x10]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
lea edx, [ebp - 0x18]
push edx
push ebx
push ebx
push 2
push eax
call edi
test eax, eax
jne 0x414462
call esi
cmp eax, 0x7a
jne 0x414462
mov ecx, dword [ebp - 0x18]
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x414462
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
lea edx, [ebp - 0x18]
push edx
push eax
push esi
push 2
push ecx
call edi
test eax, eax
je 0x414462
lea edx, [ebp - 0x1c]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x414462
xor edi, edi
cmp dword [esi], ebx
jbe 0x414448
lea ebx, [esi + 4]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebx]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x41443e
inc edi
add ebx, 8
cmp edi, dword [esi]
jb 0x414423
jmp 0x414445
mov dword [ebp - 0x14], 1
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_FreeSid]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
mov ecx, dword [ebp - 4]
pop esi
mov eax, ebx
xor ecx, ebp
pop ebx
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x4146b0
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x556c0b
mov eax, dword fs:[0]
push eax
sub esp, 0x2cc
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x2d4]
call fcn.004489d0
cmp dword [ebp - 0x2d0], 0
mov dword [ebp - 4], 0
je 0x41473c
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
je 0x4147db
lea ecx, [ebp - 0x2d4]
mov dword [ebp - 4], 0xffffffff
call fcn.004488b0
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x2d8]
push eax
push 0x28
mov dword [ebp - 0x2d8], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4147ea
lea ecx, [ebp - 0x1c]
push ecx
push str.SeShutdownPrivilege
push 0
mov dword [ebp - 0x20], 1
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueW]
mov eax, dword [ebp - 0x2d8]
mov esi, dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push 0
push 0
push 0
lea edx, [ebp - 0x20]
push edx
push 0
push eax
mov dword [ebp - 0x14], 2
call esi
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov edx, dword [ebp - 0x2d8]
push 0
push 0
push 0
lea ecx, [ebp - 0x20]
push ecx
push 0
push edx
mov edi, eax
mov dword [ebp - 0x14], 0
call esi
mov eax, dword [ebp - 0x2d8]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
jne 0x41470a
push str.RestartWindows_ExitWindowsEx_failed._n
push 2
call fcn.00403ab0
add esp, 8
lea ecx, [ebp - 0x2d4]
mov dword [ebp - 4], 0xffffffff
call fcn.004488b0
xor eax, eax
jmp 0x414721
Function at 0x414810
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
xor ebx, ebx
call edi
push esi
cmp eax, 0xffffffff
jne 0x414840
push str.IsFileUsingByExclusive__1_is_not_found._n
push 4
call fcn.00403ab0
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret
call edi
cmp eax, 0xffffffff
je 0x414865
push esi
call edi
test al, 0x10
je 0x414865
push esi
push str.IsFileUsingByExclusive__1_is_directory._n
push 4
call fcn.00403ab0
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
pop ebp
ret
push esi
call edi
mov ebx, eax
test bl, 1
je 0x4148aa
push esi
push str.IsFileUsingByExclusive:___1_s___has_FILE_ATTRIBUTE_READONLY._n
push 4
call fcn.00403ab0
push ebx
push str.IsFileUsingByExclusive:_File_attribute_is__1_d_._n
push 4
call fcn.00403ab0
add esp, 0x18
xor ebx, 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call edi
push eax
push str.IsFileUsingByExclusive_This_file_is_changed_to__d._n
push 4
call fcn.00403ab0
add esp, 0xc
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
push esi
cmp edi, 0xffffffff
je 0x4148e8
push str.IsFileUsingByExclusive__1_can_be_accessed_exclusively._n
push 4
call fcn.00403ab0
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
push str.IsFileUsingByExclusive__1_cannot_be_accessed_exclusively._n
push 4
call fcn.00403ab0
add esp, 0xc
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret
Function at 0x414910
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x41c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
xor ebx, ebx
call edi
push esi
cmp eax, 0xffffffff
jne 0x41495c
push str.IsFileUsingByMoveFile:_File___1_s___is_not_found._n
push 2
call fcn.00403ab0
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
call edi
cmp eax, 0xffffffff
je 0x41498d
push esi
call edi
test al, 0x10
je 0x41498d
push esi
push str.IsFileUsingByMoveFile:___1_s___is_directory._n
push 2
call fcn.00403ab0
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push esi
call edi
mov ebx, eax
test bl, 1
je 0x4149d2
push esi
push str.IsFileUsingByMoveFile:___1_s___has_FILE_ATTRIBUTE_READONLY._n
push 4
call fcn.00403ab0
push ebx
push str.IsFileUsingByMoveFile:_File_attribute_is__1_d_._n
push 4
call fcn.00403ab0
add esp, 0x18
xor ebx, 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call edi
push eax
push str.IsFileUsingByMoveFile_This_file_is_changed_to__d._n
push 4
call fcn.00403ab0
add esp, 0xc
lea eax, [ebp - 0x41c]
push eax
push 0x105
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea ecx, [ebp - 0x210]
push ecx
push 0
push 0x56e1d4
lea edx, [ebp - 0x41c]
push edx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
push 0x80
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
lea ecx, [ebp - 0x210]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov edi, dword [sym.imp.KERNEL32.dll_MoveFileW]
lea edx, [ebp - 0x210]
push edx
push esi
call edi
test eax, eax
je 0x414a4f
push esi
lea eax, [ebp - 0x210]
push eax
call edi
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [ebp - 0x210]
push ecx
push esi
push str.IsFileUsingByMoveFile:_MoveFile__n____FROM:_1_s__n____TO:_2_s__n_failed.__0x_3_lx___n
push 4
call fcn.00403ab0
mov ecx, dword [ebp - 4]
add esp, 0x14
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x414e70
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x61c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList_
lea eax, [ebp - 0x40c]
push 0x100
push eax
mov dword [ebp - 0x618], 0
call fcn.0053eeab
push esi
lea ecx, [ebp - 0x40c]
push 0x100
push ecx
call fcn.0053e396
add esp, 0x18
lea edx, [ebp - 0x618]
push edx
lea eax, [ebp - 0x40c]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x414f16
lea ecx, [ebp - 0x61c]
push ecx
lea edx, [ebp - 0x20c]
push edx
push eax
push eax
mov eax, dword [ebp - 0x618]
push str.ProfileImagePath
push eax
mov dword [ebp - 0x61c], 0x206
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x414f27
mov ecx, dword [ebp - 0x618]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x618]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x414f40
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x20e], 0x5c
je 0x414f73
push 0x56825c
lea eax, [ebp - 0x20c]
push 0x103
push eax
call fcn.0053e396
add esp, 0xc
push str.NTUSER.DAT
lea ecx, [ebp - 0x20c]
push 0x103
push ecx
call fcn.0053e396
push 0x206
lea edx, [ebp - 0x614]
push 0
push edx
call fcn.0053e550
add esp, 0x18
push 0x103
lea eax, [ebp - 0x614]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea edx, [ebp - 0x614]
push edx
push esi
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov ecx, dword [ebp - 4]
neg eax
sbb eax, eax
xor ecx, ebp
inc eax
pop esi
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
Function at 0x415000
Capabilities:
Check if file exists
Get common file path
Get file attributes
Move file
Read .ini file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x556c4b
mov eax, dword fs:[0]
push eax
sub esp, 0x43c
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
xor ebx, ebx
push 0x10000
mov dword [ebp - 4], ebx
call fcn.00449b71
add esp, 4
lea ecx, [ebp - 0x444]
mov esi, eax
mov dword [ebp - 4], 0xffffffff
call fcn.004477d0
mov dword [ebp - 4], 2
call fcn.00413de0
movzx eax, ax
cmp ax, 1
je 0x415086
cmp ax, 2
je 0x415086
push 4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
mov ebx, eax
jmp 0x415200
push 0x208
lea eax, [ebp - 0x21c]
push 0
push eax
call fcn.0053e550
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea edx, [ebp - 0x21c]
push 0x5c
push edx
call fcn.0053dd9b
add esp, 8
test eax, eax
jne 0x4150d6
push 0x56825c
push 0x104
lea eax, [ebp - 0x21c]
push eax
jmp 0x4150ee
cmp word [eax + 2], 0
je 0x4150f6
push 0x56825c
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
call fcn.0053e396
add esp, 0xc
push str.Wininit.ini
lea edx, [ebp - 0x21c]
push 0x104
push edx
call fcn.0053e396
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x415133
push 0x80
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x10000
push 0
push esi
call fcn.0053e550
add esp, 0xc
lea edx, [ebp - 0x21c]
push edx
push 2
lea eax, [ebp - 0x448]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [ebp - 0x21c]
push ecx
push 0x7fff
push esi
push str.rename
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
push 0x210
lea edx, [ebp - 0x42c]
push 0
push edx
call fcn.0053e550
push edi
lea eax, [ebp - 0x42c]
push str.NUL_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
push esi
lea ecx, [ebp - 0x444]
call fcn.00448200
lea ecx, [ebp - 0x42c]
push ecx
lea ecx, [ebp - 0x444]
call fcn.00448140
lea ecx, [ebp - 0x444]
call fcn.004465d0
test eax, eax
je 0x4151ed
lea edx, [ebp - 0x21c]
push edx
lea ecx, [ebp - 0x444]
call fcn.004465d0
push eax
push str.rename
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileSectionW]
mov ebx, eax
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push esi
call fcn.00449b7c
add esp, 4
lea ecx, [ebp - 0x444]
mov dword [ebp - 4], 0xffffffff
call fcn.00447830
mov eax, ebx
jmp 0x415227
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret 4
Function at 0x416320
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x5d7b20]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push esi
xor eax, eax
push ecx
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x20c], eax
lea eax, [ebp - 0x204]
push str..mailslotScanner_s
push eax
mov dword [ebp - 0x208], 0
mov dword [ebp - 0x210], 0xa
call dword [sym.imp.USER32.dll_wsprintfW]
lea ecx, [ebp - 0x204]
push ecx
push str.MailSlotName___s_n
call fcn.00415550
add esp, 0x14
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
lea edx, [ebp - 0x204]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4163f2
push edi
push 0
lea eax, [ebp - 0x208]
push eax
push 8
lea ecx, [ebp - 0x210]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
pop edi
je 0x4163eb
cmp dword [ebp - 0x208], 8
jne 0x4163eb
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret
push str.ShutdownScanner:_WriteFile_Error
jmp 0x4163f7
push str.ShutdownScanner:_CreateFile_Error
push 0x56dce8
call fcn.00415550
mov ecx, dword [ebp - 4]
add esp, 8
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0053e1ad
mov esp, ebp
pop ebp
ret