joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4024d9
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40e00c]
jne 0x4024e3
repz ret
jmp fcn.004047ae

Function at 0x4091f7
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00403a89
xor ebx, ebx
cmp dword [0x40ff74], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x4092cc
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x409237
xor eax, eax
jmp 0x409390
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40c6b4
push edi
call esi
cmp eax, ebx
je 0x409230
push eax
call fcn.00403a26
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40ff74], eax
call esi
push eax
call fcn.00403a26
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40ff78], eax
call esi
push eax
call fcn.00403a26
mov dword [0x40ff7c], eax
lea eax, [ebp - 8]
push eax
call fcn.00402be3
test eax, eax
pop ecx
pop ecx
je 0x40929a
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403f63
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x4092cc
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00403a26
cmp eax, ebx
pop ecx
mov dword [0x40ff84], eax
je 0x4092cc
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00403a26
pop ecx
mov dword [0x40ff80], eax
mov eax, dword [0x40ff80]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x409345
cmp dword [0x40ff84], esi
je 0x409345
push eax
call fcn.00403a92
pop ecx
call eax
cmp eax, ebx
je 0x409312
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x40ff84]
call fcn.00403a92
pop ecx
call eax
test eax, eax
je 0x409312
test byte [ebp - 0x18], 1
jne 0x409345
lea eax, [ebp - 0xc]
push eax
call fcn.00402c1a
test eax, eax
pop ecx
je 0x40932d
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403f63
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x40933c
or dword [ebp + 0x10], 0x200000
jmp 0x409376
or dword [ebp + 0x10], 0x40000
jmp 0x409376
mov eax, dword [0x40ff78]
cmp eax, esi
je 0x409376
push eax
call fcn.00403a92
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x409376
mov eax, dword [0x40ff7c]
cmp eax, esi
je 0x409376
push dword [ebp - 4]
push eax
call fcn.00403a92
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x40ff74]
call fcn.00403a92
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012d0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x820
lea eax, [ebp - 0x824]
push 0
push eax
call fcn.00414310
lea eax, [ebp + 0xc]
push eax
push dword [ebp + 8]
lea eax, [ebp - 0x824]
push 0x410
push 0x410
push eax
call fcn.00411d0b
add esp, 0x20
cmp word [ebp - 0x824], 0
je 0x40132d
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x401830
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov dword [ebp - 0x210], edx
xor esi, esi
call fcn.0040f700
mov edi, eax
test edi, edi
je 0x401974
mov ecx, edi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401861
sub ecx, edx
sar ecx, 1
je 0x401974
push edi
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], esi
push 0x4323d8
push eax
call fcn.0040fe60
xor eax, eax
mov dword [ebp - 0x214], esi
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00414310
add esp, 0x18
mov dword [ebp - 0x21c], 0x206
lea eax, [ebp - 0x214]
mov dword [ebp - 0x220], 1
push eax
push 0x20019
push 0
push dword [ebp - 0x218]
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40195b
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x220]
push eax
push 0
push 0x432460
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40194f
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x210]
push str._sTemp
push eax
call fcn.0040fe60
mov esi, dword [ebp - 0x210]
add esp, 0xc
lea ecx, [esi + 2]
lea esp, [esp]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401940
sub esi, ecx
sar esi, 1
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop edi
mov eax, esi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041154d
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x210]
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40c310
Capabilities:
Check os version
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x944
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0x114
xor edi, edi
mov dword [ebp - 0x93c], edx
lea eax, [ebp - 0x938]
mov dword [ebp - 0x940], 0x104
mov ebx, ecx
push edi
push eax
mov dword [ebp - 0x944], ebx
call fcn.00414310
add esp, 0xc
mov dword [ebp - 0x938], 0x114
lea eax, [ebp - 0x938]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x928], 2
jne 0x40c3cd
cmp dword [ebp - 0x934], 6
jb 0x40c3cd
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x43285c
call esi
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40c419
push str.QueryFullProcessImageNameW
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c3c4
lea ecx, [ebp - 0x940]
push ecx
push dword [ebp - 0x93c]
push edi
push dword [ebp - 0x944]
call eax
mov edi, eax
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40c419
mov esi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.Window_is_XP_n
call esi
push dword [ebp - 0x940]
push dword [ebp - 0x93c]
push 0
push ebx
call dword [sym.imp.PSAPI.DLL_GetModuleFileNameExW]
mov edi, eax
test edi, edi
jne 0x40c419
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x824]
push str.GetModulePathWrap___:_GetModuleFileNameEx___err___d_n
push eax
call fcn.0040b470
add esp, 0xc
lea eax, [ebp - 0x824]
push eax
call esi
push edi
push dword [ebp - 0x93c]
lea eax, [ebp - 0x824]
push str.GetModulePathWrap___Out_:_lpszModPath___s__ret__int____d_n
push eax
call fcn.0040b470
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40c6e0
Capabilities:
Check mutex on windows
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x82c
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
xor esi, esi
push edi
push str.IsMSISrvFree___In
mov dword [ebp - 0x828], esi
lea edi, [esi + 0xa]
call ebx
push str.Global_MSIExecute
push esi
push 0x1f0001
call dword [sym.imp.KERNEL32.dll_OpenMutexW]
mov dword [ebp - 0x82c], eax
test eax, eax
je 0x40c821
push esi
push str.IsMSISrvFree___:_Mutex_is_opened__GetLastError_____d_n
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call ebx
push 0x4e20
push dword [ebp - 0x82c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov esi, eax
cmp esi, 0x102
ja 0x40c7b0
je 0x40c7a7
test esi, esi
je 0x40c796
cmp esi, 0x80
jne 0x40c7d9
push str.IsMSISrvFree___:_WAIT_ABANDONED__iCount_set_to_0._n
lea eax, [ebp - 0x824]
xor edi, edi
push 0x104
push eax
call fcn.00412a7b
add esp, 0xc
jmp 0x40c7d9
mov dword [ebp - 0x828], 1
push str.IsMSISrvFree___:_Mutex_is_closed__iCount_set_to_0._n
jmp 0x40c77e
dec edi
push edi
push str.IsMSISrvFree___:_WAIT_TIMEOUT__iCount___d_n
jmp 0x40c7c5
cmp esi, 0xffffffff
jne 0x40c7d9
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
push esi
push str.IsMSISrvFree___:_WAIT_FAILED__iCount_set_to_0__ret___d_n
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call ebx
test edi, edi
jne 0x40c750
push esi
push str._nIsMSISrvFree___:_Do_not_wait_any_more._n_n
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call ebx
push dword [ebp - 0x82c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x828]
jmp 0x40c84f
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.IsMSISrvFree___:_OpenMutex___err_ret___d_n
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call ebx
push esi
push str.IsMSISrvFree___Out_ret___d_n
lea eax, [ebp - 0x824]
push 0x104
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40d140
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
lea eax, [ebp - 0x2a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
push eax
push 0
mov ecx, 0x23
mov eax, 0x1c
cmovne eax, ecx
mov ebx, edx
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40d225
push 0x27
lea eax, [ebp - 0x9c]
push eax
lea eax, [esi + 0x8c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
js 0x40d225
mov ecx, dword [esi + 0xa0]
mov edx, dword [esi + 0x9c]
movzx eax, cx
push eax
shr ecx, 0x10
push ecx
movzx eax, dx
push eax
shr edx, 0x10
lea eax, [ebp - 0x4c]
push edx
push str._d._d._d._d
push 0x24
push eax
call fcn.0040cdc0
add esp, 0x1c
test eax, eax
js 0x40d225
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2a4]
push eax
push str._lsApplicationsCache_lsv_ls.msi
push edi
call fcn.0040fe60
add esp, 0x14
test eax, eax
js 0x40d225
push 1
push 1
push dword [edi]
push ebx
call fcn.00410680
test eax, eax
jns 0x40d225
cmp dword [ebp + 8], 1
jne 0x40d225
push edi
push 0
mov edx, ebx
mov ecx, esi
call fcn.0040d140
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret

Function at 0x40d240
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
lea eax, [ebp - 0x2a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
push eax
push 0
mov ecx, 0x23
mov eax, 0x1c
cmovne eax, ecx
mov ebx, edx
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40d325
push 0x27
lea eax, [ebp - 0x9c]
push eax
lea eax, [esi + 0x8c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
js 0x40d325
mov ecx, dword [esi + 0xa0]
mov edx, dword [esi + 0x9c]
movzx eax, cx
push eax
shr ecx, 0x10
push ecx
movzx eax, dx
push eax
shr edx, 0x10
lea eax, [ebp - 0x4c]
push edx
push str._d._d._d._d
push 0x24
push eax
call fcn.0040cdc0
add esp, 0x1c
test eax, eax
js 0x40d325
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2a4]
push eax
push str._lsApplicationsCache_lsv_ls.mst
push edi
call fcn.0040fe60
add esp, 0x14
test eax, eax
js 0x40d325
push 1
push 1
push dword [edi]
push ebx
call fcn.00410680
test eax, eax
jns 0x40d325
cmp dword [ebp + 8], 1
jne 0x40d325
push edi
push 0
mov edx, ebx
mov ecx, esi
call fcn.0040d240
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40ece0
Capabilities:
Get session information
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x834
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x834]
push esi
push edi
push eax
lea eax, [ebp - 0x828]
mov dword [ebp - 0x82c], edx
push eax
push 0x18
xor esi, esi
mov dword [ebp - 0x830], ecx
push 0xffffffffffffffff
push esi
mov dword [ebp - 0x834], esi
mov dword [ebp - 0x828], esi
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x40edb5
mov edi, dword [ebp - 0x828]
test edi, edi
je 0x40edf3
mov ecx, dword [ebp - 0x830]
mov esi, 1
test ecx, ecx
je 0x40ed56
mov eax, dword [edi + 4]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x82c]
test ecx, ecx
je 0x40ed75
lea eax, [edi + 0x82]
push eax
push 0x104
push ecx
call fcn.00412a7b
add esp, 0xc
test ebx, ebx
je 0x40ed8b
lea eax, [edi + 0x60]
push eax
push 0x104
push ebx
call fcn.00412a7b
add esp, 0xc
mov eax, dword [ebp - 0x830]
push dword [eax]
lea eax, [ebp - 0x824]
push ebx
push dword [ebp - 0x82c]
push 0x433100
push 0x410
push eax
call fcn.00412a7b
add esp, 0x18
jmp 0x40edd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4331a8
lea eax, [ebp - 0x824]
push 0x410
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0x828]
test eax, eax
je 0x40edf3
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret

