joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405960
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
push esi
mov dword [0x4bdbf8], eax
cmp word [eax], 0x7e
push edi
mov dword [ebp - 0x14], pe_nt_image_headers32
mov byte [ebp - 1], bl
jne 0x40599a
inc eax
inc eax
mov dword [0x4bdbf8], eax
cmp word [eax], 0x49
sete byte [ebp - 1]
inc eax
inc eax
mov dword [ebp + 8], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp + 8]
push eax
call fcn.00405061
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 0x10]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x4059bc
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.004378b6
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.00438a4a
mov edi, dword [sym.imp.KERNEL32.DLL_lstrlenW]
add esp, 0x10
test al, al
je 0x405a11
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x14], ebx
call fcn.004378b6
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00412515
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x828]
push eax
call fcn.0041255f
add esp, 0xc
push dword [ebp - 0x10]
mov word [ebp + esi - 0x828], bx
mov byte [0x4c1003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 8]
call fcn.0043d3c3
mov eax, dword [ebp - 8]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x405b4e
mov eax, dword [ebp - 8]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 8]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x405a97
mov ax, word [edx]
call fcn.004820ac
test al, al
je 0x405a95
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x405a86
cmp di, bx
mov edx, dword [ebp - 8]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x405ab8
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x4a41e4
push edi
call fcn.0041255f
push esi
push dword [ebp - 0x10]
add edi, 0x1e
push edi
call fcn.00405049
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x405b4b
mov eax, dword [ebp - 0x14]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x828]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x405b4b
cmp byte [ebp - 1], bl
je 0x405b4b
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x828]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405b4b
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp + 8]
call esi
push edi
call esi
lea ecx, [ebp - 8]
call fcn.00437884
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405b5b
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x405b7d
call fcn.004820ac
test al, al
jne 0x405b85
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x405b72
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x405b96
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.0041255f
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405bb6
inc esi
inc esi
mov ax, word [esi]
call fcn.004820ac
test al, al
jne 0x405bb4
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x405c24
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x405c24
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov esi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x405c2a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405d1a
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, str.service:
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.00403ed5
mov edx, eax
mov ecx, edx
call fcn.00403f9c
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x405d68
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00405049
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x405ddd
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp esi, edi
je 0x405ddd
push 0x64
push edi
push esi
call fcn.00403ee8
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4bc0f4], eax
mov dword [0x4bdc00], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4074a2
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
push edi
push 0x169
lea ecx, [ebp - 0x18]
call fcn.0043d3c3
mov eax, dword [ebp - 0x18]
push 0x104
push dword [ebp + 8]
add eax, 0xc8
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.KERNEL32.DLL_lstrcpynW]
xor esi, esi
cmp dword [ebp + 0xc], esi
mov dword [ebp - 0x20], esi
je 0x4074e8
cmp dword [ebp + 0xc], 0xffffffff
mov dword [ebp - 4], 1
jne 0x4074eb
mov dword [ebp - 4], esi
push ebx
mov ebx, dword [ebp + 0x10]
cmp ebx, esi
je 0x407501
push 0x64
mov ecx, ebx
call fcn.0043d3ea
mov eax, dword [ebx]
mov word [eax], si
cmp dword [ebp - 4], esi
je 0x407518
mov ecx, dword [ebp + 0xc]
push 0x64
call fcn.0043d3ea
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov word [eax], si
push 0x4beb4c
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
lea eax, [ebp - 0x28]
push eax
mov dword [ebp - 0x28], esi
call fcn.00403d1f
pop ecx
mov byte [ebp - 0x24], al
lea eax, [ebp - 8]
push eax
push dword [ebp - 0xc]
mov dword [ebp - 8], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, esi
je 0x407626
push edi
push 2
mov dword [ebp - 0x1c], esi
mov dword [ebp + 0x10], esi
call dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.DLL_GlobalLock]
mov esi, eax
push esi
push edi
push dword [ebp - 8]
push dword [ebp - 0xc]
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x10]
push eax
push 0x4a4460
push esi
call sub.VERSION.dll_VerQueryValueW
test ebx, ebx
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
mov edi, str._u._u._u._u
je 0x4075c3
mov eax, dword [ebp + 0x10]
mov dx, word [eax + 0x10]
mov cx, word [eax + 0x12]
mov word [ebp - 0xe], dx
mov dx, word [eax + 0x16]
movzx eax, word [eax + 0x14]
push eax
movzx eax, dx
push eax
movzx eax, word [ebp - 0xe]
push eax
movzx eax, cx
push eax
push edi
push dword [ebx]
call esi
add esp, 0x18
cmp dword [ebp - 4], 0
je 0x4075f4
mov eax, dword [ebp + 0x10]
mov cx, word [eax + 0xa]
mov dx, word [eax + 8]
mov bx, word [eax + 0xe]
movzx eax, word [eax + 0xc]
push eax
movzx eax, bx
push eax
movzx eax, dx
push eax
movzx eax, cx
push eax
mov eax, dword [ebp + 0xc]
push edi
push dword [eax]
call esi
add esp, 0x18
mov eax, dword [ebp + 0x10]
xor edi, edi
xor ecx, ecx
cmp dword [ebp + 0xc], edi
jne 0x407608
mov esi, dword [eax + 0x10]
mov eax, dword [eax + 0x14]
jmp 0x40760e
mov esi, dword [eax + 8]
mov eax, dword [eax + 0xc]
push dword [ebp - 0x14]
or edi, eax
or esi, ecx
call dword [sym.imp.KERNEL32.DLL_GlobalUnlock]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
jmp 0x407629
mov edi, dword [ebp - 0x20]
cmp byte [ebp - 0x24], 0
pop ebx
je 0x407639
push dword [ebp - 0x28]
call fcn.00403d30
pop ecx
push 0x4beb4c
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
lea ecx, [ebp - 0x18]
call fcn.00437884
mov eax, edi
pop edi
mov edx, esi
pop esi
leave
ret
Function at 0x408289
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [0x4bdbf4], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x4082c8
mov eax, dword [edi]
test eax, eax
je 0x4082c8
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x4082e0
push 1
push 0
push str.shutdown__a
call fcn.004058d4
add esp, 0xc
push dword [0x4bdc5c]
call fcn.0040401a
cmp byte [esp + 0x10], 0
pop ecx
je 0x40830c
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.DLL_Sleep]
dec esi
jne 0x4082f6
pop esi
pop ebx
ret
Function at 0x40df44
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4bdcb8
mov dword [0x4bdcb8], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
cmp dword [0x4bdcbc], 5
je 0x40df6c
xor eax, eax
leave
ret
mov eax, dword [0x4bdcc0]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40df87
dec eax
jne 0x40e008
mov ebx, 0x39000
jmp 0x40df8c
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4bdc84]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4bddd8
push esi
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [0x4bdc80]
cmp eax, 0xc0000022
jne 0x40e003
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4bdc80]
push dword [0x4bddd8]
call fcn.0040de76
pop ecx
push dword [0x4bddd8]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4bdc80]
cmp eax, edi
pop esi
jge 0x40e00c
xor eax, eax
jmp 0x40e030
push 0x1000
push ebx
push edi
push 6
push dword [0x4bddd8]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [0x4bddd4], eax
neg eax
sbb eax, eax
and eax, dword [0x4bddd8]
pop edi
pop ebx
leave
ret

