joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1003deb0
Capabilities:
Get storage device properties

Disassembly:
push 0xffffffffffffffff
push 0x1005723b
mov eax, dword fs:[0]
push eax
sub esp, 0xb38
mov eax, dword [0x1006c3ac]
xor eax, esp
mov dword [esp + 0xb34], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1006c3ac]
xor eax, esp
push eax
lea eax, [esp + 0xb4c]
mov dword fs:[0], eax
mov eax, dword [esp + 0xb5c]
mov dword [esp + 0x1c], eax
xor al, al
xor ebx, ebx
mov byte [esp + 0x17], al
xor ebp, ebp
cmp al, bl
jne 0x1003e093
push 0x200
lea ecx, [esp + 0x14c]
push ebx
push ecx
call fcn.10042250
push ebp
lea edx, [esp + 0x158]
push str..PhysicalDrive_d
push edx
mov edx, 0xff
call fcn.1003e3f0
add esp, 0x18
push ebx
push ebx
push 3
push ebx
push 3
push ebx
lea eax, [esp + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1003e085
xor eax, eax
push 0x800
lea ecx, [esp + 0x34c]
push ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
push ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
call fcn.10042250
add esp, 0xc
push ebx
lea edx, [esp + 0x1c]
push edx
push 0x800
lea eax, [esp + 0x354]
push eax
push 0xc
lea ecx, [esp + 0x50]
push ecx
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x1003e078
push 0xff
lea edx, [esp + 0x4d]
push ebx
push edx
call fcn.10042250
mov eax, dword [esp + 0x36c]
add esp, 0xc
cmp eax, ebx
mov byte [esp + 0x48], bl
jle 0x1003dfe7
lea edi, [esp + 0x48]
lea ecx, [esp + 0x348]
call fcn.1003e0c0
movsx eax, byte [esp + 0x48]
push eax
call fcn.10042058
add esp, 4
test eax, eax
jne 0x1003e00b
movsx ecx, byte [esp + 0x5b]
push ecx
call fcn.10042058
add esp, 4
test eax, eax
je 0x1003e07e
lea eax, [esp + 0x48]
mov dword [esp + 0x38], 0xf
mov dword [esp + 0x34], ebx
mov byte [esp + 0x24], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x1003e022
sub eax, edx
push eax
lea edx, [esp + 0x4c]
push edx
lea ecx, [esp + 0x28]
call fcn.100028e0
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0xb60], ebx
call fcn.10002800
mov dword [esp + 0xb54], 0xffffffff
cmp dword [esp + 0x38], 0x10
jb 0x1003e071
mov ecx, dword [esp + 0x24]
push ecx
call fcn.1003f2c6
add esp, 4
mov byte [esp + 0x17], 1
jmp 0x1003e07e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0x17]
inc ebp
cmp ebp, 0x10
jl 0x1003df00
mov ecx, dword [esp + 0xb4c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xb34]
xor ecx, esp
call fcn.1003f2d1
add esp, 0xb44
ret 4
Function at 0x1003e210
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x100571fb
mov eax, dword fs:[0]
push eax
sub esp, 0x460
mov eax, dword [0x1006c3ac]
xor eax, esp
mov dword [esp + 0x45c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1006c3ac]
xor eax, esp
push eax
lea eax, [esp + 0x474]
mov dword fs:[0], eax
mov eax, dword [esp + 0x484]
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
xor bl, bl
xor esi, esi
mov dword [esp + 0x1c], eax
mov byte [esp + 0x17], bl
mov dword [esp + 0x18], esi
test bl, bl
jne 0x1003e3c0
push 0x200
lea ecx, [esp + 0x274]
push 0
push ecx
call fcn.10042250
push esi
lea edx, [esp + 0x280]
push str..Scsi_d:
push edx
mov edx, 0xff
call fcn.1003e3f0
add esp, 0x18
push 0
push 0
push 3
push 0
push 3
push 0xc0000000
lea eax, [esp + 0x288]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x1003e3b2
xor ebx, ebx
push 0x22d
lea ecx, [esp + 0x44]
push 0
push ecx
call fcn.10042250
mov edx, dword [str.SCSIDISK]
mov eax, dword [0x1006288c]
add esp, 0xc
push 0
lea ecx, [esp + 0x24]
push ecx
push 0x22d
mov dword [esp + 0x50], edx
lea edx, [esp + 0x4c]
push edx
push 0x3c
mov dword [esp + 0x5c], eax
mov eax, edx
push eax
push 0x4d008
push edi
mov dword [esp + 0x60], 0x1c
mov dword [esp + 0x6c], 0x2710
mov dword [esp + 0x78], 0x211
mov dword [esp + 0x70], 0x1b0501
mov byte [esp + 0x86], 0xec
mov byte [esp + 0x88], bl
call ebp
test eax, eax
je 0x1003e399
cmp byte [esp + 0xa2], 0
je 0x1003e399
push 0x13
push 0xa
lea ecx, [esp + 0x74]
lea esi, [esp + 0x2c]
call fcn.1003dcc0
mov ecx, dword [esp + 0x1c]
push 0xffffffffffffffff
push 0
push eax
mov dword [esp + 0x488], 0
call fcn.10002800
mov dword [esp + 0x47c], 0xffffffff
cmp dword [esp + 0x3c], 0x10
jb 0x1003e394
mov ecx, dword [esp + 0x28]
push ecx
call fcn.1003f2c6
add esp, 4
mov byte [esp + 0x17], 1
inc ebx
cmp ebx, 2
jl 0x1003e2c9
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [esp + 0x17]
mov esi, dword [esp + 0x18]
inc esi
cmp esi, 0x10
mov dword [esp + 0x18], esi
jl 0x1003e268
mov al, bl
mov ecx, dword [esp + 0x474]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x45c]
xor ecx, esp
call fcn.1003f2d1
add esp, 0x46c
ret 4

