joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10027d4c
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x10027de9
push ebx
push esi
call fcn.10027d15
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.10026aea
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x10027d96
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10027de8
push edi
push eax
call fcn.10023a45
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x10027db6
call fcn.10020209
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x10027de7
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.10026aea
add esp, 0x20
test eax, eax
jne 0x10027dd5
push edi
call fcn.10020209
jmp 0x10027ddd
push ebx
call fcn.10020209
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x1002a066
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
call fcn.1001e7fc
mov esi, dword [ebp + 8]
mov edi, eax
push 2
lea eax, [ebp - 4]
mov ecx, esi
push eax
and ecx, 0x3ff
push 0x20000001
or ecx, 0x400
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1002a0d5
cmp esi, dword [ebp - 4]
je 0x1002a0d0
cmp dword [ebp + 0xc], 0
je 0x1002a0d0
mov esi, dword [edi + 0x50]
lea ecx, [esi + 2]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x1002a0ad
push dword [edi + 0x50]
sub esi, ecx
sar esi, 1
call fcn.10029bb8
pop ecx
xor ecx, ecx
cmp eax, esi
setne cl
mov eax, ecx
jmp 0x1002a0d7
xor eax, eax
inc eax
jmp 0x1002a0d7
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x1002a13c
Capabilities:
Get geographical location

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x1005b0ac]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x18], eax
call fcn.1001e7fc
add eax, 0x50
lea edi, [ebp - 0x10]
mov dword [ebp - 0x14], eax
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
call fcn.1001e7fc
lea ecx, [ebp - 0x10]
xor edx, edx
mov dword [eax + 0x34c], ecx
lea ecx, [esi + 0x80]
mov eax, dword [ebp - 0x14]
mov dword [eax], esi
lea edi, [eax + 4]
mov dword [edi], ecx
test ecx, ecx
je 0x1002a1b3
cmp word [ecx], dx
je 0x1002a1b3
mov eax, dword [0x10050c24]
push edi
dec eax
push eax
push 0x10050b10
call fcn.1002a0db
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor edx, edx
mov dword [ebp - 0x10], edx
mov eax, dword [eax]
test eax, eax
je 0x1002a226
cmp word [eax], dx
je 0x1002a226
mov eax, dword [edi]
test eax, eax
je 0x1002a1d7
cmp word [eax], dx
je 0x1002a1d7
lea eax, [ebp - 0x10]
push eax
call fcn.10029abe
jmp 0x1002a1e0
lea eax, [ebp - 0x10]
push eax
call fcn.10029b59
cmp dword [ebp - 0x10], 0
pop ecx
jne 0x1002a250
mov eax, dword [0x10050b0c]
push dword [ebp - 0x14]
dec eax
push eax
push 0x10050800
call fcn.1002a0db
add esp, 0xc
test al, al
je 0x1002a250
mov eax, dword [edi]
xor edi, edi
test eax, eax
je 0x1002a21b
cmp word [eax], di
je 0x1002a21b
lea eax, [ebp - 0x10]
push eax
call fcn.10029abe
pop ecx
jmp 0x1002a252
lea eax, [ebp - 0x10]
push eax
call fcn.10029b59
jmp 0x1002a218
mov eax, dword [edi]
test eax, eax
je 0x1002a23d
cmp word [eax], dx
je 0x1002a23d
lea eax, [ebp - 0x10]
push eax
call fcn.10029a73
pop ecx
jmp 0x1002a250
mov dword [ebp - 0x10], 0x104
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLCID]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
xor edi, edi
cmp dword [ebp - 0x10], 0
je 0x1002a31b
lea eax, [ebp - 0x10]
push eax
lea eax, [esi + 0x100]
neg esi
sbb esi, esi
and esi, eax
push esi
call fcn.10029f60
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x1002a31b
movzx ecx, si
push ecx
call dword [sym.imp.KERNEL32.dll_IsValidCodePage]
test eax, eax
je 0x1002a31b
push 1
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_IsValidLocale]
test eax, eax
je 0x1002a31b
mov eax, dword [ebp - 0x18]
test eax, eax
je 0x1002a2a8
mov dword [eax], esi
mov eax, dword [ebp - 0x14]
push edi
push 0x55
add eax, 0x250
push eax
push dword [ebp - 0xc]
call fcn.1002081d
test ebx, ebx
je 0x1002a316
push edi
push 0x55
lea eax, [ebx + 0x120]
push eax
push dword [ebp - 0xc]
call fcn.1002081d
push 0x40
push ebx
push 0x1001
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1002a31b
push 0x40
lea eax, [ebx + 0x80]
push eax
push 0x1002
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x1002a31b
push 0xa
push 0x10
lea ecx, [ebx + 0x100]
push ecx
push esi
call fcn.1002c6a4
add esp, 0x10
xor eax, eax
inc eax
jmp 0x1002a31d
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10011543
leave
ret
Function at 0x1002cc01
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1002cb7d
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1002cd70
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1002cd70
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1002cd25
jg 0x1002cc5d
test eax, eax
je 0x1002cd1b
push 1
push 0x1000
call fcn.100201ac
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1002cc80
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1002cd12
push 0x8000
push ebx
call fcn.1002caae
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1002cca9
jg 0x1002cca4
cmp ecx, 0x1000
jb 0x1002cca9
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.100219ed
add esp, 0x10
cmp eax, 0xffffffff
je 0x1002ccee
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x1002cca4
jl 0x1002ccd5
test ecx, ecx
jne 0x1002cc96
push dword [ebp - 0xc]
push ebx
call fcn.1002caae
push esi
call fcn.10020209
add esp, 0xc
xor ebx, ebx
jmp 0x1002cd7e
cmp byte [edi + 0x24], 0
je 0x1002cd05
cmp dword [edi + 0x20], 5
jne 0x1002cd05
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1002cd10
mov ebx, dword [edi + 0x18]
jmp 0x1002cd12
xor ebx, ebx
push esi
call fcn.10020209
pop ecx
jmp 0x1002cd7e
test ecx, ecx
jg 0x1002cce7
jl 0x1002cd25
test eax, eax
jae 0x1002cce7
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.100231bb
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1002cd45
cmp byte [edi + 0x1c], 0
je 0x1002cce7
jmp 0x1002cd76
push ebx
call fcn.1002a81c
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1002cce7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1002cd7e
cmp byte [edi + 0x1c], 0
je 0x1002cd7b
mov ebx, dword [edi + 0x18]
jmp 0x1002cd7e
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.100231bb
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4016e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4159cf
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebp
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x30]
mov ebp, ecx
mov dword [esp + 0xc], 0
mov eax, dword [ebp + 4]
lea ecx, [edi + esi]
cmp ecx, eax
jle 0x40171b
mov esi, eax
sub esi, edi
cmp edi, eax
jle 0x401721
xor esi, esi
lea ecx, [esp + 0x10]
call fcn.00401070
push 0
push edi
lea edx, [esp + 0x18]
push esi
push edx
mov ecx, ebp
mov dword [esp + 0x34], 1
call fcn.00401110
mov esi, dword [esp + 0x2c]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.00401080
mov dword [esp + 0xc], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0x24], 0
call fcn.00401100
mov ecx, dword [esp + 0x1c]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x1c
ret 0xc

