joyce8/EMBER2024-capa huggingface dataset:
Function at 0x100e5980
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x100e59e6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x100e59e6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x100e59c7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x100e8870
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
mov eax, dword [0x10310b48]
xor edx, edx
cmp eax, edx
jne 0x100e8896
xor eax, eax
mov byte [eax + 0x10310a48], al
inc eax
cmp eax, 0x100
jl 0x100e887e
mov dword [0x10310b48], 1
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0x14]
push esi
push edi
mov ecx, 0x40
mov esi, 0x10310a48
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
cmp eax, edx
mov byte [ebx + 0x100], dl
mov byte [ebx + 0x101], dl
jle 0x100e8927
xor esi, esi
push ebp
mov byte [esp + 0x20], dl
xor ecx, ecx
mov edi, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
mov al, byte [esi + ebx]
and edi, 0xff
xor edx, edx
mov dl, byte [edi + ebp]
mov ebp, eax
and ebp, 0xff
add ecx, edx
add ecx, ebp
and ecx, 0x800000ff
jns 0x100e88fa
dec ecx
or ecx, 0xffffff00
inc ecx
mov byte [esp + 0x10], cl
mov ecx, dword [esp + 0x10]
and ecx, 0xff
mov dl, byte [ecx + ebx]
mov byte [esi + ebx], dl
mov byte [ecx + ebx], al
lea eax, [edi + 1]
cdq
idiv dword [esp + 0x1c]
inc esi
cmp esi, 0x100
mov byte [esp + 0x20], dl
jl 0x100e88c8
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret

Function at 0x100e89a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
mov cl, byte [eax + 0x100]
mov dl, byte [eax + 0x101]
mov dword [ebp - 8], eax
mov byte [ebp - 1], cl
mov byte [ebp - 2], dl
xor ebx, ebx
mov bl, byte [ebp - 1]
xor edx, edx
mov dl, byte [ebp - 2]
mov esi, dword [ebp - 8]
mov edi, dword [ebp + 8]
xor eax, eax
mov ecx, dword [ebp + 0xc]
test ecx, ecx
jle 0x100e89f3
inc bl
mov al, byte [esi + ebx]
add dl, al
xchg byte [esi + edx], al
mov byte [esi + ebx], al
add al, byte [esi + edx]
mov al, byte [esi + eax]
xor byte [edi], al
inc edi
dec ecx
jne 0x100e89da
mov byte [ebp - 1], bl
mov byte [ebp - 2], dl
mov eax, dword [ebp + 0x10]
mov cl, byte [ebp - 1]
mov dl, byte [ebp - 2]
pop edi
pop esi
mov byte [eax + 0x100], cl
mov byte [eax + 0x101], dl
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100ef380
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x10123ebe
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x1c]
push eax
push ecx
mov ecx, edi
mov dword [esp + 0x10], edi
call fcn.100efca0
push 0x10
mov dword [esp + 0x18], 0
mov dword [edi], 0x102915ec
call fcn.1010fc34
mov esi, eax
add esp, 4
mov dword [esp + 0x20], esi
mov al, 1
test esi, esi
mov byte [esp + 0x14], al
je 0x100ef413
push 4
mov byte [esi + 8], al
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.1010fc34
add esp, 4
mov dword [esp + 0x1c], eax
test eax, eax
mov byte [esp + 0x14], 2
je 0x100ef40c
push 0
mov ecx, eax
call fcn.100e64b0
mov dword [esi + 0xc], eax
jmp 0x100ef415
xor eax, eax
mov dword [esi + 0xc], eax
jmp 0x100ef415
xor esi, esi
mov ecx, dword [esp + 0xc]
mov dword [edi + 0x30], esi
mov dword [edi + 0x34], 0
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 8