Function at 0x40e034
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
test al, 1
jne 0x40e04d
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40e060
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40e0a8
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4bddd8]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
test ecx, 1
jne 0x40e095
xor eax, eax
jmp 0x40e0aa
mov esi, ecx
xor esi, edi
and esi, 0xfff
push eax
xor esi, ecx
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
pop edi
ret

Function at 0x40e0ad
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4bddd4]
call fcn.0040e034
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4bddd8]
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
test eax, eax
jne 0x40e0e2
pop esi
ret
shr esi, 2
and esi, 0x3ff
mov esi, dword [eax + esi*4]
push eax
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x40e1d0
Capabilities:
Check mutex on windows

Disassembly:
push esi
push dword [esp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40e1ee
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40e2c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 7
push 0xc0000000
push str.C:pe.debug.log
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40e31c
push esi
push 2
push ebx
push ebx
push edi
call fcn.004389fe
mov esi, dword [ebp + 8]
add esp, 0x10
cmp byte [esi], bl
je 0x40e314
push ebx
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenA]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40e4ac
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push 0x80000000
push dword [ebp + 8]
call fcn.0040e42b
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40e543
push esi
push eax
call fcn.0040e48a
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40e4de
mov dword [esi], eax
jmp 0x40e4e1
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40e507
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.0043d29b
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.00437884
test edi, edi
je 0x40e537
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
push dword [esi]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_ReadFile]
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x40e526
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.0048f710
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
jmp 0x40e546
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40ebda
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40ebef
mov eax, dword [esp + 4]
mov dword [ecx + 0xc], eax
cmp word [eax], 0x5a4d
je 0x40ebf3
xor eax, eax
jmp 0x40ec5e
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40ec07
xor eax, eax
jmp 0x40ec5d
add eax, edx
mov dword [ecx + 0x10], eax
cmp dword [eax], 0x4550
jne 0x40ec03
mov dx, word [eax + 0x16]
test dh, 0x20
je 0x40ec03
test dl, 2
je 0x40ec03
cmp word [eax + 0x14], 0xe0
jne 0x40ec03
mov esi, dword [ecx + 0x10]
add eax, 0xf8
xor edx, edx
mov dword [ecx + 0x14], eax
cmp word [esi + 6], dx
jbe 0x40ec5a
add eax, 0x10
mov esi, dword [eax + 4]
add esi, dword [eax]
cmp esi, dword [esp + 0xc]
ja 0x40ec03
mov esi, dword [ecx + 0x10]
movzx esi, word [esi + 6]
inc edx
add eax, 0x28
cmp edx, esi
jl 0x40ec40
xor eax, eax
inc eax
pop esi
ret 8
Function at 0x40ecd2
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [0x4bde94], ebx
je 0x40ed46
cmp byte [ebp + 8], bl
je 0x40ed46
cmp dword [0x4bdf90], ebx
jle 0x40ed46
mov eax, dword [0x4bdf8c]
cmp word [eax], bx
je 0x40ed46
test byte [0x4be308], 2
push eax
je 0x40ed23
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
push dword [0x4bdf8c]
push dword [0x4bde94]
call dword [sym.imp.KERNEL32.DLL_WriteConsoleW]
jmp 0x40ed46
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
add eax, eax
push eax
push dword [0x4bdf8c]
mov dword [ebp - 4], ebx
push dword [0x4bde94]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [0x4bdf94]
dec eax
cmp eax, 0x1ffff
jb 0x40ed6c
push 0x10002
mov ecx, 0x4bdf8c
mov dword [0x4bdf94], 0x10000
call fcn.0043d3ea
mov eax, dword [0x4bdf8c]
mov word [eax], bx
mov dword [0x4bdf90], ebx
pop ebx
leave
ret

