joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b8e8c
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
call fcn.00424ac4
cmp eax, 2
jne 0x4b8ef4
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x4b8eaf
xor eax, eax
jmp 0x4b8f03
lea eax, [esp + 8]
push eax
push 0x4b8f08
push 0
call sub.advapi32.dll_LookupPrivilegeValueW
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError
test eax, eax
je 0x4b8ef4
xor eax, eax
jmp 0x4b8f03
push 0
push 2
call sub.user32.dll_ExitWindowsEx
cmp eax, 1
sbb eax, eax
inc eax
add esp, 0x14
ret

Function at 0x4b8f30
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
mov esi, ecx
dec esi
test esi, esi
jl 0x4b8f8a
inc esi
xor edi, edi
cmp edi, 1
jne 0x4b8f56
mov eax, dword [ebp + 0xc]
push eax
call sub.kernel32.dll_Sleep
jmp 0x4b8f64
cmp edi, 1
jle 0x4b8f64
mov eax, dword [ebp + 8]
push eax
call sub.kernel32.dll_Sleep
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.0042c270
test eax, eax
jne 0x4b8f8a
call sub.kernel32.dll_GetLastError
cmp eax, 2
je 0x4b8f8a
call sub.kernel32.dll_GetLastError
cmp eax, 3
je 0x4b8f8a
inc edi
dec esi
jne 0x4b8f46
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 8

Function at 0x4b8f94
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, eax
push 2
lea eax, [ebp - 4]
push eax
push 0x20001004
movzx eax, bx
push eax
call sub.kernel32.dll_GetLocaleInfoW
test eax, eax
jle 0x4b8fb8
mov eax, dword [ebp - 4]
jmp 0x4b8fbb
or eax, 0xffffffff
pop ebx
pop ecx
pop ebp
ret
Function at 0x4b8fc0
Capabilities:
Identify system language via api

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, ecx
mov byte [ebp - 1], dl
mov edi, eax
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [eax], edx
mov byte [ebp - 2], 0
test esi, esi
je 0x4b900d
xor ebx, ebx
jmp 0x4b9002
mov eax, dword [ebp - 8]
mov edx, dword [eax]
mov eax, esi
call fcn.0041e3e8
test eax, eax
jne 0x4b9001
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 2
jmp 0x4b90b8
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4b8fe3
movzx eax, byte [ebp - 1]
sub al, 1
jb 0x4b9019
je 0x4b9022
jmp 0x4b902b
call fcn.00428068
mov esi, eax
jmp 0x4b902d
call sub.kernel32.dll_GetUserDefaultLangID
mov esi, eax
jmp 0x4b902d
xor esi, esi
test si, si
je 0x4b90b8
xor ebx, ebx
jmp 0x4b9053
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
movzx edx, si
cmp eax, edx
jne 0x4b9052
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x4b90b8
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4b903a
xor ebx, ebx
jmp 0x4b90ad
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x28]
and eax, 0x3ff
mov dx, 0x3ff
and dx, si
movzx edx, dx
cmp eax, edx
jne 0x4b90ac
mov ax, 0x3ff
and ax, si
cmp ax, 4
jne 0x4b90a1
mov eax, dword [ebp - 8]
movzx eax, word [eax + 0x28]
call fcn.004b8f94
push eax
mov eax, esi
call fcn.004b8f94
pop edx
cmp edx, eax
jne 0x4b90ac
mov eax, dword [ebp + 8]
mov dword [eax], ebx
mov byte [ebp - 2], 1
jmp 0x4b90b8
inc ebx
lea edx, [ebp - 8]
mov eax, ebx
call edi
test al, al
jne 0x4b9062
movzx eax, byte [ebp - 2]
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret 4

