joyce8/EMBER2024-capa huggingface dataset:
Function at 0x8d5d20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x8d5d58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0x8d5d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x8d5d94
mov eax, dword [esp + 0x14]
test eax, eax
je 0x8d5d94
push eax
push esi
call fcn.008d820b
add esp, 8
pop esi
ret 0x10

Function at 0x8d5da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x8d5e22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0x8d5e15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0x8ee320
push ecx
mov dword [esp + 0x1c], 4
call fcn.008d7dff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0x8d5dda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0x8d5e30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x8d5ec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0x8d5eb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0x8ee320
push ecx
mov dword [esp + 0x1c], 4
call fcn.008d7dff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0x8d5eab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0x8d5e6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0x8d6000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0x8d6131
push esi
call fcn.008d9145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.008c8080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0x8d6131
push 0
push ebp
call fcn.008c83a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.008c8260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0x8d608b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.008c82f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0x8d6121
push 0x8ee918
push edi
call fcn.008d73f0
push eax
push ebx
push esi
call fcn.008d5f60
push 0x8ee8f8
push edi
call fcn.008d73f0
push eax
push ebx
push esi
call fcn.008d5f60
push 0x8ee8d8
push edi
call fcn.008d73f0
push eax
push ebx
push esi
call fcn.008d5f60
push 0x8ee8c0
push edi
call fcn.008d73f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.008d5f60
push 0x8ee8a0
push edi
call fcn.008d73f0
push eax
push ebx
push esi
call fcn.008d5f60
push 0x8ee888
push edi
call fcn.008d73f0
push eax
push ebx
push esi
call fcn.008d5f60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x8d71b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.008d7140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.008d7140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.008d7140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.008d7140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0x8d7bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x8d7c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0x8e987c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x8d7c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0x8d7c52
xor eax, eax
pop esi
leave
ret 4
Function at 0x4070d4
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
pushal
call 0x4070e3
pop dword [ebp - 8]
mov eax, 0x4070e3
sub dword [ebp - 8], eax
mov dword [ebp - 0x18], 0xe60b6db
sub dword [ebp - 0x18], 0xc00e7190
mov dword [ebp - 0x14], 0x6f87a5da
add dword [ebp - 0x14], 0xc2aba66b
mov dword [ebp - 0x10], 0x6bbb60f0
add dword [ebp - 0x10], 0xe090e33e
mov dword [ebp - 0xc], 0xaffaf5ef
add dword [ebp - 0xc], 0x50050a11
lea eax, [ebp - 0x18]
push eax
mov eax, 0xa2c962c4
sub eax, 0xa288e1c0
add eax, dword [ebp - 8]
call dword [eax]
mov dword [ebp - 0x18], 0xc4660e61
add dword [ebp - 0x18], 0xb00c5af5
mov dword [ebp - 0x14], 0x7abd8ff7
add dword [ebp - 0x14], 0xc6aed17e
mov dword [ebp - 0x10], 0x46066fee
sub dword [ebp - 0x10], 0xe2970382
mov dword [ebp - 0xc], 0x1fa6bd6e
add dword [ebp - 0xc], 0xe0594292
lea ebx, [ebp - 0x18]
push ebx
push eax
mov eax, 0xf9e52a03
sub eax, 0xf9a4a903
add eax, dword [ebp - 8]
call dword [eax]
push 0x40
push 0x1000
push 0x37634
push 0
call eax
mov ecx, 0x1d61320
add ecx, 0xfe2a3632
mov esi, eax
mov edi, 0xcdd6451a
sub edi, 0xcd91411a
add edi, dword [ebp - 8]
mov edx, 0x51d1d7f1
add edx, 0x2eb1d9ae
mov ebx, dword [edi]
xor dword [ebp - 4], edx
add ebx, edx
mov dword [ebp - 4], 0xc32d21cb
mov dword [esi], ebx
xor dword [ebp - 4], 0x913bd75a
add esi, 0xc23fef40
sub esi, 0xc23fef3c
add edi, 4
loop 0x407200
add eax, 0x1181b
mov ebx, eax
add eax, 0x4edceb9e
sub eax, 0x4edceb99
mov ecx, 0xb2011bbb
sub ecx, 0xb1c11bbb
add ecx, dword [ebp - 8]
call ebx
leave
ret
Function at 0x813108
Capabilities:
Decompress data using aplib