Function at 0x401780
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4159ff
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
mov esi, ecx
push edi
mov edi, dword [esp + 0x2c]
mov eax, dword [esi + 4]
mov dword [esp + 8], 0
cmp edi, eax
jle 0x4017b1
mov edi, eax
lea ecx, [esp + 0xc]
call fcn.00401070
push 0
push 0
lea eax, [esp + 0x14]
push edi
push eax
mov ecx, esi
mov dword [esp + 0x30], 1
call fcn.00401110
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0xc]
push ecx
mov ecx, esi
call fcn.00401080
mov dword [esp + 8], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x20], 0
call fcn.00401100
mov ecx, dword [esp + 0x18]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret 8
Function at 0x401ad0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x1b4
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0xc]
push edi
lea ecx, [esp + 0xc4]
push eax
push ecx
mov byte [esp + 0xcc], 0
mov dword [esp + 0x18], 0x100
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov ebx, dword [esp + 0x1c8]
lea edx, [esp + 0x20]
xor ebp, ebp
push edx
push ebx
mov ecx, esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], 0xf000c
call fcn.004019d0
mov edi, eax
cmp edi, ebp
jne 0x401b3a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b4
ret 4
push 1
push 2
push edi
mov ecx, esi
call fcn.00401d00
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push 4
lea edx, [esp + 0x34]
push ecx
push edx
push str.PrinterID
push edi
mov dword [esp + 0x34], 0
call sub.WINSPOOL.DRV_GetPrinterDataA
test eax, eax
mov dword [esp + 0x10], eax
je 0x401b87
mov dword [esp + 0x14], 0
push ebx
mov ecx, esi
call fcn.004023c0
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x401ba2
cmp cl, 0x5c
jne 0x401bd2
mov al, byte [eax + 1]
cmp al, 0x2f
je 0x401bad
cmp al, 0x5c
jne 0x401bd2
mov eax, dword [ebp]
test eax, eax
je 0x401bd2
lea ecx, [esp + 0xc4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x401bd2
mov edx, dword [ebp + 4]
push edx
call sub.WINSPOOL.DRV_DeletePrinterConnectionA
jmp 0x401bd8
push edi
call sub.WINSPOOL.DRV_DeletePrinter
push edi
mov dword [esp + 0x14], eax
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401c55
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x40], 1
jne 0x401c55
push str.EPSTHK32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x401c55
push str.RemoveLogicalDevice
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401c4e
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 4]
push 0
push 8
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push str.printer
call eax
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1b4
ret 4
Function at 0x4023c0
Capabilities:
Check os version