Function at 0x4b94a4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4b957d
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4b9598
push ebx
push 0x4b95a8
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.0040a4fc
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.0040754c
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0040a224
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x4b9526
mov ax, 0x83
call fcn.004b90c8
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle
call fcn.004b9478
push 0x4ff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
cmp eax, 1
je 0x4b952f
call fcn.004b9478
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4b9584
lea eax, [ebp - 4]
call fcn.004097dc
pop eax
jmp eax
Function at 0x4b9698
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov dword [esp], eax
lea esi, [esp + 0x30]
lea eax, [esp + 0xc]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edi, dword [esp]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4b9761
jmp 0x4b9755
cmp dword [esi + 0x10], 0x1000
jne 0x4b9743
test byte [esi + 0x15], 1
jne 0x4b9743
mov byte [esp + 4], 0
mov ebp, dword [esi + 0x14]
cmp ebp, 1
je 0x4b96f4
cmp ebp, 2
je 0x4b96f4
cmp ebp, 0x10
je 0x4b96f4
cmp ebp, 0x20
jne 0x4b9710
lea eax, [esp + 8]
push eax
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4b9710
mov byte [esp + 4], 1
xor ebx, ebx
jmp 0x4b9721
mov eax, dword [esi]
add eax, ebx
call fcn.004b9690
add ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0xc]
jb 0x4b9714
cmp byte [esp + 4], 0
je 0x4b9743
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov edi, dword [esi]
add edi, dword [esi + 0xc]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4b9761
mov eax, dword [esi + 4]
cmp eax, dword [esp]
je 0x4b96c9
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x401a6c
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x4ad14c]
jne 0x401a76
repz ret
jmp fcn.004025a5

Function at 0x40b17e
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x4ad14c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.004043d4
and dword [ebp - 0x14], 0
cmp dword [0x4af7d8], 0
mov dword [ebp - 0x18], eax
jne 0x40b231
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x40b2d9
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x40b2d9
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x4af7d8], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x4af7dc], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x4af7e0], eax
call edi
push eax
call esi
mov dword [0x4af7e8], eax
test eax, eax
je 0x40b231
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x4af7e4], eax
mov eax, dword [0x4af7e4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x40b28a
cmp dword [0x4af7e8], ecx
je 0x40b28a
push eax
call esi
push dword [0x4af7e8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x40b28a
test ebx, ebx
je 0x40b28a
call edi
test eax, eax
je 0x40b281
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x40b281
test byte [ebp - 8], 1
jne 0x40b28a
or dword [ebp + 0x10], 0x200000
jmp 0x40b2bd
mov eax, dword [0x4af7dc]
cmp eax, dword [ebp - 0x18]
je 0x40b2bd
push eax
call esi
test eax, eax
je 0x40b2bd
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x40b2bd
mov eax, dword [0x4af7e0]
cmp eax, dword [ebp - 0x18]
je 0x40b2bd
push eax
call esi
test eax, eax
je 0x40b2bd
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x4af7d8]
call esi
test eax, eax
je 0x40b2d9
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x40b2db
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401a6c
leave
ret
Function at 0x4a6050
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x4ad14c]
xor eax, esp
mov dword [esp + 0x418], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push edi
mov dword [esp + 0xc], eax
cmp dword [ebp + 0xc], esi
jle 0x4a612b
mov edi, dword [sym.imp.KERNEL32.dll_IsBadStringPtrA]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebp + 0xc], 0x2d
jne 0x4a60b8
push 0
push str.fikojini_zujokobixexezonakeweguneleg_lejoyuxalanetexitevelanebubu_satoretik_tajufejefavohiyelirixago
call edi
push str.fepekoniguvisenevuwuki_jin
push str.pocudinapefiwuwuracuyehopasa
push str.giciyojozabuxos_joguzi_zunibizece
push str.cerowitalapotovonemadudukadoga_wumivuxikeyiwezayopoyevocirah_fuhehoguh_nivipapeniloxaceyobogetamixari_fufozimepofezawipogobonemetibe
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
call fcn.004a5fa0
mov ecx, dword [esp + 0xc]
xor byte [ecx + esi], al
cmp dword [ebp + 0xc], 0xf
jne 0x4a6121
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
xor eax, eax
push eax
lea edx, [esp + 0x24]
push edx
push 0x4aaf88
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov dword [esp + 0x26], eax
mov word [esp + 0x2a], ax
xor ecx, ecx
lea eax, [esp + 0x1c]
push eax
push ecx
push ecx
mov word [esp + 0x28], cx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
push str.yiwozifedewuricotaducoxitajodeta
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoW]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
inc esi
cmp esi, dword [ebp + 0xc]
jl 0x4a608b
cmp dword [ebp + 0xc], 0x2d
jne 0x4a6145
mov dword [0x4b08d0], 0xa62e7790
mov dword [0x4b08d4], 0xffffffff
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401a6c
mov esp, ebp
pop ebp
ret
Function at 0x4a6520
Capabilities:
Access the windows event log
Manipulate console buffer
Set file attributes