Function at 0x101122d4
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x1011230c
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.1011034e
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.10110326
jmp 0x10112318
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x10113ad2
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 0x10113b14
call fcn.1011a790
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x10113b14
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x10113b0b
xor eax, eax
jmp 0x10113b1c
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.10113b22
pop edi
pop esi
pop ebx
ret 4
Function at 0x40667e
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 4
mov dword [ebp - 4], esp
push 1
push 0x4282eb
push 0x4282eb
mov ebx, dword [ebp + 8]
push dword [ebx]
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
nop
nop
nop
nop
cmp dword [ebp - 4], esp
je 0x4066c4
push 6
call fcn.00407001
add esp, 4
mov esp, ebp
pop ebp
ret 4

Function at 0x40687d
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0
push 0x80000301
push 0
push 0x100
push 1
mov ebx, 0x184
call fcn.00407bd0
add esp, 0x10
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4068c2
push ebx
call fcn.00406ff5
add esp, 4
pop eax
mov dword [ebp - 4], eax
mov dword [ebp - 8], esp
push 0x100
push dword [ebp - 4]
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_GetWindowTextA]
nop
nop
nop
nop
cmp dword [ebp - 8], esp
je 0x4068f0
push 6
call fcn.00407001
add esp, 4
mov eax, dword [ebp - 4]
test eax, eax
je 0x40690c
push eax
mov ebx, eax
call fcn.0040109d
inc eax
push eax
call fcn.00406ffb
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x406911
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x406922
push ebx
call fcn.00406ff5
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret 4

Function at 0x4075e0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
lea eax, [esp + 0x14]
push edi
push eax
mov dword [esp + 0x1c], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [esp + 0x84]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x44], 1
je case.0x407621.2
mov ecx, dword [esp + 0x7c]
lea eax, [ecx - 1]
cmp eax, 5
ja case.0x407621.2
jmp dword [eax*4 + 0x4076ac]
mov word [esp + 0x48], di
jmp 0x40765a
mov word [esp + 0x48], 2
jmp 0x40765a
mov word [esp + 0x48], 3
jmp 0x40765a
mov word [esp + 0x48], 4
jmp 0x40765a
mov word [esp + 0x48], 7
jmp 0x40765a
mov word [esp + 0x48], 5
lea edx, [esp + 8]
mov ecx, dword [esp + 0x64]
lea eax, [esp + 0x18]
push edx
push eax
push edi
push edi
push edi
push 1
push edi
push edi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
cmp esi, edi
je 0x4076a4
cmp dword [esp + 0x70], edi
je 0x407690
mov edx, dword [esp + 8]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0xc]
push ecx
call edi
mov eax, esi
pop edi
pop esi
add esp, 0x54
ret

Function at 0x4076d0
Capabilities:
Set file attributes

Disassembly:
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret
Function at 0x4076f0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
mov eax, dword [esp + 0x18]
push ebx
push ebp
push esi
push edi
push eax
call fcn.004093a0
mov esi, dword [esp + 0x38]
mov ebx, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 4
xor ebp, ebp
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], ebp
test ebx, ebx
je 0x407840
test ecx, ecx
je 0x407840
inc ecx
push ecx
call fcn.0041b8da
mov ebp, eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov edx, ecx
mov esi, edi
mov edi, ebp
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00410b90
mov edi, eax
add esp, 0xc
test edi, edi
je 0x407769
mov byte [edi], 0
inc edi
lea eax, [esp + 0x1c]
push eax
push ebp
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x40782d
push 0x400
mov dword [esp + 0x18], 0x400
mov dword [esp + 0x1c], 1
call fcn.0041b8da
add esp, 4
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea ecx, [esp + 0x14]
mov esi, eax
mov eax, dword [esp + 0x1c]
push ecx
lea edx, [esp + 0x1c]
push esi
push edx
push 0
push edi
push eax
call ebx
test eax, eax
je 0x4077f1
cmp eax, 0xea
jne 0x407819
push esi
call fcn.0041b903
mov ecx, dword [esp + 0x18]
push ecx
call fcn.0041b8da
mov ecx, dword [esp + 0x24]
add esp, 8
lea edx, [esp + 0x14]
mov esi, eax
push edx
lea eax, [esp + 0x1c]
push esi
push eax
push 0
push edi
push ecx
call ebx
test eax, eax
jne 0x4077bc
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x4077ff
cmp eax, 2
jne 0x407819
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push esi
call fcn.00409310
add esp, 8
mov dword [esp + 0x10], eax
push esi
call fcn.0041b903
mov edx, dword [esp + 0x20]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebp
call fcn.0041b903
mov eax, dword [esp + 0x14]
add esp, 4
test eax, eax
jne 0x40786e
mov ebp, eax
mov eax, dword [esp + 0x48]
test eax, eax
je 0x40787a
mov edx, dword [esp + 0x40]
test edx, edx
je 0x40787a
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
call fcn.00409310
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x407e80
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0x10]
push edi
push 0
push 0x20
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x407f12
mov eax, dword [esp + 0x10]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push esi
mov dword [esp + 0x10], ebx
jle 0x407f04
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x407efc
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x407ec5
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
mov dword [esp + 0x10], 0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
pop edi
add esp, 8
ret
Function at 0x407fd0
Capabilities:
Set registry value