Function at 0x1003f2d1
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x1006c3ac]
jne 0x1003f2db
repz ret
jmp fcn.1004573a
Function at 0x10051fdc
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.10045c7f
and dword [ebp - 4], 0
cmp dword [0x1006f120], 0
mov ebx, eax
jne 0x1005208d
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x1005213e
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x1005213e
push eax
call fcn.10045c0d
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x1006f120], eax
call esi
push eax
call fcn.10045c0d
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x1006f124], eax
call esi
push eax
call fcn.10045c0d
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x1006f128], eax
call esi
push eax
call fcn.10045c0d
pop ecx
mov dword [0x1006f130], eax
test eax, eax
je 0x1005208d
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.10045c0d
pop ecx
mov dword [0x1006f12c], eax
mov eax, dword [0x1006f12c]
cmp eax, ebx
je 0x100520e5
cmp dword [0x1006f130], ebx
je 0x100520e5
push eax
call fcn.10045c88
push dword [0x1006f130]
mov esi, eax
call fcn.10045c88
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x100520e5
test edi, edi
je 0x100520e5
call esi
test eax, eax
je 0x100520dc
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x100520dc
test byte [ebp - 0xc], 1
jne 0x100520e5
or dword [ebp + 0x10], 0x200000
jmp 0x1005211e
mov eax, dword [0x1006f124]
cmp eax, ebx
je 0x1005211e
push eax
call fcn.10045c88
pop ecx
test eax, eax
je 0x1005211e
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x1005211e
mov eax, dword [0x1006f128]
cmp eax, ebx
je 0x1005211e
push eax
call fcn.10045c88
pop ecx
test eax, eax
je 0x1005211e
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x1006f120]
call fcn.10045c88
pop ecx
test eax, eax
je 0x1005213e
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x10052140
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x430000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
mov eax, section..text
nop
nop
nop
nop
push 4
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x430072
nop
nop
mov ebx, 0x408ecc
nop
nop
mov ecx, ebx
nop
nop
nop
nop
nop
nop
sub ecx, eax
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0xb2c0ca2
nop
xor dword [eax], esi
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
nop
loop 0x430060
nop
nop
mov eax, section..data
cmp eax, 0
nop
nop
nop
nop
nop
je 0x4300d2
nop
nop
nop
mov ebx, 0x42e1d0
nop
nop
nop
nop
mov ecx, ebx
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
div edi
nop
nop
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x4a4602d1
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
loop 0x4300c0
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x418780]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x418782], bx
je 0x401027
call eax
mov dword [0x418780], eax
push eax
call fcn.004021a4
push eax
call fcn.00408d3b
pop ecx
jmp 0x4010a4
push 0x27
call fcn.004021a4
mov esi, dword [ebp + 8]
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [esi]
push eax
lea eax, [ebp - 0x904]
push eax
call edi
add esp, 0x14
cmp dword [esi + 0x10], ebx
mov dword [ebp - 4], ebx
jbe 0x401098
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x104]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x401063
lea eax, [ebp - 0x904]
push eax
call fcn.00408d3b
pop ecx
call fcn.0040447d
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40161a
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [esi + 8]
call fcn.0040ec65
push dword [ebp + 0xc]
lea edi, [esi + 0xc]
mov ecx, edi
call fcn.00401379
push 0x5c
mov ecx, edi
call fcn.0040152f
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x4012ec
push edi
push edi
mov dword [0x418784], esi
mov dword [0x41878c], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x4187cc], 2
mov dword [0x418788], eax
je 0x401677
call fcn.0040857f
push 0xffffffffffffffff
push dword [0x418788]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41878c]
cmp eax, edi
mov dword [0x418860], edi
je 0x4016c6
cmp eax, 1
je 0x4016ba
cmp eax, 2
je 0x4016b6
cmp eax, 3
je 0x4016b2
cmp eax, 0x67
jle 0x4016ad
cmp eax, 0x6a
jle 0x40172a
push eax
push 0x14
jmp 0x4016fd
push 0x12
jmp 0x4016bc
push 0x13
jmp 0x4016bc
push 0x11
push edi
call fcn.00408e1f
pop ecx
pop ecx
jmp 0x40172a
cmp dword [0x418868], edi
jne 0x40172a
lea eax, [ebp + 8]
push eax
push dword [0x418788]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x4016ed
cmp ecx, edi
jne 0x4016ed
xor eax, eax
jmp 0x40172f
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x401700
push ecx
push 0x21
push edi
jmp 0x401722
and ecx, 0xffff
cmp ecx, 0xe
jne 0x401714
cmp dword [0x4187d0], 0xffffffff
je 0x40172a
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00408e1f
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401b7e
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401ba9
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401bbf
test al, 0x10
jne 0x401bbf
push esi
jmp 0x401b9f
xor eax, eax
inc eax
pop esi
ret