Function at 0x40f0a3
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
xor esi, esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.DLL_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], esi
je 0x40f0db
cdq
jmp 0x40f0ee
cmp dword [ebp + 0xc], esi
je 0x40f0e8
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40f0ee
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret
Function at 0x40f8c1
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 4], 0
push ebx
push esi
push edi
push 0x325
lea ecx, [ebp - 8]
call fcn.0043d3c3
mov esi, dword [ebp - 8]
push esi
push 0x324
call dword [sym.imp.KERNEL32.DLL_GetLogicalDriveStringsW]
mov ebx, dword [ebp + 8]
mov edi, dword [sym.imp.USER32.dll_CharUpperW]
push ebx
call edi
push esi
call edi
cmp word [esi], 0
je 0x40f955
mov eax, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
add eax, 0x10
mov dword [ebp - 0xc], eax
push esi
call fcn.0040f0f1
cmp eax, dword [ebp - 0xc]
pop ecx
jb 0x40f944
push esi
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeW]
dec eax
dec eax
je 0x40f93e
dec eax
jne 0x40f944
mov ax, word [esi]
mov word [edi + 2], ax
mov cx, word [esi]
xor eax, eax
inc eax
cmp cx, word [ebx]
mov dword [ebp - 4], eax
jb 0x40f944
mov esi, eax
jmp 0x40f958
mov ax, word [esi]
mov word [edi], ax
push esi
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
lea esi, [esi + eax*2 + 2]
cmp word [esi], 0
jne 0x40f90b
mov esi, dword [ebp - 4]
lea ecx, [ebp - 8]
call fcn.00437884
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x40fd99
Capabilities:
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x140
push ebx
push edi
xor edi, edi
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40fdca
xor eax, eax
jmp 0x40fe39
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push 0x40
lea eax, [ebp - 0x48]
push eax
push ebx
mov dword [ebp - 8], edi
call esi
cmp dword [ebp - 4], 0x40
jne 0x40fe2e
cmp word [ebp - 0x48], 0x5a4d
jne 0x40fe2e
push edi
push edi
push dword [ebp - 0xc]
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, 0xffffffff
je 0x40fe2e
push edi
lea eax, [ebp - 4]
push eax
mov edi, 0xf8
push edi
lea eax, [ebp - 0x140]
push eax
push ebx
call esi
cmp dword [ebp - 4], edi
jne 0x40fe2e
cmp dword [ebp - 0x140], 0x4550
jne 0x40fe2e
mov dword [ebp - 8], 1
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [ebp - 8]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40fe66
Capabilities:
Terminate process