Disassembly:
call 0x813258
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x81312e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x81311a
add dl, dl
jne 0x813139
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x81318c
xor eax, eax
add dl, dl
jne 0x813146
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x81322d
add dl, dl
jne 0x813155
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x813160
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x81316b
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x813176
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x813182
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x813125
mov eax, 1
add dl, dl
jne 0x81319a
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x8131a5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x813191
sub eax, ebx
mov ebx, 1
jne 0x8131d8
mov ecx, 1
add dl, dl
jne 0x8131be
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x8131c9
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8131b5
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x813125
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x8131ef
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x8131fa
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x8131e6
cmp eax, 0x7d00
jae 0x81321d
cmp eax, 0x500
jb 0x813218
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x813125
cmp eax, 0x7f
ja 0x813220
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x813125
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x81324e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x813125
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x6f14caa0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
mov ebx, edx
sub esp, 0x22c
mov eax, dword [0x6f14f2a8]
test eax, eax
je 0x6f14cb58
mov dword [esp], ebx
call eax
mov dword [ebx + 8], eax
sub esp, 4
test eax, eax
jns 0x6f14cae0
mov eax, dword [ebx]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edi, [ebp - 0x220]
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_GetModuleFileNameW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], 0x6f15772c
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
mov dword [esp + 8], 0x104
mov dword [esp + 4], edi
mov dword [esp], str.SystemRoot
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov eax, dword [ebx]
sub esp, 0xc
mov edx, dword [eax]
mov dword [esp + 8], edi
mov dword [esp + 4], str.SystemRoot
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0xc
jmp 0x6f14cacc
mov dword [esp], str.atl100.dll
call dword [sym.imp.kernel32.dll_LoadLibraryW]
sub esp, 4
test eax, eax
je 0x6f14cb8d
mov dword [esp + 4], str.AtlCreateRegistrar
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov dword [0x6f14f2a8], eax
sub esp, 8
test eax, eax
jne 0x6f14cabd
mov dword [ebx + 8], 0x80004002
xor eax, eax
jmp 0x6f14cace
Function at 0x6f14d4a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov esi, dword [ebp + 8]
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_strlen]
mov ebx, eax
xor eax, eax
test ebx, ebx
je 0x6f14d4fb
cmp byte [esi + ebx - 1], 0xa
je 0x6f14d4cf
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x24]
xchg dword [0x6f14f2bc], eax
mov dword [esp], 2
call dword [sym.imp.ucrtbase.dll___acrt_iob_func]
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], esi
call dword [sym.imp.ucrtbase.dll_fwrite]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret
Function at 0x6f14dda0
Capabilities:
Access peb ldr_data
Extract resource via kernel32 functions
Get process heap flags
Get process heap force flags

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x38
mov edi, dword [ecx]
mov edx, dword [ecx + 4]
mov eax, dword [ecx + 8]
mov esi, dword [ecx + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_FindResourceW]
sub esp, 0xc
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], eax
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_LoadResource]
mov edx, dword [ebp - 0x1c]
sub esp, 8
mov ebx, eax
mov dword [esp + 4], edx
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_SizeofResource]
mov dword [ebp - 0x1c], eax
sub esp, 8
test ebx, ebx
je 0x6f14df38
mov eax, dword [esi]
test eax, eax
je 0x6f14df20
mov edx, dword [sym.imp.kernel32.dll_MultiByteToWideChar]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], 0
mov dword [ebp - 0x28], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call edx
lea ecx, [eax + 1]
sub esp, 0x18
lea eax, [ecx + ecx]
mov dword [esp + 4], 0
mov edi, eax
mov dword [ebp - 0x20], eax
mov dword [esp + 8], edi
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x24], ecx
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x28]
sub esp, 0xc
test eax, eax
mov edi, eax
je 0x6f14df48
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], 0xfde9
call edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [esi + 4]
xor edx, edx
sub esp, 0x18
mov word [edi + eax - 2], dx
mov eax, dword [esi]
test ecx, ecx
mov edx, dword [eax]
mov dword [esp + 4], edi
mov dword [esp], eax
jne 0x6f14df10
call dword [edx + 0x28]
mov dword [esi + 8], eax
sub esp, 8
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esi + 8]
sub esp, 0xc
lea esp, [ebp - 0x10]
pop ecx
not eax
pop ebx
shr eax, 0x1f
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
call dword [edx + 0x24]
mov dword [esi + 8], eax
sub esp, 8
jmp 0x6f14ded6
mov edx, esi
mov eax, edi
call sym._create_registrar
test eax, eax
jne 0x6f14de10
lea esi, [esi]
xor eax, eax
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret 0x10
mov dword [esi + 8], 0x8007000e
xor eax, eax
jmp 0x6f14df3a
Function at 0x4041a0
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a3e0
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x491024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x34]
xor eax, eax
mov dword [ebp - 0x20], 7
push eax
push 0x47e91c
mov dword [ebp - 0x24], 0
mov word [ebp - 0x34], ax
call fcn.004054f0
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0
push eax
push 0x18
push dword [ebp + 8]
push 0
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x4042aa
mov ecx, dword [ebp - 0x40]
test ecx, ecx
je 0x4042cb
mov eax, dword [ecx + 0xcc]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0xc8]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movups xmm0, xmmword [ebp - 0x50]
sub esp, 0x10
lea ecx, [ebp - 0x68]
mov eax, esp
movups xmmword [eax], xmm0
call fcn.0040a210
add esp, 0x10
mov ecx, edi
push eax
call fcn.004053c0
mov edx, dword [ebp - 0x54]
cmp edx, 0x10
jb 0x404287
mov ecx, dword [ebp - 0x68]
inc edx
push 1
call fcn.004024a0
add esp, 4
push dword [ebp - 0x40]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x4042a6
mov ecx, dword [ebp - 0x34]
inc edx
push 2
call fcn.004024a0
add esp, 4
mov al, 1
jmp 0x4042e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [ebp + 8]
push str.CFxWSSessionCapture::GetSessionLogonTime
push str._s__session_:__d___error_:__d
push str.ws_session_capture
call fcn.00402500
add esp, 0x14
mov edx, dword [ebp - 0x20]
cmp edx, 8
jb 0x4042e1
mov ecx, dword [ebp - 0x34]
inc edx
push 2
call fcn.004024a0
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004787cb
mov esp, ebp
pop ebp
ret 8
Function at 0x406cd0
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a809
mov eax, dword fs:[0]
push eax
sub esp, 0x14
mov eax, dword [0x491024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x14], 7
cmp dword [esi + 0x14], 8
mov dword [ebp - 0x20], esi
mov dword [esi + 0x10], 0
jb 0x406d36
mov eax, dword [esi]
jmp 0x406d38
mov eax, esi
xor ecx, ecx
push ecx
mov word [eax], cx
mov ecx, esi
push 0x47e91c
call fcn.004054f0
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 0
push eax
push edi
push dword [ebp + 8]
mov dword [ebp - 0x1c], 1
push 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
call dword [sym.imp.WTSAPI32.dll_WTSQuerySessionInformationW]
test eax, eax
je 0x406db6
mov edx, dword [ebp - 0x18]
cmp word [edx], 0
jne 0x406d8e
xor ecx, ecx
jmp 0x406da2
mov ecx, edx
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406d93
sub ecx, edi
sar ecx, 1
push ecx
push edx
mov ecx, esi
call fcn.004054f0
push dword [ebp - 0x18]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
jmp 0x406dd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push dword [ebp + 8]
push str.WTSQuerySessionInformationW___session__d____d_failed___error_d__
push str.ws_process_monitor_service
call fcn.00402500
add esp, 0x14
mov eax, esi
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.004787cb
mov esp, ebp
pop ebp
ret
Function at 0x4074b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a8e0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x491024]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x34], ecx
push str.CWsSessionMonitor::saveSessionEvent
push str._s_enter_
push str.ws_process_monitor_service
mov dword [ebp - 4], 2
call fcn.00402590
lea eax, [ebp + 8]
mov edx, 0x4927d4
push eax
lea ecx, [ebp - 0x30]
call fcn.00407870
add esp, 0x10
lea eax, [ebp - 0x30]
test esi, esi
je 0x40753b
cmp dword [ebp - 0x1c], 0x10
lea ecx, [ebp - 0x64]
push ecx
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__stat64i32]
add esp, 8
test eax, eax
lea eax, [ebp - 0x30]
push 0x10
jne 0x40753d
push 0x485a44
jmp 0x407542
push 0x10
push 0x485a48
cmp dword [ebp - 0x1c], 0x10
cmovae eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__fsopen]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x4075e4
mov edi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
lea eax, [ebp - 0x34]
push esi
push 1
push 4
push eax
call edi
push esi
push 1
lea eax, [ebp + 0x20]
push 8
push eax
call edi
mov eax, dword [ebp + 0x38]
push esi
push 1
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push 4
push eax
call edi
mov ecx, dword [ebp - 0x14]
add esp, 0x30
test ecx, ecx
jle 0x4075aa
cmp dword [ebp + 0x3c], 0x10
lea eax, [ebp + 0x28]
push esi
cmovae eax, dword [ebp + 0x28]
push ecx
push 1
push eax
call edi
add esp, 0x10
mov eax, dword [ebp + 0x50]
push esi
push 1
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push 4
push eax
call edi
mov ecx, dword [ebp - 0x18]
add esp, 0x10
test ecx, ecx
jle 0x4075da
cmp dword [ebp + 0x54], 0x10
lea eax, [ebp + 0x40]
push esi
cmovae eax, dword [ebp + 0x40]
push ecx
push 1
push eax
call edi
add esp, 0x10
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
push str.CWsSessionMonitor::saveSessionEvent
push str._s_exit_
push str.ws_process_monitor_service
mov dword [ebp - 4], 3
call fcn.00402590
mov edx, dword [ebp - 0x1c]
add esp, 0xc
cmp edx, 0x10
jb 0x407618
mov ecx, dword [ebp - 0x30]
inc edx
push 1
call fcn.004024a0
add esp, 4
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
cmp edx, 0x10
jb 0x407640
mov ecx, dword [ebp + 8]
inc edx
push 1
call fcn.004024a0
add esp, 4
mov edx, dword [ebp + 0x3c]
mov dword [ebp + 0x1c], 0xf
mov dword [ebp + 0x18], 0
mov byte [ebp + 8], 0
cmp edx, 0x10
jb 0x407668
mov ecx, dword [ebp + 0x28]
inc edx
push 1
call fcn.004024a0
add esp, 4
mov edx, dword [ebp + 0x54]
mov dword [ebp + 0x3c], 0xf
mov dword [ebp + 0x38], 0
mov byte [ebp + 0x28], 0
cmp edx, 0x10
jb 0x407690
mov ecx, dword [ebp + 0x40]
inc edx
push 1
call fcn.004024a0
add esp, 4
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.004787cb
mov esp, ebp
pop ebp
ret
Function at 0x409e80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 4]
test eax, eax
jne 0x409e8e
pop ebp
ret 0xc
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
pop ebp
ret 0xc

Function at 0x409ee0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 4]
test eax, eax
jne 0x409eee
pop ebp
ret 0xc
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
pop ebp
ret 0xc

Function at 0x40a020
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40a033
test al, 0x10
je 0x40a033
mov al, 1
ret
xor al, al
ret

Function at 0x40a040
Capabilities:
Create directory

Disassembly:
push ebx
push ecx
xor bl, bl
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__mkdir]
add esp, 4
test eax, eax
je 0x40a05e
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x11
mov al, bl
jne 0x40a060
mov al, 1
pop ebx
ret