Function at 0x401de6
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebx, eax
movzx eax, word [0x418790]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x401e2a
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x401e50
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x401e3b
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x401e50
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x401eca
cmp dword [0x4187a0], 0
jne 0x401ec8
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x4187a0], 1
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0
mov dword [ebp - 4], eax
movzx eax, word [0x418790]
push 0x409
push 0
push eax
lea eax, [ebp - 0x44]
push str._04X_c_04X_c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 4], 0
jne 0x401ebd
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x401ec8
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call dword [ebp - 4]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4021a4
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp dword [0x418080], ebx
je 0x4021d7
mov eax, 0x418080
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4021d7
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x418080]
cmp dword [eax], ebx
jne 0x4021c0
shl esi, 4
cmp dword [esi + 0x418080], ebx
jne 0x4021ec
mov eax, 0x4144d8
jmp 0x40235e
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x68]
push str.7zSfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x68]
push eax
call ebx
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x40229c
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
add eax, 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, dword [ebp - 4]
inc ecx
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x68]
push eax
call ebx
cmp eax, dword [ebp - 4]
ja 0x402293
call edi
test eax, eax
jne 0x402293
mov eax, dword [esi + 0x41808c]
test eax, eax
je 0x402288
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402285
push dword [esi + 0x41808c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41808c], edi
jmp 0x40229b
push edi
jmp 0x402296
mov eax, dword [ebp - 8]
mov dword [esi + 0x41808c], eax
jmp 0x40229c
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x41808c]
test eax, eax
jne 0x40235d
mov ebx, dword [esi + 0x418084]
lea edi, [esi + 0x418088]
cmp dword [edi], eax
je 0x4022d2
call fcn.0040214e
cmp eax, dword [0x4152c4]
jne 0x4022d2
mov ebx, dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [0x418054], 0xffffffff
pop ecx
mov dword [esi + 0x41808c], eax
jne 0x40233d
and dword [0x418054], 0
push 0x1f
lea eax, [ebp - 0xa8]
push eax
movzx eax, word [0x418790]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40233d
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x418054], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41808c]
push edi
push ebx
push 0
push dword [0x418054]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41808c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40246b
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4024c8
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x40271b
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x40272b
xor eax, eax
leave
ret
test byte [0x4187d0], 2
mov dword [ebp - 0x40], 0x40
jne 0x402780
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402780
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402780
jb 0x40275c
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402780
push 0x2b
call fcn.004021a4
push eax
call fcn.00408db2
cmp eax, 1
pop ecx
pop ecx
je 0x402779
or dword [0x4187d0], 0xffffffff
jmp 0x402727
or dword [0x4187d0], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402bc5
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.00401461
cmp dword [ebp - 4], 1
jg 0x402be3
push 1
lea ecx, [ebp - 0xc]
call fcn.0040117b
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402c07
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402c3e
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.004024cb
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00401167
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.004013b2
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x402f3a
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004027bd
push 0x4145e0
lea ecx, [ebp - 0xc]
call fcn.004027f6
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403016
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00401379
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.0040152f
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.004027f6
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x402fe5
push 0x4145dc
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402ff9
push 0x4145d4
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x402ff9
push edi
call fcn.00402f3a
pop ecx
jmp 0x402ff5
push 0
push edi
call esi
test eax, eax
je 0x403039
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x403039
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402f80
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x403039
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x403039
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x403041
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403047
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x418874], 0
je 0x403054
xor eax, eax
inc eax
ret
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40306a
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x403088
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403084
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00402f3a
pop ecx
pop esi
ret

Function at 0x40313e
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.00401461
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x40317c
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.004024cb
push eax
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [edi]
and word [eax + esi*2], 0
mov dword [edi + 4], esi
mov eax, edi
pop edi
pop esi
ret
Function at 0x4032d1
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 1
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call edi
mov esi, dword [ebp + 8]
mov ecx, esi
mov ebx, eax
call fcn.00401461
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.004024cb
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.004024cb
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.00401167
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4033f8
xor eax, eax
jmp 0x403451
test al, 0x10
je 0x403409
push 0x10
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x403451
mov eax, dword [0x4187d4]
test eax, eax
jne 0x40341b
push esi
call fcn.004033ae
pop ecx
jmp 0x403451
cmp eax, 2
jne 0x40344e
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x403412
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 0xc]
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x403412
xor eax, eax
inc eax
pop esi
leave
ret