joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1800485e
Capabilities:
Inspect section memory permissions

Disassembly:
cmp dword [eax], ebx
je 0x18004866
mov edx, dword [eax + 4]
lea ecx, [eax + 8]
add edx, eax
mov dword [ebp + 8], ecx
cmp ecx, edx
jae 0x18004861
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xf000
cmp edx, 0x3000
jne 0x1800484b
and ecx, 0xfff
mov edx, esi
sub edx, dword [edi + 0x34]
add ecx, esi
add ecx, dword [eax]
add dword [ecx], edx
jmp 0x18004853
cmp edx, ebx
jne 0x180049a1
mov ecx, dword [eax + 4]
add dword [ebp + 8], 2
add ecx, eax
cmp dword [ebp + 8], ecx
or byte [edx - 0x3f], dh
or byte [edx - 0x3f], dh
add eax, dword [eax + 4]
jmp 0x1800480f
mov dword [ebp + 0xc], ebx
jmp 0x18004871
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x18004889
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x180048a7
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x18004905
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x180048ec
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x180048f5
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x180048ff
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x180048e1
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x1800486b
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x18004952
dec eax
je 0x18004949
sub eax, 3
je 0x18004940
mov dword [ebp - 4], 0x40
jmp 0x1800496f
mov dword [ebp - 4], 4
jmp 0x18004955
mov dword [ebp - 4], 0x20
jmp 0x18004955
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x180049a1
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x18004921
invalid
invalid
invalid
Function at 0x180048f6
Capabilities:
Inspect section memory permissions