Disassembly:
sub esp, 0x14
mov eax, dword [0x4b08c4]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_WriteConsoleOutputCharacterA]
push esi
mov dword [esp + 0x10], 0x1540b5
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x14]
cmp eax, 0xcc1
jne 0x4a655a
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov eax, dword [0x4b08c4]
mov dword [0x4b052c], 0x8e468c60
cmp eax, 0x3dc
jne 0x4a65b9
push 0
push 0x4ab1f8
call ebx
xor eax, eax
lea edx, [esp + 0x18]
push edx
push eax
push eax
push eax
push eax
mov dword [esp + 0x24], eax
call ebp
push 0
lea ecx, [esp + 0x20]
push ecx
lea edx, [esp + 0x28]
push edx
push esi
push 0
push 0
push edi
push 0
push 0
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_AccessCheckByTypeResultList]
push str.rugenalef
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenWaitableTimerA]
mov eax, dword [0x4b08c4]
dec dword [esp + 0x14]
jne 0x4a6548
mov edi, dword [sym.imp.ADVAPI32.dll_OpenEventLogW]
xor esi, esi
mov ebp, 0xec58acac
or ebx, 0xffffffff
nop
cmp eax, 0x997
jne 0x4a65e2
push 0
push 0
call edi
mov eax, dword [0x4b08c4]
cmp esi, 0x846373
jne 0x4a65f9
mov eax, dword [0x4aead0]
add eax, 0xa231
mov dword [0x4b08c4], eax
cmp eax, 0x141
jne 0x4a660c
mov dword [0x4afd18], ebp
mov dword [0x4afd1c], ebx
inc esi
cmp esi, 0x123c962
jl 0x4a65d0
call fcn.004a61a0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x4021d0
Capabilities:
Stop service

Disassembly:
sub esp, 0x1c
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
je 0x40222f
push esi
push 0xf01ff
push str.ASMIO
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
call edi
test esi, esi
je 0x402227
push ebx
lea eax, [esp + 0xc]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
push esi
mov ebx, eax
call edi
mov eax, ebx
pop ebx
pop esi
pop edi
add esp, 0x1c
ret
pop esi
xor eax, eax
pop edi
add esp, 0x1c
ret
xor eax, eax
pop edi
add esp, 0x1c
ret