Disassembly:
mov eax, dword [esp + 0x28]
sub esp, 0x18
push ebx
push ebp
xor ebx, ebx
xor ebp, ebp
cmp eax, 0x80000301
push edi
ja 0x408050
je 0x408041
cmp eax, 0x80000101
ja 0x40803a
je 0x408041
cmp eax, 0x80000004
je 0x40801d
cmp eax, 0x80000005
jne 0x408065
mov eax, dword [esp + 0x44]
mov dword [esp + 0xc], 3
test eax, eax
je 0x4080ab
mov ebx, dword [eax + 4]
lea ebp, [eax + 8]
jmp 0x4080ab
mov ebp, dword [esp + 0x44]
or ecx, 0xffffffff
mov edi, ebp
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0xc], 1
mov ebx, ecx
inc ebx
jmp 0x4080ab
cmp eax, 0x80000201
jne 0x408065
mov ebx, 4
lea ebp, [esp + 0x44]
mov dword [esp + 0xc], ebx
jmp 0x4080ab
cmp eax, 0x80000401
je 0x408096
cmp eax, 0x80000501
je 0x408082
cmp eax, 0x80000601
je 0x40806e
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
fld qword [esp + 0x44]
mov ebx, 4
mov dword [esp + 0xc], ebx
call fcn.00410c98
jmp 0x4080a3
fld dword [esp + 0x44]
mov ebx, 4
mov dword [esp + 0xc], ebx
call fcn.00410c98
jmp 0x4080a3
mov eax, dword [esp + 0x44]
mov ebx, 4
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], eax
lea ebp, [esp + 0x10]
mov ecx, dword [esp + 0x2c]
push ecx
call fcn.004093a0
mov edi, dword [esp + 0x3c]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
add esp, 4
mov dword [esp + 0x20], edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x18], 0
test edx, edx
je 0x408186
test ecx, ecx
je 0x408186
inc ecx
push esi
push ecx
call fcn.0041b8da
mov edi, dword [esp + 0x40]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x5c
mov eax, ecx
mov esi, edi
mov edi, edx
push edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov dword [esp + 0x2c], edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00410b90
mov esi, eax
add esp, 0xc
test esi, esi
je 0x408128
mov byte [esi], 0
inc esi
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
lea ecx, [esp + 0x18]
push 0
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40817c
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push ebx
push ebp
push eax
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x408171
mov dword [esp + 0x1c], 1
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
call fcn.0041b903
add esp, 4
pop esi
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop ebx
add esp, 0x18
ret