Disassembly:
cmp dword [eax], ebx
je 0x18004866
mov edx, dword [eax + 4]
lea ecx, [eax + 8]
add edx, eax
mov dword [ebp + 8], ecx
cmp ecx, edx
jae 0x18004861
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xf000
cmp edx, 0x3000
jne 0x1800484b
and ecx, 0xfff
mov edx, esi
sub edx, dword [edi + 0x34]
add ecx, esi
add ecx, dword [eax]
add dword [ecx], edx
jmp 0x18004853
cmp edx, ebx
jne 0x180049a1
mov ecx, dword [eax + 4]
add dword [ebp + 8], 2
add ecx, eax
cmp dword [ebp + 8], ecx
or byte [edx - 0x3f], dh
or byte [edx - 0x3f], dh
add eax, dword [eax + 4]
jmp 0x1800480f
mov dword [ebp + 0xc], ebx
jmp 0x18004871
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x18004889
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x180048a7
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
mov edx, dword [edi + eax*8 + 0x108]
lea eax, [edi + eax*8 + 0xf8]
mov edi, dword [eax + 0x24]
lea eax, [edx + ecx - 1]
xor edx, edx
div dword [ebp - 0xac]
xor edx, edx
mov dword [ebp - 0x44], eax
mov eax, ecx
div dword [ebp - 0xac]
cmp eax, dword [ebp - 0x44]
ja 0x18004905
mov edx, edi
mov dword [ebp + 8], edi
and dword [ebp + 8], 0x40000000
mov dword [ebp + 0x10], edi
and edx, 0x20000000
and dword [ebp + 0x10], 0x80000000
mov ecx, dword [ebp + 0x18]
cmp edx, ebx
je 0x180048ec
or byte [eax + ecx], 1
cmp dword [ebp + 8], ebx
je 0x180048f5
or byte [eax + ecx], 2
cmp dword [ebp + 0x10], ebx
je 0x180048ff
add ecx, eax
or byte [ecx], 4
inc eax
cmp eax, dword [ebp - 0x44]
jbe 0x180048e1
inc dword [ebp + 0xc]
mov eax, dword [ebp - 0x88]
mov cx, word [ebp + 0xc]
cmp cx, word [eax + 6]
jbe 0x1800486b
mov dword [ebp + 8], esi
xor edi, edi
mov eax, dword [ebp + 0x18]
push 2
pop ecx
movzx eax, byte [edi + eax]
sub eax, ecx
je 0x18004952
dec eax
je 0x18004949
sub eax, 3
je 0x18004940
mov dword [ebp - 4], 0x40
jmp 0x1800496f
mov dword [ebp - 4], 4
jmp 0x18004955
mov dword [ebp - 4], 0x20
jmp 0x18004955
mov dword [ebp - 4], ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push dword [ebp - 0xac]
push dword [ebp + 8]
call dword [ebp - 0xbc]
test eax, eax
je 0x180049a1
mov eax, dword [ebp - 0xac]
add dword [ebp + 8], eax
inc edi
cmp edi, dword [ebp - 0x8c]
jbe 0x18004921
invalid
invalid
invalid
Function at 0x1800942b
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 8], 0
jg 0x18009438
xor eax, eax
pop ebp
ret
mov eax, dword [ebp + 0xc]
push ebx
push edi
push 3
pop edi
jmp 0x18009499
sub dword [ebp + 0x10], 4
js 0x18009522
movzx edx, byte [ecx]
shr edx, 2
mov dl, byte [edx + esi]
mov byte [eax], dl
movzx edx, byte [ecx]
movzx ebx, byte [ecx + 1]
and edx, edi
shl edx, 4
add edx, esi
shr ebx, 4
mov dl, byte [ebx + edx]
mov byte [eax + 1], dl
movzx ebx, byte [ecx + 2]
movzx edx, byte [ecx + 1]
and edx, 0xf
shr ebx, 6
add ebx, esi
mov dl, byte [ebx + edx*4]
mov byte [eax + 2], dl
movzx edx, byte [ecx + 2]
and edx, 0x3f
mov dl, byte [edx + esi]
mov byte [eax + 3], dl
add eax, 4
add ecx, edi
sub dword [ebp + 8], edi
cmp dword [ebp + 8], 2
jg 0x18009442
mov edx, dword [ebp + 8]
dec edx
je 0x180094f4
dec edx
jne 0x1800952f
sub dword [ebp + 0x10], edi
js 0x18009522
movzx edx, byte [ecx]
shr edx, 2
mov dl, byte [edx + esi]
mov byte [eax], dl
movzx edx, byte [ecx]
movzx ebx, byte [ecx + 1]
and edx, edi
shl edx, 4
shr ebx, 4
add edx, esi
mov dl, byte [ebx + edx]
mov byte [eax + 1], dl
movzx ecx, byte [ecx + 1]
and ecx, 0xf
mov cl, byte [esi + ecx*4]
mov byte [eax + 2], cl
add eax, edi
cmp byte [ebp + 0x14], 0
je 0x1800952f
mov ecx, dword [ebp + 0x10]
dec ecx
js 0x18009522
mov byte [eax], 0x3d
inc eax
jmp 0x1800952f
mov edx, dword [ebp + 0x10]
sub edx, 2
js 0x18009522
movzx ebx, byte [ecx]
shr ebx, 2
mov bl, byte [ebx + esi]
mov byte [eax], bl
movzx ecx, byte [ecx]
and ecx, edi
shl ecx, 4
mov cl, byte [ecx + esi]
mov byte [eax + 1], cl
inc eax
inc eax
cmp byte [ebp + 0x14], 0
je 0x1800952f
add edx, 0xfffffffe
jns 0x18009526
xor eax, eax
jmp 0x18009532
mov byte [eax], 0x3d
mov byte [eax + 1], 0x3d
inc eax
inc eax
sub eax, dword [ebp + 0xc]
pop edi
pop ebx
pop ebp
ret

Function at 0x1800cbab
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
cmp byte [ebp + 0x10], 0
push ebx
jne 0x1800cbc5
push dword [ebp + 0xc]
call fcn.1800c3b2
pop ecx
test al, al
jne 0x1800cc36
xor eax, eax
cmp byte [ebp + 0x10], al
sete al
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x1800cc36
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov ebx, eax
je 0x1800cc32
push 0xfffffffffffffffe
push 1
mov dword [ebp - 0x14], ecx
call fcn.18001d8a
mov dword [ebp - 0x10], eax
movzx eax, byte [ebp + 0x10]
push ebx
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push dword [ebp + 8]
mov dword [ebp - 0xc], 0xfffffffe
push str._File::Copy___CopyFile_failed__from_s__to_s__replace_u__0x_x_
push eax
mov dword [ebp - 8], 1
call fcn.18001000
add esp, 0x18
mov eax, ebx
jmp 0x1800cc38
xor eax, eax
pop ebx
leave
ret
Function at 0x1800cc3b
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push 0xb
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1800cca9
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov ebx, eax
je 0x1800cca5
push 0xfffffffffffffffe
push 1
mov dword [ebp - 0x10], ecx
call fcn.18001d8a
push ebx
push 1
push dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push str._File::Move___MoveFileEx_failed__from_s__to_s__replace_u__0x_x_
push eax
mov dword [ebp - 8], 0xfffffffe
mov dword [ebp - 4], 1
call fcn.18001000
add esp, 0x18
mov eax, ebx
jmp 0x1800ccab
xor eax, eax
pop ebx
leave
ret