Function at 0x402260
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x402279
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4022b4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x4022b0
lea ebx, [ebx]
cmp esi, eax
jae 0x4022b4
sub ecx, 1
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x4022a0
cmp esi, eax
jb 0x4022ba
pop esi
pop edi
xor eax, eax
pop ebx
ret
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret
Function at 0x404980
Capabilities:
Suspend thread
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a80c0
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4ecba0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edx, dword [0x4ee1d0]
mov edi, dword [sym.imp.KERNEL32.dll_SuspendThread]
xor esi, esi
mov dword [ebp - 0x18], esi
mov byte [ebp - 0x12], 1
mov dword [ebp - 4], esi
cmp dword [edx + 0xfb50], esi
je 0x404add
mov eax, dword [edx + 0xfb50]
mov eax, dword [eax + 0x2c]
cmp eax, 0xffffffff
je 0x404add
push eax
call edi
mov edx, dword [0x4ee1d0]
mov eax, dword [edx + 0xfb50]
mov ebx, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [eax + 0x2c]
push ecx
call ebx
mov edx, dword [ebp - 0x18]
mov eax, dword [0x4ee1d0]
mov ecx, dword [eax + 0xfb50]
push edx
mov edx, dword [ecx + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [0x4ee1d0]
push eax
push 0x1849
push str.CMPToolDlg::bDeleteAllThread
push str._s:_d:_bDeleteAllThread:_m_pAutoThread___dwErrorCode__d
mov dword [ecx + 0xfb50], esi
call fcn.0044b650
mov edx, dword [0x4ee1d0]
add esp, 0x10
xor cl, cl
mov byte [ebp - 0x11], cl
cmp cl, 0x10
jae 0x404ae8
movzx esi, cl
cmp dword [edx + esi*4 + 0xfb08], 0
je 0x404ad4
mov eax, dword [edx + esi*4 + 0xfb08]
mov eax, dword [eax + 0x2c]
cmp eax, 0xffffffff
je 0x404ad4
push eax
call edi
mov edx, dword [0x4ee1d0]
mov eax, dword [edx + esi*4 + 0xfb08]
lea ecx, [ebp - 0x18]
push ecx
mov ecx, dword [eax + 0x2c]
push ecx
call ebx
mov edx, dword [ebp - 0x18]
mov eax, dword [0x4ee1d0]
mov ecx, dword [eax + esi*4 + 0xfb08]
push edx
mov edx, dword [ecx + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [0x4ee1d0]
push eax
push esi
push 0x1858
push str.CMPToolDlg::bDeleteAllThread
push str._s:_d:_bDeleteAllThread:_TerminateThread__d____dwErrorCode__d
mov dword [ecx + esi*4 + 0xfb08], 0
call fcn.0044b650
mov edx, dword [0x4ee1d0]
mov cl, byte [ebp - 0x11]
add esp, 0x14
inc cl
xor esi, esi
jmp 0x404a45
mov ebx, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
jmp 0x404a43
cmp dword [edx + 0xfb04], esi
je 0x404b5a
mov edx, dword [edx + 0xfb04]
mov eax, dword [edx + 0x2c]
cmp eax, 0xffffffff
je 0x404b5a
push eax
call edi
mov ecx, dword [0x4ee1d0]
mov edx, dword [ecx + 0xfb04]
lea eax, [ebp - 0x18]
push eax
mov eax, dword [edx + 0x2c]
push eax
call ebx
mov ecx, dword [ebp - 0x18]
mov edx, dword [0x4ee1d0]
mov eax, dword [edx + 0xfb04]
push ecx
mov ecx, dword [eax + 0x2c]
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [0x4ee1d0]
push eax
movzx eax, byte [ebp - 0x11]
push eax
push 0x1864
push str.CMPToolDlg::bDeleteAllThread
push str._s:_d:_bDeleteAllThread:_TerminateThread_m_pMainThread___dwErrorCode__d
mov dword [edx + 0xfb04], esi
call fcn.0044b650
add esp, 0x14
mov al, byte [ebp - 0x12]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x405bf0
Capabilities:
Get disk information via ioctl
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x454
mov eax, dword [0x4ecba0]
xor eax, esp
mov dword [esp + 0x450], eax
mov eax, dword [esp + 0x460]
push str.Floppy
push eax
call fcn.0048f5d0
add esp, 8
test eax, eax
mov eax, dword [esp + 0x45c]
setne cl
sub eax, 2
je 0x405c56
sub eax, 1
je 0x405c61
sub eax, 2
je 0x405c4d
xor eax, eax
mov ecx, dword [esp + 0x450]
xor ecx, esp
call fcn.0048f35c
add esp, 0x454
ret 0xc
mov dword [esp], 0x4c4514
jmp 0x405c68
mov dword [esp], 0x4c4524
test cl, cl
jne 0x405c68
mov dword [esp], 0x4c4504
push esi
mov esi, dword [esp + 4]
push edi
push 0x12
push 0
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x405c89
xor eax, eax
jmp 0x405dc7
push ebx
push ebp
lea eax, [esp + 0x44]
push eax
xor ebx, ebx
push ebx
push esi
push ebx
push edi
mov dword [esp + 0x58], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x405da8
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push 0
lea ecx, [esp + 0x18]
push ecx
push 0
push 0
lea edx, [esp + 0x54]
push edx
push edi
mov dword [esp + 0x2c], 0
call ebp
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x405d8b
cmp ecx, 0x400
ja 0x405d8b
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
lea eax, [esp + 0x28]
push eax
lea edx, [esp + 0x18]
push edx
push ecx
lea eax, [esp + 0x6c]
push eax
lea ecx, [esp + 0x54]
push ecx
push edi
mov dword [esp + 0x78], 5
mov dword [esp + 0x40], 0x1c
call ebp
test eax, eax
je 0x405d8b
push 0
push 0
push 3
push 0
push 3
push 0
lea edx, [esp + 0x7c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x405d8b
push 0
lea eax, [esp + 0x1c]
push eax
push 0xc
lea ecx, [esp + 0x28]
push ecx
push 0
push 0
push 0x2d1080
push esi
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x405d84
mov edx, dword [esp + 0x468]
cmp edx, dword [esp + 0x20]
je 0x405db3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x44]
push eax
inc ebx
push ebx
push ecx
push 0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x405cb2
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
xor eax, eax
jmp 0x405dc5
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x3c]
pop ebp
pop ebx
mov ecx, dword [esp + 0x458]
pop edi
pop esi
xor ecx, esp
call fcn.0048f35c
add esp, 0x454
ret 0xc
Function at 0x405e10
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
sub esp, 0x338
mov eax, dword [0x4ecba0]
xor eax, esp
mov dword [esp + 0x334], eax
mov al, byte [esp + 0x33c]
and al, 0xdf
push ebp
mov ebp, ecx
mov cl, al
sub cl, 0x41
cmp cl, 0x19
ja 0x406027
mov cl, byte [0x4b90ae]
mov dx, word [0x4b90ac]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
mov word [esp + 0x20], dx
mov edx, dword [str..X:]
mov byte [esp + 0x22], cl
mov cx, word [0x4b90a8]
push 3
mov dword [esp + 0x28], 0x5c3a58
mov word [esp + 0x48], cx
mov byte [esp + 0x28], al
mov byte [esp + 0x24], al
mov byte [esp + 0x48], al
mov dword [esp + 0x44], edx
mov dl, byte [0x4b90aa]
push ebx
lea eax, [esp + 0x48]
push eax
mov byte [esp + 0x52], dl
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, edi
jne 0x405edd
push 0x3041
push str.CMPToolDlg::iEjectDrive
push str._s:_d:_create_handle_fail
call fcn.0044b650
add esp, 0xc
xor al, al
pop edi
pop esi
pop ebx
pop ebp
mov ecx, dword [esp + 0x334]
xor ecx, esp
call fcn.0048f35c
add esp, 0x338
ret 4
push ebx
lea ecx, [esp + 0x24]
push ecx
push 0xc
lea edx, [esp + 0x30]
push edx
push ebx
push ebx
push 0x2d1080
push esi
mov dword [esp + 0x40], ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x405f04
mov edi, dword [esp + 0x28]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
jne 0x405f21
push 0x304f
push str.CMPToolDlg::iEjectDrive
push str._s:_d:_find_device_number_fail
jmp 0x405eb8
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
push 0x104
lea ecx, [esp + 0x244]
push ecx
lea edx, [esp + 0x18]
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceA]
test eax, eax
je 0x405ec0
lea eax, [esp + 0x240]
push eax
push esi
push edi
mov ecx, ebp
call fcn.00405bf0
cmp eax, ebx
jne 0x405f77
push 0x3061
push str.CMPToolDlg::iEjectDrive
push str._s:_d:_get_device_instance_fail
jmp 0x405eb8
push ebx
push eax
lea edx, [esp + 0x20]
xor ecx, ecx
push edx
mov dword [esp + 0x28], ebx
mov word [esp + 0x44], cx
mov dword [esp + 0x24], ebx
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
mov ebp, dword [sym.imp.SETUPAPI.dll_CM_Request_Device_EjectW]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov esi, 1
xor eax, eax
push eax
push 0x104
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x28]
mov word [esp + 0x44], ax
mov eax, dword [esp + 0x24]
push edx
push eax
call ebp
mov edi, eax
test edi, edi
jne 0x405fce
cmp dword [esp + 0x1c], eax
je 0x406020
push 0x1f4
call ebx
inc esi
cmp esi, 3
jle 0x405fa4
push edi
push 0x3086
push str.CMPToolDlg::iEjectDrive
push str._s:_d:_fail__res_x
call fcn.0044b650
add esp, 0x10
cmp word [esp + 0x38], 0
je 0x405ec0
lea ecx, [esp + 0x38]
push ecx
push 0x308c
push str.CMPToolDlg::iEjectDrive
push str._s:_d:_VetoName_ws
call fcn.0044b650
add esp, 0x10
jmp 0x405ec0
mov al, 1
jmp 0x405ec2
mov ecx, dword [esp + 0x338]
pop ebp
xor ecx, esp
xor al, al
call fcn.0048f35c
add esp, 0x338
ret 4