Function at 0x408540
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
cmp edx, 1
jle 0x40855e
push esi
lea ecx, [esp + 0x18]
dec edx
mov esi, dword [ecx]
add ecx, 0xc
xor eax, esi
dec edx
jne 0x408553
pop esi
ret
Function at 0x420e22
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 0x420e50
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x420e6e
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00420d88
jmp 0x420e6e
mov eax, dword [esi + 0x14]
test eax, eax
je 0x420e6e
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00420d88
test edi, edi
mov eax, edi
jne 0x420e58
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401000
Capabilities:
Get disk information via ioctl

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x468
cmp eax, 2
push ebp
jb 0x4011d1
cmp eax, 3
jbe 0x401029
cmp eax, 5
jne 0x4011d1
mov ebp, 0x407144
jmp 0x40102e
mov ebp, 0x407154
push esi
push 0x12
push 0
push 0
push ebp
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsA]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
je 0x4011ab
push ebx
mov dword [esp + 0x34], eax
push edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
lea ecx, [esp + 0x34]
push ecx
xor ebx, ebx
push ebx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
push ebp
mov dword [esp + 0x58], eax
mov eax, 0x1c
push ebx
push esi
mov dword [esp + 0x48], eax
mov dword [esp + 0x70], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x4011a0
lea esp, [esp]
lea edx, [esp + 0x5c]
push edx
push ebx
push ebp
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailA]
push 0
lea eax, [esp + 0x14]
push eax
push 0
push 0
lea ecx, [esp + 0x6c]
push ecx
push esi
mov dword [esp + 0x28], 0
call edi
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401187
cmp eax, 0x400
ja 0x401187
xor edx, edx
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x34], edx
lea edx, [esp + 0x14]
push edx
push eax
lea eax, [esp + 0x84]
push eax
lea ecx, [esp + 0x6c]
push ecx
push esi
mov dword [esp + 0x90], 5
mov dword [esp + 0x30], 0x1c
call edi
test eax, eax
je 0x401187
push 0
push 0
push 3
push 0
push 3
push 0
lea edx, [esp + 0x94]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x401187
push 0
lea eax, [esp + 0x18]
push eax
push 0xc
lea ecx, [esp + 0x5c]
push ecx
push 0
push 0
push 0x2d1080
push edi
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x401180
mov edx, dword [esp + 0x47c]
cmp edx, dword [esp + 0x54]
je 0x4011b4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x34]
push eax
inc ebx
push ebx
push ebp
push 0
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x401090
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
pop edi
xor eax, eax
pop ebx
pop esi
pop ebp
add esp, 0x468
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov eax, dword [esp + 0x2c]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x468
ret
xor eax, eax
pop ebp
add esp, 0x468
ret
Function at 0x4011e0
Capabilities:
Get disk information
Get disk information via ioctl

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x234
cmp eax, 2
jne 0x4013a5
mov eax, dword [esp + 0x23c]
mov ecx, dword [eax + 4]
mov al, byte [ecx]
and al, 0xdf
cmp al, 0x41
jl 0x4013a5
cmp al, 0x5a
jg 0x4013a5
mov cx, word [0x407140]
mov edx, dword [str..X:]
push ebp
push esi
push edi
xor ebp, ebp
push ebp
push ebp
push 3
push ebp
push 3
mov dword [esp + 0x28], 0x5c3a58
mov word [esp + 0x34], cx
mov byte [esp + 0x28], al
mov byte [esp + 0x34], al
mov dword [esp + 0x30], edx
mov dl, byte [0x407142]
push ebp
lea eax, [esp + 0x34]
push eax
mov byte [esp + 0x3e], dl
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401272
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x234
ret
push ebp
lea ecx, [esp + 0x28]
push ecx
push 0xc
lea edx, [esp + 0x38]
push edx
push ebp
push ebp
push 0x2d1080
push esi
mov dword [esp + 0x44], ebp
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x401299
mov edi, dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 0xffffffff
je 0x401263
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
push eax
push edi
call section..text
add esp, 8
cmp eax, ebp
mov dword [esp + 0xc], eax
je 0x401263
push ebx
push ebp
push eax
lea ecx, [esp + 0x18]
push ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x20], ebp
call dword [sym.imp.SETUPAPI.dll_CM_Get_Parent]
mov edx, dword [esp + 0x10]
push ebp
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.SETUPAPI.dll_CM_Get_DevNode_Status]
mov ebx, dword [esp + 0x1c]
shr ebx, 0xe
and bl, 1
mov edi, 1
test bl, bl
mov ecx, dword [esp + 0x10]
push ebp
push 0x208
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x20]
push eax
mov word [esp + 0x4c], bp
push ecx
je 0x401327
call dword [sym.imp.SETUPAPI.dll_CM_Request_Device_EjectW]
jmp 0x40132d
call dword [sym.imp.SETUPAPI.dll_CM_Query_And_Remove_SubTreeW]
mov esi, eax
cmp esi, ebp
jne 0x401339
cmp dword [esp + 0x14], ebp
je 0x40138b
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 3
jle 0x401301
push str.failed_n
call fcn.004013b1
push esi
push str.Result0x_2X_n
call fcn.004013b1
add esp, 0xc
cmp word [esp + 0x3c], bp
je 0x40137b
lea edx, [esp + 0x3c]
push edx
push str.VetoName_ws__n_n
call fcn.004013b1
add esp, 8
pop ebx
pop edi
pop esi
mov eax, 1
pop ebp
add esp, 0x234
ret
push str.Success_n_n
call fcn.004013b1
add esp, 4
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x234
ret
mov eax, 1
add esp, 0x234
ret
Function at 0x401407
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x18
push 0x407168
call fcn.00402b28
mov edi, 0x94
mov eax, edi
call fcn.00402c80
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x4096e4], ecx
mov eax, dword [esi + 4]
mov dword [0x4096f0], eax
mov edx, dword [esi + 8]
mov dword [0x4096f4], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x4096e8], esi
cmp ecx, 2
je 0x401467
or esi, 0x8000
mov dword [0x4096e8], esi
shl eax, 8
add eax, edx
mov dword [0x4096ec], eax
xor edi, edi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
cmp word [eax], 0x5a4d
jne 0x4014a0
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4014a0
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x4014b8
cmp eax, 0x20b
je 0x4014a5
mov dword [ebp - 0x1c], edi
jmp 0x4014cc
cmp dword [ecx + 0x84], 0xe
jbe 0x4014a0
xor eax, eax
cmp dword [ecx + 0xf8], edi
jmp 0x4014c6
cmp dword [ecx + 0x74], 0xe
jbe 0x4014a0
xor eax, eax
cmp dword [ecx + 0xe8], edi
setne al
mov dword [ebp - 0x1c], eax
push edi
call fcn.00402ad4
pop ecx
test eax, eax
jne 0x4014f8
cmp dword [0x4096c8], 2
je 0x4014e5
call fcn.004022e6
push 0x1c
call fcn.0040216f
push 0xff
call fcn.00401fd4
pop ecx
pop ecx
call fcn.00402a32
mov dword [ebp - 4], edi
call fcn.00402887
test eax, eax
jge 0x401511
push 0x1b
call fcn.004013e2
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x40ac64], eax
call fcn.00402765
mov dword [0x4096c0], eax
call fcn.004026c3
test eax, eax
jge 0x401537
push 8
call fcn.004013e2
pop ecx
call fcn.00402490
test eax, eax
jge 0x401548
push 9
call fcn.004013e2
pop ecx
push 1
call fcn.00402004
pop ecx
mov dword [ebp - 0x24], eax
cmp eax, edi
je 0x40155e
push eax
call fcn.004013e2
pop ecx
mov eax, dword [0x409704]
mov dword [0x409708], eax
push eax
push dword [0x4096fc]
push dword [0x4096f8]
call fcn.004011e0
add esp, 0xc
mov esi, eax
mov dword [ebp - 0x28], esi
cmp dword [ebp - 0x1c], edi
jne 0x40158d
push esi
call fcn.0040212f
call fcn.00402151
jmp 0x4015bf
or dword [ebp - 4], 0xffffffff
mov eax, esi
lea esp, [ebp - 0x34]
call fcn.00402b63
ret