Function at 0x1800ceae
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push ebx
call fcn.1800c3b2
pop ecx
test al, al
jne 0x1800cf04
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x1800cefd
xor esi, esi
push 0xffffffffffffffff
inc esi
push esi
mov dword [ebp - 0x14], ecx
call fcn.18001d8a
or dword [ebp - 0xc], 0xffffffff
push ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push str._File::MoveAfterReboot__file_doesnt_exist__from__s_
push eax
mov dword [ebp - 8], esi
call fcn.18001000
add esp, 0xc
mov eax, 0x80070002
jmp 0x1800cf77
push 4
pop esi
push ebx
call fcn.1800c3df
pop ecx
test al, al
jne 0x1800cf15
push 5
pop esi
push esi
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1800cf75
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov dword [ebp - 4], eax
je 0x1800cf70
xor esi, esi
push 0xfffffffffffffffe
inc esi
push esi
mov dword [ebp - 0x14], ecx
call fcn.18001d8a
push dword [ebp - 4]
mov dword [ebp - 0x10], eax
push 0
push ebx
lea eax, [ebp - 0x14]
push str._File::MoveAfterReboot__failed_to_MoveFileEx_from__s_to__s__0x_x_
push eax
mov dword [ebp - 0xc], 0xfffffffe
mov dword [ebp - 8], esi
call fcn.18001000
add esp, 0x14
mov eax, dword [ebp - 4]
jmp 0x1800cf77
xor eax, eax
pop esi
leave
ret

Function at 0x1800d566
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 4], 0
push edi
push 0
mov edi, eax
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push dword [ebp + 0xc]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1800d5dd
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov dword [ebp + 8], eax
je 0x1800d5d8
xor edi, edi
push 0xfffffffffffffffe
inc edi
push edi
mov dword [ebp - 0x14], ecx
call fcn.18001d8a
push dword [ebp + 8]
mov dword [ebp - 0x10], eax
push dword [esi + 4]
lea eax, [ebp - 0x14]
push str._File::ReadAt__ReadFile_failed___s__0x_x_
push eax
mov dword [ebp - 0xc], 0xfffffffe
mov dword [ebp - 8], edi
call fcn.18001000
add esp, 0x10
mov eax, dword [ebp + 8]
jmp 0x1800d5e8
test edi, edi
je 0x1800d5e6
mov eax, dword [ebp - 4]
mov dword [edi], eax
xor eax, eax
pop edi
leave
ret 8
Function at 0x1800dbc3
Capabilities:
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
mov eax, dword [0x180f51f0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x48], edi
push 0xf0000040
push 1
push edi
push edi
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1800dc10
push 1
call ebx
jmp 0x1800dbf3
lea eax, [ebp - 0x24]
push eax
push 0x20
push dword [ebp - 0x48]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
push edi
push dword [ebp - 0x48]
test eax, eax
jne 0x1800dc2b
call esi
jmp 0x1800dc0a
call esi
push 0x180c1de4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.18018b89
add esp, 0xc
push 0x20
lea eax, [ebp - 0x24]
push eax
lea esi, [ebp - 0x6c]
call fcn.18003c62
mov ecx, dword [ebp - 0x50]
push 0xffffffffffffffff
push edi
push eax
call fcn.180039e8
push edi
push 1
mov ecx, esi
call fcn.18003cc8
mov esi, dword [ebp - 0x4c]
push 0x20
lea eax, [ebp - 0x44]
push eax
call fcn.18003c62
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1809cca5
leave
ret