Disassembly:
sub esp, 0xf4
push ebx
push edi
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x78]
test eax, eax
je 0x402407
cmp eax, 1
jne 0x402417
mov eax, dword [esp + 0x6c]
cmp eax, 4
ja 0x402423
jne 0x402407
cmp dword [esp + 0x70], 0xa
jae 0x402423
pop edi
mov eax, 1
pop ebx
add esp, 0xf4
ret 4
cmp eax, 2
jne 0x402407
cmp dword [esp + 0x6c], 5
jb 0x402407
push str.mscms.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push str.EnumColorProfilesA
push ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test ebx, ebx
mov edi, eax
je 0x402407
push ebp
mov ebp, dword [esp + 0x104]
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x20]
push 0
push edx
push 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0x54
mov dword [esp + 0x30], 0x200
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], ebp
call edi
mov eax, dword [esp + 0xc]
test eax, eax
jbe 0x402502
add eax, 0x10
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x10], eax
je 0x402502
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x24]
push esi
push ecx
push 0
call edi
test eax, eax
je 0x4024ef
push str.DisassociateColorProfileFromDeviceA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov al, byte [esi]
test al, al
je 0x4024ef
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push esi
push 0
call edi
push esi
call ebx
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x4024d9
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
pop edi
mov eax, 1
pop ebx
add esp, 0xf4
ret 4
Function at 0x402d70
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push edi
xor esi, esi
push str.SetupDiGetDeviceInterfaceDetailA
push eax
mov dword [esp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, esi
jne 0x402d9b
pop edi
xor eax, eax
pop esi
add esp, 0x20
ret 0x18
mov edx, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0xc]
push esi
push ecx
push esi
push esi
push edx
push ebx
call edi
mov eax, dword [esp + 0xc]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, esi
mov dword [esp + 0x34], eax
je 0x402e95
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x40]
mov dword [ebp], 5
mov eax, dword [esp + 0x14]
push edx
push eax
push ebp
push ecx
push ebx
mov dword [esp + 0x2c], 0x1c
call edi
test eax, eax
je 0x402e82
mov edx, dword [esp + 0x34]
push str.SetupDiOpenDevRegKey
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402e82
push 0xf003f
push 1
push 0
lea ecx, [esp + 0x20]
push 1
push ecx
push ebx
call eax
mov edi, eax
cmp edi, 0xffffffff
je 0x402e82
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x34]
push eax
push ebx
push ecx
push 0
push str.PortName
push edi
mov dword [esp + 0x54], edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
push edi
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x402e82
mov edx, dword [esp + 0x40]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402e82
add ebp, 4
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [esp + 0x38]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x20
ret 0x18
Function at 0x4041b0
Capabilities:
Check os version