Disassembly:
push esi
push dword [esp + 8]
push 0
push 1
call dword [sym.imp.KERNEL32.DLL_OpenProcess]
mov esi, eax
test esi, esi
je 0x40fe9c
push dword [esp + 0xc]
push esi
call dword [sym.imp.KERNEL32.DLL_TerminateProcess]
test eax, eax
je 0x40fe95
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40fe95
and dword [eax], 0
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop esi
ret
Function at 0x40fe9e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push 0x20a
lea ecx, [ebp - 4]
call fcn.0043d3c3
mov eax, dword [ebp - 4]
mov word [eax], 0x20
mov eax, dword [ebp - 4]
and word [eax + 2], 0
mov eax, dword [ebp - 4]
push 0x208
add eax, 2
push eax
push str.SystemRoot
call dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
push str.System32OnShutdown.wcs
lea ecx, [ebp - 4]
call fcn.0043d411
mov bl, byte [ebp + 0xc]
test bl, 0x20
mov esi, str.unknown
je 0x40fef9
mov esi, 0x4a453c
test bl, 0x10
je 0x40ff03
mov esi, str.reboot
test bl, 2
je 0x40ff0d
mov esi, str.logout
test bl, 4
je 0x40ff17
mov esi, str.suspend
test bl, 8
je 0x40ff21
mov esi, str.hiber
test bl, 0x40
je 0x40ff2b
mov esi, str.poweroff
test bl, bl
jns 0x40ff34
mov esi, str.lock
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.DLL_lstrlenW]
push esi
lea ecx, [ebp - 4]
mov edi, eax
call fcn.0043d411
push 0x4a4274
lea ecx, [ebp - 4]
call fcn.0043d411
cmp dword [ebp + 8], 0
je 0x40ff66
push dword [ebp + 8]
lea ecx, [ebp - 4]
call fcn.0043d411
push dword [ebp - 4]
mov esi, 0x4bdfa0
mov ecx, esi
call fcn.0042edd5
push str._25INDATA
lea ecx, [ebp - 8]
call fcn.00445746
mov eax, dword [ebp - 4]
lea eax, [eax + edi*2]
push eax
lea ecx, [ebp - 8]
call fcn.0043d411
test bl, 0x70
je 0x40ffa0
push dword [ebp - 8]
mov ecx, esi
call fcn.0042edd5
lea ecx, [ebp - 8]
call fcn.00437884
lea ecx, [ebp - 4]
call fcn.00437884
pop edi
pop esi
pop ebx
leave
ret

Function at 0x410065
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, 0x4a5b6c
lea edi, [ebp - 0x10]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
mov edi, 0x4bdfa0
movsx ax, byte [ebp - 2]
add eax, 0x41
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.DLL_GetDriveTypeW]
cmp eax, 5
jne 0x4100ff
movsx ebx, byte [ebp - 1]
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x218]
push str.HKLMSYSTEMCurrentControlSetControlSession_ManagerEnvironmentCDROM_u_s
push eax
call esi
add esp, 0x10
push 0
lea eax, [ebp - 0x218]
push eax
mov ecx, edi
call fcn.00455ccf
lea eax, [ebp - 0x10]
push eax
push ebx
lea eax, [ebp - 0x218]
push str.CDROM_u
push eax
call esi
add esp, 0x10
inc byte [ebp - 1]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x218]
push eax
mov ecx, edi
call fcn.0043cc80
inc byte [ebp - 2]
cmp byte [ebp - 2], 0x1a
jl 0x41008f
cmp byte [ebp - 1], 0
pop edi
pop esi
pop ebx
jle 0x410123
mov ecx, dword [ebp + 8]
xor eax, eax
push eax
push eax
push eax
push str.THREAD_Envi
call fcn.0042cae7
leave
ret