Function at 0x1800f1e8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
push edi
xor edi, edi
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 8]
mov dword [ebp - 8], edi
push dword [ebx + 4]
mov dword [ebp - 0xc], edi
call esi
cmp eax, edi
jle 0x1800f21e
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp eax, edi
jne 0x1800f281
mov eax, dword [ebp - 8]
shr eax, 1
xor ecx, ecx
push 2
inc eax
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1809db14
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
cmp eax, edi
je 0x1800f27a
cmp dword [ebp - 8], edi
je 0x1800f273
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push dword [ebp + 8]
push dword [ebx + 4]
call esi
cmp eax, edi
jle 0x1800f26e
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
jmp 0x1800f281
xor ecx, ecx
mov word [eax], cx
jmp 0x1800f281
mov dword [ebp - 4], 0x8007000e
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8
Function at 0x1800f28a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
mov esi, eax
xor ebx, ebx
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 8], ebx
push dword [eax + 4]
mov dword [ebp - 0xc], ebx
call edi
cmp eax, ebx
jle 0x1800f2c6
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
cmp eax, ebx
jne 0x1800f31f
mov eax, dword [ebp - 8]
cmp eax, ebx
je 0x1800f31a
shr eax, 1
inc eax
push eax
call fcn.18004129
cmp eax, ebx
jne 0x1800f2ea
mov dword [ebp - 4], 0x8007000e
jmp 0x1800f310
lea ecx, [ebp - 8]
push ecx
push eax
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp + 8]
push ebx
push dword [ebp + 0xc]
push dword [eax + 4]
call edi
cmp eax, ebx
jle 0x1800f30d
and eax, 0xffff
or eax, 0x80070000
mov dword [ebp - 4], eax
or eax, 0xffffffff
call fcn.18003fe5
jmp 0x1800f31f
call fcn.18004003
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x1800f38c
Capabilities:
Set registry value

Disassembly:
push 4
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
push 4
push 0
push dword [esp + 0x18]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jle 0x1800f3b6
and eax, 0xffff
or eax, 0x80070000
ret 0xc

Function at 0x1800f3b9
Capabilities:
Set registry value

Disassembly:
push 8
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0xc]
push 0xb
push 0
push dword [esp + 0x18]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jle 0x1800f3e3
and eax, 0xffff
or eax, 0x80070000
ret 0x10

Function at 0x1800f46b
Capabilities:
Set registry value

Disassembly:
push dword [esp + 0xc]
push dword [esp + 0xc]
push dword [esp + 0x18]
push 0
push dword [esp + 0x14]
push dword [eax + 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jle 0x1800f494
and eax, 0xffff
or eax, 0x80070000
ret 0x10
Function at 0x1800f7ec
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x180f51f0]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
mov eax, ecx
mov ecx, dword [ebp + 8]
push 0xf003f
push ecx
push dword [eax + 4]
mov ebx, 0x180c36ec
xor edi, edi
lea esi, [ebp - 0x214]
mov dword [ebp - 0x21c], eax
mov dword [ebp - 0x220], ecx
mov dword [ebp - 0x214], ebx
mov dword [ebp - 0x210], edi
call fcn.1800e970
mov esi, eax
cmp esi, 0x80070002
je 0x1800f84c
cmp esi, 0x80070003
jne 0x1800f84f
xor esi, esi
inc esi
cmp esi, edi
je 0x1800f877
lea ecx, [ebp - 0x214]
mov dword [ebp - 0x214], ebx
call fcn.1800e827
mov ecx, dword [ebp - 8]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.1809cca5
leave
ret 4
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
jmp 0x1800f895
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x214]
call fcn.1800f7ec
cmp eax, edi
jne 0x1800f8e0
lea eax, [ebp - 0x228]
push eax
push edi
push edi
push edi
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x20c]
push eax
push edi
push dword [ebp - 0x210]
mov dword [ebp - 0x218], 0x100
call esi
test eax, eax
je 0x1800f87f
lea ecx, [ebp - 0x214]
call fcn.1800e827
push dword [ebp - 0x220]
mov eax, dword [ebp - 0x21c]
call fcn.1800e56d
mov esi, eax
jmp 0x1800f853
Function at 0x18010549
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push edi
xor edi, edi
inc edi
push edi
call esi
push dword [ebp + 0x14]
mov dword [ebp - 8], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
test eax, eax
jne 0x180105ce
call fcn.1800fc86
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
mov dword [ebp - 4], eax
je 0x180105c0
push 0xfffffffffffffffe
push edi
mov dword [ebp - 0x18], ecx
call fcn.18001d8a
push dword [ebp - 4]
mov dword [ebp - 0x14], eax
push dword [ebp + 8]
lea eax, [ebp - 0x18]
push str._Failed_to_GetDiskFreeSpaceEx___s__0x_x_
push eax
mov dword [ebp - 0x10], 0xfffffffe
mov dword [ebp - 0xc], edi
call fcn.18001000
add esp, 0x10
mov edi, dword [ebp - 4]
push dword [ebp - 8]
call esi
mov eax, edi
pop edi
pop esi
leave
ret
xor edi, edi
jmp 0x180105c3