Disassembly:
sub esp, 0xa0
push ebx
push ebp
push esi
mov ebp, ecx
push edi
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov esi, 0x417560
mov dword [esp + 0x18], esi
mov edx, dword [esi + 4]
mov eax, dword [esi]
lea ecx, [esp + 0x10]
mov dword [esp + 0x10], 0
push ecx
push 0
push 0
push edx
push eax
mov ecx, ebp
call fcn.004042e0
cmp eax, 0x7a
jne 0x4042be
mov ecx, dword [esp + 0x10]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x14], ebx
je 0x4042be
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esi + 4]
mov edi, eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi]
push eax
push edi
push ecx
push edx
mov ecx, ebp
call fcn.004042e0
test eax, eax
je 0x40425a
cmp eax, 0x103
jne 0x4042b0
cmp dword [edi], 0
jbe 0x4042b0
mov eax, dword [edi]
xor ebx, ebx
test eax, eax
jbe 0x4042ac
lea esi, [edi + 4]
mov eax, dword [esi]
mov ecx, ebp
push eax
push str.DeviceClassName
call fcn.00404820
mov eax, dword [esp + 0x20]
cmp eax, 6
jae 0x40428e
cmp eax, 5
jne 0x40428a
mov eax, dword [esp + 0x24]
test eax, eax
ja 0x40428e
xor eax, eax
jmp 0x404293
mov eax, 2
mov ecx, dword [esi]
push eax
push ecx
mov ecx, ebp
call fcn.00404750
mov eax, dword [edi]
inc ebx
add esi, 4
cmp ebx, eax
jb 0x404265
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
add esi, 8
cmp esi, 0x417580
mov dword [esp + 0x18], esi
jb 0x4041e5
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret
Function at 0x404530
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x415b88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push esi
lea ecx, [esp + 0xc]
call fcn.0040c9c0
lea eax, [esp + 8]
xor esi, esi
push eax
push 0x20019
push esi
push str.SYSTEMCurrentControlSetEnum
push 0x80000002
lea ecx, [esp + 0x20]
mov dword [esp + 0x4c], esi
mov dword [esp + 0x18], 0x103
call fcn.0040ca00
test eax, eax
je 0x404722
mov ecx, dword [esp + 0x40]
push ebx
push ebp
push edi
push str.SetupDiGetDeviceInstanceIdA
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, esi
je 0x404711
mov ebx, dword [esp + 0x54]
mov ebp, dword [esp + 0x50]
lea edx, [esp + 0x4c]
mov dword [esp + 0x4c], esi
push edx
push esi
push esi
push ebx
push ebp
call edi
mov eax, dword [esp + 0x4c]
cmp eax, esi
jbe 0x404711
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, esi
mov dword [esp + 0x50], eax
je 0x404711
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x4c]
mov esi, eax
lea eax, [esp + 0x4c]
push eax
push ecx
push esi
push ebx
push ebp
call edi
test eax, eax
je 0x4046ff
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x54]
push edx
push 0x20019
push 0
push esi
push eax
lea ecx, [esp + 0x2c]
call fcn.0040ca00
test eax, eax
je 0x4046ff
mov edx, dword [esp + 0x54]
lea ecx, [esp + 0x4c]
push ecx
push 0
push 0
push 0
push str.Service
push edx
lea ecx, [esp + 0x30]
mov dword [esp + 0x64], 0
call fcn.0040caa0
mov eax, dword [esp + 0x4c]
test eax, eax
jbe 0x4046f1
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x4046f1
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x54]
mov ebx, eax
lea eax, [esp + 0x4c]
push eax
push ebx
push 0
push 0
push str.Service
push ecx
lea ecx, [esp + 0x30]
call fcn.0040caa0
test eax, eax
je 0x4046e3
mov edx, dword [esp + 0x58]
push edx
push ebx
call fcn.004107b0
add esp, 8
test eax, eax
je 0x4046e3
mov ebx, dword [esp + 0x5c]
mov ebp, dword [sym.imp.KERNEL32.dll_lstrlenA]
test ebx, ebx
je 0x4046cd
push esi
call ebp
mov ecx, dword [esp + 0x60]
inc eax
cmp ecx, eax
jb 0x4046cd
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov dword [esp + 0x10], 0
jmp 0x4046d5
mov dword [esp + 0x10], 0x7a
mov ebx, dword [esp + 0x64]
test ebx, ebx
je 0x4046e3
push esi
call ebp
inc eax
mov dword [ebx], eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x54]
lea ecx, [esp + 0x18]
push eax
call fcn.0040ca40
mov esi, dword [esp + 0x50]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov ecx, dword [esp + 0x14]
push ecx
lea ecx, [esp + 0x1c]
call fcn.0040ca40
pop edi
pop ebp
pop ebx
lea ecx, [esp + 0xc]
mov dword [esp + 0x38], 0xffffffff
call fcn.0040d370
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 4]
pop esi
mov dword fs:[0], ecx
add esp, 0x38
ret 0x1c
Function at 0x405320
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push 0xffffffffffffffff
push 0x415cc1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x148
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x10]
call fcn.00401810
mov eax, dword [esi + 0xd8]
xor ebx, ebx
lea ecx, [esi + 0x320]
push ebx
push ecx
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x16c], ebx
call fcn.00402020
lea ecx, [esp + 0x30]
call fcn.0040c9c0
push str.SystemCurrentControlSetControlPrintPrinters
lea ecx, [esp + 0x1c]
mov byte [esp + 0x164], 1
call fcn.00401160
mov eax, dword [esi + 0xd8]
mov ecx, dword [esi + 0xdc]
mov edx, dword [esp + 0x1c]
push eax
mov byte [esp + 0x164], 2
lea eax, [edx + ecx + 2]
lea ecx, [esp + 0x1c]
push eax
call fcn.00401340
push eax
call fcn.0040ebb0
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call fcn.004013a0
mov eax, dword [esp + 0x18]
lea edi, [esi + 0x334]
push edi
push ebx
push ebx
push eax
push eax
push 0x80000002
mov ecx, esi
mov dword [edi], ebx
call fcn.00405550
mov ecx, dword [edi]
mov dword [esp + 0x14], eax
cmp ecx, ebx
jbe 0x405440
cmp eax, ebx
jbe 0x405440
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
je 0x405440
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
mov eax, dword [esp + 0x24]
mov ecx, esi
push eax
push eax
push 0x80000002
mov dword [edi], ebx
call fcn.00405550
push ebp
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405439
mov dword [esi + 0x330], ebp
jmp 0x405440
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esi + 0xd8]
lea edx, [esp + 0x24]
xor ebp, ebp
push edx
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], 0xf000c
call fcn.004019d0
mov edi, eax
cmp edi, ebp
je 0x4054fd
push ebp
push 2
push edi
lea ecx, [esp + 0x1c]
call fcn.00401d00
xor ebx, ebx
cmp eax, ebp
setne bl
cmp ebx, ebp
mov dword [esi + 0x338], eax
je 0x4054df
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x54]
push eax
push ecx
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], 0x104
call fcn.00401db0
test eax, eax
je 0x4054d2
mov edx, dword [ebp + 4]
lea eax, [esp + 0x54]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x4054d2
mov eax, dword [ebp + 0x34]
or al, 4
mov dword [ebp + 0x34], eax
mov ecx, dword [esi + 0x338]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
lea ecx, [esp + 0x14]
call fcn.00401a00
test ebx, ebx
je 0x4054fd
mov esi, dword [esi + 0xd8]
lea ecx, [esp + 0x10]
push esi
call fcn.00401ad0
lea ecx, [esp + 0x18]
mov byte [esp + 0x160], 1
call fcn.00401100
lea ecx, [esp + 0x30]
mov byte [esp + 0x160], 0
call fcn.0040d370
lea ecx, [esp + 0x10]
mov dword [esp + 0x160], 0xffffffff
call fcn.004041a0
mov ecx, dword [esp + 0x158]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x154
ret