Function at 0x40ee10
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, edx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
test eax, eax
je 0x40ee6e
push dword [esi]
lea eax, [ebp - 0x824]
push 0x433238
push 0x410
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041154d
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4332b8
lea ecx, [ebp - 0x824]
push 0x410
push ecx
call fcn.00412a7b
add esp, 0x10
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
pop esi
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40eeb0
Capabilities:
Get session information
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x828]
push eax
push edi
mov esi, edx
mov dword [ebp - 0x828], 0
push esi
push ecx
push 0
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
jne 0x40ef29
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433328
lea ecx, [ebp - 0x824]
push 0x410
push ecx
call fcn.00412a7b
add esp, 0x10
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041154d
mov esp, ebp
pop ebp
ret
push dword [edi]
lea ecx, [ebp - 0x824]
push esi
push 0x4333c8
push 0x410
push ecx
call fcn.00412a7b
add esp, 0x14
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
xor ecx, ebp
pop esi
call fcn.0041154d
mov esp, ebp
pop ebp
ret

Function at 0x40ef70
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x82c
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, edx
mov dword [ebp - 0x82c], eax
mov ebx, ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edx, ebx
mov ecx, eax
call fcn.0040ee10
mov esi, eax
test esi, esi
je 0x40f082
mov ecx, dword [ebx]
lea eax, [ebp - 0x828]
push eax
mov edx, 5
mov dword [ebp - 0x828], 0
call fcn.0040eeb0
mov esi, eax
add esp, 4
test esi, esi
je 0x40f082
mov eax, dword [ebp - 0x828]
test eax, eax
je 0x40f00e
test edi, edi
je 0x40f00e
push eax
push 0x104
push edi
call fcn.00412a7b
mov eax, dword [ebp - 0x828]
add esp, 0xc
test eax, eax
je 0x40f004
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov dword [ebp - 0x828], 0
mov ecx, dword [ebx]
lea eax, [ebp - 0x828]
push eax
mov edx, 7
call fcn.0040eeb0
mov esi, eax
add esp, 4
test esi, esi
je 0x40f082
mov eax, dword [ebp - 0x828]
test eax, eax
je 0x40f05e
mov ecx, dword [ebp - 0x82c]
test ecx, ecx
je 0x40f05e
push eax
push 0x104
push ecx
call fcn.00412a7b
mov eax, dword [ebp - 0x828]
add esp, 0xc
test eax, eax
je 0x40f05e
push eax
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
push dword [ebx]
lea eax, [ebp - 0x824]
push dword [ebp - 0x82c]
push edi
push 0x433460
push 0x410
push eax
call fcn.00412a7b
add esp, 0x18
jmp 0x40f09b
push 0x433508
lea eax, [ebp - 0x824]
push 0x410
push eax
call fcn.00412a7b
add esp, 0xc
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40f0c0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp - 0x210]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
push eax
push 1
push 0
push edx
push 0x80000002
mov dword [ebp - 0x210], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40f163
push ebx
push esi
push edi
push eax
push 0x433648
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [edi]
mov dword [ebp - 0x214], eax
cmp ecx, 2
je 0x40f12b
cmp ecx, 1
jne 0x40f151
push 0x104
lea eax, [ebp - 0x20c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push eax
mov dword [ebx], eax
lea eax, [ebp - 0x20c]
push eax
push esi
call fcn.0041460b
add esp, 0xc
push dword [ebp - 0x210]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x214]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x40f530
Capabilities:
Get user security identifier
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc44
mov eax, dword [0x4371c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xc40], eax
push 0x410
lea eax, [ebp - 0x414]
mov dword [ebp - 0xc38], ebx
push ebx
push eax
mov edi, edx
mov dword [ebp - 0xc3c], ebx
mov esi, ecx
call fcn.00414310
push esi
push edi
push 0x433948
lea eax, [ebp - 0x414]
push 0x208
push eax
call fcn.00412a7b
lea eax, [ebp - 0x414]
push eax
push 0x433954
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00412a7b
add esp, 0x30
lea eax, [ebp - 0xc44]
push eax
lea eax, [ebp - 0xc3c]
push eax
push ebx
lea eax, [ebp - 0xc38]
push eax
push ebx
lea eax, [ebp - 0x414]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov eax, dword [ebp - 0xc38]
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
test eax, eax
je 0x40f5f0
push eax
push 8
call esi
push eax
call edi
mov ebx, eax
mov ecx, dword [ebp - 0xc3c]
test ecx, ecx
je 0x40f608
add ecx, ecx
push ecx
push 8
call esi
push eax
call edi
mov edi, eax
jmp 0x40f60a
xor edi, edi
test ebx, ebx
je 0x40f699
lea eax, [ebp - 0xc44]
push eax
lea eax, [ebp - 0xc3c]
push eax
push edi
lea eax, [ebp - 0xc38]
push eax
push ebx
lea eax, [ebp - 0x414]
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
test eax, eax
je 0x40f65b
push dword [ebp - 0xc40]
push ebx
call dword [sym.imp.ADVAPI32.dll_ConvertSidToStringSidW]
test eax, eax
jne 0x40f689
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4336d8
jmp 0x40f667
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x433998
lea eax, [ebp - 0xc34]
push 0x410
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0xc34]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call eax
push ebx
push 0
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
push eax
call ebx
jmp 0x40f69f
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x40f6ab
push edi
push 0
call esi
push eax
call ebx
mov ebx, dword [ebp - 0xc40]
lea eax, [ebp - 0xc34]
push dword [ebx]
push 0x4339fc
push 0x410
push eax
call fcn.00412a7b
add esp, 0x10
lea eax, [ebp - 0xc34]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebx], eax
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.0041154d
mov esp, ebp
pop ebp
ret
Function at 0x410130
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
push dword [ebp + 0xc]
xor esi, esi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x410226
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x41016e
cmp eax, 3
je 0x410178
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x410178
test al, 0x10
je 0x410178
xor esi, esi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
movzx ecx, word [ebx]
mov eax, ebx
push edi
xor edi, edi
test cx, cx
je 0x410210
lea esp, [esp]
cmp cx, 0x5c
movzx ecx, word [eax + 2]
cmove edi, eax
add eax, 2
test cx, cx
jne 0x410190
test edi, edi
je 0x410210
push dword [ebp + 0xc]
xor eax, eax
push ebx
mov word [edi], ax
call fcn.00410130
mov esi, eax
mov eax, 0x5c
mov word [edi], ax
test esi, esi
js 0x410225
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x410205
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 0xb7
jne 0x4101ef
mov esi, 1
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
test esi, esi
jle 0x410225
movzx esi, si
or esi, 0x80070000
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
xor esi, esi
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8
mov esi, 0x80070003
push esi
push 0x82
push 0x42b4d4
call fcn.00410a50
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x410230
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
lea eax, [ebp - 4]
mov dword [ebp - 8], 0
push eax
lea eax, [ebp - 8]
mov dword [ebp - 4], 0
push eax
push dword [ebp + 8]
mov dword [ebp - 0x10], 0
push 0
mov dword [ebp - 0xc], 0
call fcn.00410340
mov esi, eax
test esi, esi
js 0x41032e
push edi
push 0
push 0x80
push dword [ebp + 0x10]
push 0
push 0
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4102c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4102a8
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0xe7
push str.resrutil.cpp
call fcn.00410a50
jmp 0x410318
push 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0xc], 1
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x410311
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x4102f7
movzx esi, si
or esi, 0x80070000
test esi, esi
mov eax, 0x80004005
cmovns esi, eax
push esi
push 0xed
push str.resrutil.cpp
call fcn.00410a50
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
test esi, esi
jns 0x41032c
cmp dword [ebp - 0xc], 0
je 0x41032c
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0xc