Function at 0x18010fb0
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
or dword [ebp - 4], 0xffffffff
push esi
push edi
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 8]
push ecx
push 4
xor eax, eax
push 0xffffffffffffffff
push eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x18011030
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
mov dword [ebp - 4], ecx
call sub.WTSAPI32.dll_WTSFreeMemory
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18011028
push 6
pop edi
xor esi, esi
push edi
inc esi
push esi
mov dword [ebp - 0x1c], ecx
call fcn.18001d8a
push dword [ebp - 4]
push str._System::GetCurrentSessionId__session_id_from_::WTSQuerySessionInformation___d_
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
call fcn.18001000
add esp, 0xc
mov eax, dword [ebp - 4]
jmp 0x180110b2
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
movzx ecx, byte [0x180fb8d9]
test eax, eax
je 0x18011072
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18011028
push 6
pop edi
xor esi, esi
push edi
inc esi
push esi
mov dword [ebp - 0x1c], ecx
call fcn.18001d8a
push dword [ebp - 4]
push str._System::GetCurrentSessionId__session_id_from_::ProcessIdToSessionId___d_
jmp 0x18011013
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x180110af
push 0xfffffffffffffffe
pop edi
xor esi, esi
push edi
inc esi
push esi
mov dword [ebp - 0x1c], ecx
call fcn.18001d8a
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._System::GetCurrentSessionId___both::WTSQuerySessionInformation_and_::ProcessIdToSessionId_failed__0x_x_
push eax
call fcn.18001000
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
leave
ret
Function at 0x180113c8
Capabilities:
Get session information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
cmp dword [ebp + 8], 0xffffffff
push ebx
je 0x18011496
lea ecx, [ebp - 0xc]
push ecx
lea ecx, [ebp - 8]
push ecx
push 8
push dword [ebp + 8]
xor eax, eax
push eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
je 0x1801144e
mov eax, dword [ebp - 8]
mov ebx, dword [eax]
push eax
call sub.WTSAPI32.dll_WTSFreeMemory
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18011445
push 6
push 1
mov dword [ebp - 0x1c], ecx
call fcn.18001d8a
push ebx
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x1c]
push str._System::IsSessionActive__wts_connect_state__d_
push eax
mov dword [ebp - 0x14], 6
mov dword [ebp - 0x10], 1
call fcn.18001000
add esp, 0xc
xor eax, eax
test ebx, ebx
sete al
jmp 0x18011498
movzx ecx, byte [0x180fb8d9]
neg ecx
sbb ecx, ecx
and ecx, 0x180fbb80
je 0x18011496
push 0xfffffffffffffffe
push 1
mov dword [ebp - 0x1c], ecx
call fcn.18001d8a
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0xfffffffe
mov dword [ebp - 0x10], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x1c]
push str._WTSQuerySessionInformation_failed__0x_x_
push eax
call fcn.18001000
add esp, 0xc
xor al, al
pop ebx
leave
ret

Function at 0x18011768
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x180f51f0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x14]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], bl
mov byte [ebp - 0xa], bl
mov byte [ebp - 9], bl
mov byte [ebp - 8], bl
mov byte [ebp - 7], 5
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
mov dword [ebp - 0x10], eax
cmp eax, ebx
je 0x180117d3
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x14]
push esi
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
jne 0x180117ca
mov dword [ebp - 0x10], ebx
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [ebp - 0x10], ebx
pop ebx
setne al
xor ecx, ebp
call fcn.1809cca5
leave
ret