Function at 0x4062e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
movzx edx, word [esp + 4]
mov dword [esp + 4], edx
jmp fcn.0046ef7d
Function at 0x41d100
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a9d99
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebp
push esi
push edi
mov eax, dword [0x4ecba0]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov dword [esp + 0x10], 0
mov ebp, dword [esp + 0x34]
push 0x4bc418
mov ecx, ebp
mov dword [esp + 0x30], 1
call fcn.00404190
lea ecx, [esp + 0x14]
mov dword [esp + 0x10], 1
call fcn.004778a9
mov eax, dword [esp + 0x38]
push 0
push 0x40
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], 2
call fcn.00477d46
lea ecx, [esp + 0x14]
call fcn.00477794
mov edi, eax
push edi
call fcn.00490201
push edi
mov esi, eax
push 0
push esi
call fcn.0048f850
mov edx, dword [esp + 0x24]
mov eax, dword [edx + 0x28]
add esp, 0x10
push 0
push 0
push 0
lea ecx, [esp + 0x20]
call eax
push edi
push esi
lea ecx, [esp + 0x1c]
call fcn.0047759d
movzx ecx, byte [esi + 0x209]
movzx edx, byte [esi + 0x208]
movzx eax, byte [esi + 0x207]
push ecx
movzx ecx, byte [esi + 0x206]
push edx
movzx edx, byte [esi + 0x205]
push eax
movzx eax, byte [esi + 0x204]
push ecx
push edx
push eax
push str._02x_02x_02x_02x_02x_02x
push ebp
call fcn.00402d80
add esp, 0x20
lea ecx, [esp + 0x14]
call fcn.00477843
push esi
call fcn.0046a8b0
add esp, 4
lea ecx, [esp + 0x14]
mov byte [esp + 0x2c], 1
call fcn.004779c2
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x41d22e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebp
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
add esp, 0x20
ret 8