joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40911b
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 4], ebx
lea ecx, [esi + 0x134]
call fcn.00407274
test eax, eax
je 0x40926a
push 0x3f
xor eax, eax
pop ecx
lea edi, [ebp - 0x107]
mov byte [ebp - 0x108], bl
push 0x3f
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
pop ecx
xor eax, eax
lea edi, [ebp - 0x207]
mov byte [ebp - 0x208], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_WriteProfileStringA]
push ebx
push ebx
push ebx
mov dword [ebp + 8], ebx
call edi
lea eax, [ebp - 0x108]
push 0x100
push eax
push 0x41c72c
push str.Load
push str.windows
call dword [sym.imp.KERNEL32.dll_GetProfileStringA]
mov esi, dword [sym.imp.USER32.dll_CharLowerA]
lea eax, [ebp - 0x108]
push eax
call esi
push dword [ebp + 0xc]
call esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x108]
push eax
call fcn.0040da70
mov esi, eax
pop ecx
cmp esi, ebx
pop ecx
mov dword [ebp - 8], esi
je 0x4092ae
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [ebp - 0x108]
add eax, esi
xor ecx, ecx
cmp esi, edx
je 0x4091eb
cmp byte [esi - 1], 0x20
jne 0x4091ee
push 1
pop ecx
mov al, byte [eax]
cmp al, 0x20
je 0x4091f8
cmp al, bl
jne 0x4091ff
mov dword [ebp + 8], 1
cmp ecx, ebx
je 0x4092ae
cmp dword [ebp + 8], ebx
je 0x4092ae
cmp byte [ebp - 0x108], bl
lea eax, [ebp - 0x208]
lea esi, [ebp - 0x108]
mov dword [ebp + 8], eax
je 0x40924d
cmp esi, dword [ebp - 8]
jne 0x40923e
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add esi, eax
cmp byte [esi], 0x20
jne 0x409249
jmp 0x409248
mov ecx, dword [ebp + 8]
mov al, byte [esi]
inc dword [ebp + 8]
mov byte [ecx], al
inc esi
cmp byte [esi], bl
jne 0x409227
lea eax, [ebp - 0x208]
push eax
push str.load
push str.windows
call edi
push ebx
push ebx
push ebx
mov dword [ebp - 4], eax
call edi
jmp 0x4092ae
lea eax, [ebp + 0xc]
lea ecx, [esi + 0x1d0]
push eax
push 0x33
mov dword [ebp + 0xc], ebx
call fcn.0040a539
push eax
push 0x80000002
call dword [sym.imp.ZSPOOL.dll_RegOpenKeyA]
test eax, eax
jne 0x4092ae
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
test eax, eax
jne 0x4092a5
mov dword [ebp - 4], 1
push dword [ebp + 0xc]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x409516
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5b0
push ebx
push esi
push edi
mov edi, ecx
lea ecx, [ebp - 0x9c]
call fcn.004071b6
push 0
lea ecx, [ebp - 0x5b0]
call fcn.00402d93
test eax, eax
jne 0x409555
lea eax, [ebp + 8]
push 0x416c90
push eax
mov dword [ebp + 8], 1
call fcn.0040d2d0
mov ebx, dword [edi + 0x9e4]
mov esi, dword [ebx]
cmp esi, ebx
je 0x4095d0
lea ecx, [esi + 8]
call fcn.0040b591
lea ecx, [ebp - 0x2a4]
push ecx
lea ecx, [ebp - 0x3a8]
push ecx
lea ecx, [ebp - 0x4ac]
push ecx
lea ecx, [ebp - 0x5b0]
push ecx
push eax
call fcn.0040d660
lea eax, [ebp - 0x2a4]
push eax
lea eax, [ebp - 0x3a8]
push eax
push 0
push 0
push dword [ebp + 8]
call fcn.0040d660
add esp, 0x28
lea ecx, [ebp - 0x5b0]
call fcn.00401578
push eax
lea ecx, [ebp - 0x9c]
call fcn.00409f0a
test eax, eax
jne 0x4095cc
mov eax, dword [edi + 8]
mov dword [eax], 1
mov esi, dword [esi]
jmp 0x40955d
mov ebx, dword [edi + 0x9ec]
mov esi, dword [ebx]
cmp esi, ebx
je 0x40962e
lea eax, [ebp - 0x2a4]
push eax
lea eax, [ebp - 0x3a8]
push eax
push 0
push 0
push dword [ebp + 8]
call fcn.0040d660
add esp, 0x14
lea ecx, [ebp - 0x5b0]
push 0
push 2
call fcn.00409e92
push eax
lea ecx, [esi + 8]
call fcn.0040b591
push eax
lea ecx, [ebp - 0x9c]
call fcn.00409f6b
test eax, eax
je 0x40962a
mov eax, dword [edi + 8]
mov dword [eax], 1
mov esi, dword [esi]
jmp 0x4095d8
mov eax, dword [edi + 8]
mov ebx, dword [eax + 0xa80]
mov esi, dword [ebx]
cmp esi, ebx
je 0x4096a1
lea ecx, [esi + 8]
call fcn.0040b596
push 0
lea ecx, [ebp - 0x4ac]
push 0
push ecx
lea ecx, [ebp - 0x5b0]
push ecx
push eax
call fcn.0040d660
add esp, 0x14
lea ecx, [ebp - 0x5b0]
push 1
push 3
push dword [ebp + 8]
call fcn.004029c1
push eax
lea ecx, [ebp - 0x9c]
call fcn.00409f6b
test eax, eax
je 0x40968b
mov eax, dword [edi + 8]
mov dword [eax], 1
mov esi, dword [esi]
lea ecx, [ebp - 0x5b0]
call fcn.004029c1
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x409639
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x409b24
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push ebx
push esi
push edi
push str.SOFTWAREZenographicsOEMProgramGroups
mov ebx, ecx
push 0x80000002
call dword [sym.imp.ZSPOOL.dll_RegDeleteKeyA]
mov ecx, dword [ebx + 8]
mov esi, 0xa88
add ecx, esi
call fcn.00405c05
mov ecx, dword [ebx + 8]
add ecx, esi
call fcn.004058bf
mov ecx, dword [ebx + 8]
add ecx, esi
call fcn.00409eb8
mov eax, dword [ebx + 8]
push 0x3f
pop ecx
lea edi, [ebp - 0x10f]
mov edx, dword [eax + 0xa88]
xor eax, eax
mov dword [ebp - 0x10], edx
mov esi, dword [edx]
and byte [ebp - 0x110], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp esi, edx
stosb byte es:[edi], al
je 0x409cf6
lea ecx, [esi + 8]
call fcn.0040b591
push eax
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x110]
push 0x2c
push eax
call fcn.0040b44b
mov edi, eax
push 0x2c
push edi
call fcn.0040b44b
push 0x2c
push eax
mov dword [ebp - 8], eax
call fcn.0040b44b
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x110]
add esp, 0x18
test eax, eax
je 0x409ced
test edi, edi
je 0x409ced
cmp dword [ebp - 8], 0
je 0x409ced
lea eax, [ebp - 0x110]
push 0x22
push eax
call fcn.0040b505
push 0x22
push edi
call fcn.0040b505
push 0x22
push dword [ebp - 8]
call fcn.0040b505
lea eax, [ebp - 0x110]
push str.HKLM
push eax
call fcn.00414410
add esp, 0x20
test eax, eax
jne 0x409c32
mov dword [ebp - 4], 0x80000002
jmp 0x409c90
lea eax, [ebp - 0x110]
push str.HKCR
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
jne 0x409c52
mov dword [ebp - 4], 0x80000000
jmp 0x409c90
lea eax, [ebp - 0x110]
push str.HKCU
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
jne 0x409c72
mov dword [ebp - 4], 0x80000001
jmp 0x409c90
lea eax, [ebp - 0x110]
push 0x419ac8
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
jne 0x409ceb
mov dword [ebp - 4], 0x80000003
mov eax, dword [ebp - 8]
cmp byte [eax], 0
je 0x409cc8
lea eax, [ebp - 4]
push eax
push 0xf003f
push 0
push edi
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegOpenKeyExA]
test eax, eax
jne 0x409ceb
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteValueA]
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegCloseKey]
jmp 0x409ceb
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x409ce1
cmp byte [eax], 0x31
jne 0x409ce1
push edi
mov ecx, ebx
push dword [ebp - 4]
call fcn.00409d6a
jmp 0x409ceb
push edi
push dword [ebp - 4]
call dword [sym.imp.ZSPOOL.dll_RegDeleteKeyA]
mov esi, dword [esi]
cmp esi, dword [ebp - 0x10]
jne 0x409b92
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409f6b
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x354
and dword [ebp - 0x250], 0
push ebx
push esi
push edi
mov dword [ebp - 0xc], ecx
and dword [ebp - 4], 0
push 0x4f
xor eax, eax
pop ecx
lea edi, [ebp - 0x24c]
push dword [ebp + 8]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x354]
push eax
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp - 0x354]
push eax
call ebx
cmp byte [ebp + eax - 0x355], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x409fd1
lea eax, [ebp - 0x354]
push 0x419118
push eax
call esi
lea eax, [ebp - 0x354]
push 0x419b20
push eax
call esi
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x354]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x40a116
push dword [ebp + 0xc]
lea eax, [ebp - 0x224]
push eax
call fcn.00414410
pop ecx
test eax, eax
pop ecx
jne 0x40a070
push dword [ebp + 8]
lea eax, [ebp - 0x110]
push eax
call edi
lea eax, [ebp - 0x110]
push eax
call ebx
cmp byte [ebp + eax - 0x111], 0x5c
je 0x40a041
lea eax, [ebp - 0x110]
push 0x419118
push eax
call esi
push dword [ebp + 0xc]
lea eax, [ebp - 0x110]
push eax
call esi
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x110]
push eax
call fcn.00409f0a
test eax, eax
jne 0x40a0f5
mov dword [ebp - 4], 1
jmp 0x40a0f5
test byte [ebp - 0x250], 0x10
je 0x40a0f5
cmp byte [ebp - 0x224], 0x2e
je 0x40a0f5
cmp dword [ebp + 0x10], 0
jbe 0x40a0f5
push dword [ebp + 8]
lea eax, [ebp - 0x110]
push eax
call edi
lea eax, [ebp - 0x110]
push eax
call ebx
cmp byte [ebp + eax - 0x111], 0x5c
je 0x40a0b5
lea eax, [ebp - 0x110]
push 0x419118
push eax
call esi
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x110]
push eax
call esi
mov eax, dword [ebp + 0x10]
push dword [ebp + 0x14]
mov ecx, dword [ebp - 0xc]
dec eax
push eax
lea eax, [ebp - 0x110]
push dword [ebp + 0xc]
push eax
call fcn.00409f6b
or dword [ebp - 4], eax
cmp dword [ebp + 0x14], 0
je 0x40a0f5
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea eax, [ebp - 0x250]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x409fff
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x40a120
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
and byte [ebp - 0x10c], 0
push ebx
push esi
lea eax, [ebp - 0x314]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [ebp - 0x10c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp byte [ebp + eax - 0x10d], 0x5c
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x40a183
lea eax, [ebp - 0x10c]
push 0x419118
push eax
call esi
lea eax, [ebp - 0x10c]
push str.WININIT.INI
push eax
call esi
xor ebx, ebx
lea eax, [ebp - 0x10c]
push ebx
push 0x80
push 4
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x40a253
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 0xb7
je 0x40a1ea
push ebx
lea eax, [ebp - 8]
mov ebx, str._RENAME__r_n
push eax
push ebx
call fcn.0040d8f0
pop ecx
push eax
push ebx
push dword [ebp - 4]
call edi
xor ebx, ebx
and byte [ebp - 0x210], 0
push 2
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 0x210]
push str.NUL
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push dword [ebp + 8]
lea eax, [ebp - 0x210]
push eax
call esi
lea eax, [ebp - 0x210]
push 0x419400
push eax
call esi
lea eax, [ebp - 8]
push ebx
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.0040d8f0
pop ecx
push eax
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 4]
call edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40a3e0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x514
push esi
push edi
push 1
mov esi, ecx
pop edi
lea ecx, [ebp - 0x514]
push edi
call fcn.00402d93
test eax, eax
jne 0x40a411
lea eax, [ebp + 8]
push 0x416c90
push eax
mov dword [ebp + 8], edi
call fcn.0040d2d0
mov eax, dword [esi]
push 4
inc eax
pop ecx
cdq
idiv ecx
cmp dword [ebp + 8], 0
mov dword [esi], edx
jne 0x40a436
lea eax, [ebp - 0x208]
push str..ini
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
jmp 0x40a45d
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x30c]
push eax
lea eax, [ebp - 0x410]
push eax
lea eax, [ebp - 0x514]
push eax
push dword [ebp + 8]
call fcn.0040d660
add esp, 0x14
push ebx
lea ecx, [ebp - 0x514]
call fcn.00401578
push eax
mov eax, dword [esi]
shl eax, 9
mov ebx, 0x200
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [eax + esi + 4]
push ebx
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x40a4d4
push eax
lea ecx, [ebp - 0x514]
call fcn.0040332b
lea ecx, [ebp - 0x514]
call fcn.00401578
push eax
mov eax, dword [esi]
shl eax, 9
push ebx
lea eax, [eax + esi + 4]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call edi
test eax, eax
jne 0x40a4d4
mov eax, dword [esi]
push 0x41c780
shl eax, 9
lea eax, [eax + esi + 4]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esi]
mov ecx, esi
shl eax, 9
lea eax, [eax + esi + 4]
push eax
call fcn.0040a4f5
mov eax, dword [esi]
pop ebx
shl eax, 9
pop edi
lea eax, [eax + esi + 4]
pop esi
leave
ret 0xc

Function at 0x40a635
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
mov eax, 0x414f1a
call fcn.0040d260
push ecx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
mov dword [esi], method.streambuf.virtual_28
xor edi, edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [ebp - 4], edi
mov dword [esi + 0x14], edi
mov dword [esi + 0x18], edi
mov dword [esi + 0x1c], edi
mov dword [esi + 0x20], edi
mov dword [esi + 0x24], edi
mov dword [esi + 0x28], edi
lea ecx, [esi + 0x38]
mov byte [ebp - 4], 2
call fcn.004071b6
push edi
lea ecx, [esi + 0xd8]
call fcn.0040a37f
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi], 0x416418
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret
Function at 0x40afcd
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x44
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
cmp dword [esi + 0x2c], ebp
jne 0x40aff4
push 0x75
push 0xfffffffffffffffa
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetWindowLongA]
push eax
call dword [sym.imp.USER32.dll_LoadMenuA]
mov dword [esi + 0x2c], eax
cmp dword [esi + 0x30], ebp
jne 0x40b068
push ebp
push dword [esi + 0x2c]
call dword [sym.imp.USER32.dll_GetSubMenu]
and byte [esp + 0x14], 0
push 0xf
mov dword [esi + 0x30], eax
pop ecx
xor eax, eax
lea edi, [esp + 0x15]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x40
push eax
lea eax, [esp + 0x18]
push eax
push str.SOFTWAREZenographicsZUnInst
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x40b045
cmp byte [esp + 0x14], al
jne 0x40b068
mov edi, dword [sym.imp.USER32.dll_DeleteMenu]
mov ebx, 0x400
push ebx
push 0xa
push dword [esi + 0x30]
call edi
push ebx
push 9
push dword [esi + 0x30]
call edi
push ebx
push 8
push dword [esi + 0x30]
call edi
cmp dword [esi + 0x2c], ebp
je 0x40b16a
cmp dword [esi + 0x30], ebp
je 0x40b16a
lea ebx, [esi + 0xc]
mov ecx, ebx
call fcn.0040b1a9
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x40b092
mov ecx, ebx
call fcn.0040b1a9
xor ecx, ecx
mov edi, dword [sym.imp.USER32.dll_CheckMenuItem]
test eax, eax
sete cl
neg ecx
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c44
push dword [esi + 0x30]
call edi
cmp ebp, 0xffffffff
mov eax, ebp
jne 0x40b0bf
mov ecx, ebx
call fcn.0040b1a9
xor ecx, ecx
cmp eax, 2
sete cl
neg ecx
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c45
push dword [esi + 0x30]
call edi
cmp ebp, 0xffffffff
mov eax, ebp
jne 0x40b0e7
mov ecx, ebx
call fcn.0040b1a9
xor ecx, ecx
cmp eax, 3
sete cl
neg ecx
sbb ecx, ecx
and ecx, 8
push ecx
push 0x9c46
push dword [esi + 0x30]
call edi
cmp ebp, 0xffffffff
mov eax, ebp
jne 0x40b10f
mov ecx, ebx
call fcn.0040b1a9
dec eax
neg eax
sbb eax, eax
and al, 0xf8
add eax, 8
push eax
push 0x9c47
push dword [esi + 0x30]
call edi
mov ebx, dword [ebx]
xor ebp, ebp
cmp ebx, ebp
je 0x40b13e
push ebp
push ebp
push 0x1032
push ebx
call dword [sym.imp.USER32.dll_SendMessageA]
cmp eax, ebp
ja 0x40b141
push 3
pop ebp
mov edi, dword [sym.imp.USER32.dll_EnableMenuItem]
mov ebx, 0x9c49
push ebp
push ebx
push dword [esi + 0x30]
call edi
push ebp
push 0x9c4c
push dword [esi + 0x30]
call edi
push 0
push ebx
push dword [esi + 0x30]
call dword [sym.imp.USER32.dll_SetMenuDefaultItem]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x44
ret
Function at 0x40b33e
Capabilities:
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push edi
xor edi, edi
push 0xf003f
push edi
push edi
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
cmp eax, edi
mov dword [ebp - 8], eax
je 0x40b3aa
push ebx
push esi
push 0xf01ff
push str.Spooler
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov esi, eax
cmp esi, edi
je 0x40b3a3
push 6
mov dword [ebp - 0x24], edi
pop ecx
xor eax, eax
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
push 1
pop edi
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40b3a0
mov dword [ebp - 4], edi
push esi
call ebx
push dword [ebp - 8]
call ebx
pop esi
pop ebx
mov eax, dword [ebp - 4]
pop edi
leave
ret

Function at 0x40c314
Capabilities:
Enumerate files on windows
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x758
and dword [ebp - 0x140], 0
push edi
push 0x4f
xor eax, eax
pop ecx
lea edi, [ebp - 0x13c]
rep stosd dword es:[edi], eax
push eax
lea ecx, [ebp - 0x758]
call fcn.00402d93
test eax, eax
jne 0x40c357
lea eax, [ebp + 0xc]
push 0x416c90
push eax
mov dword [ebp + 0xc], 1
call fcn.0040d2d0
lea ecx, [ebp - 0x244]
call fcn.0040b57a
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x40c457
cmp byte [eax], 0
je 0x40c457
lea ecx, [ebp - 0x44c]
push ebx
push ecx
lea ecx, [ebp - 0x550]
push ecx
lea ecx, [ebp - 0x654]
push ecx
lea ecx, [ebp - 0x758]
push ecx
push eax
call fcn.0040d660
add esp, 0x14
lea ecx, [ebp - 0x758]
call fcn.004029c1
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push eax
call edi
lea eax, [ebp - 0x140]
push eax
push dword [ebp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40c43b
push esi
mov esi, dword [ebp + 8]
cmp dword [ebp - 0x140], 0x10
je 0x40c421
lea eax, [ebp - 0x44c]
push eax
lea eax, [ebp - 0x550]
push eax
push 0
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.0040d660
add esp, 0x14
lea ecx, [ebp - 0x758]
call fcn.00401578
push eax
lea ecx, [ebp - 0x244]
call fcn.0040b5a6
mov eax, dword [esi]
lea ecx, [ebp - 0x244]
push ecx
push eax
lea eax, [ebp + 0xc]
mov ecx, esi
push eax
call fcn.00405880
lea eax, [ebp - 0x140]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40c3cb
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
pop esi
push 1
lea ecx, [ebp - 0x758]
call fcn.00402d93
lea ecx, [ebp - 0x758]
call fcn.004029c1
push eax
call edi
pop ebx
pop edi
leave
ret 0xc
Function at 0x40d460
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41c7cc]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40d47f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x41c7c8], 1
mov byte [0x41c7c4], bl
jne 0x40d4d9
mov ecx, dword [0x41dd50]
test ecx, ecx
je 0x40d4c7
mov esi, dword [0x41dd4c]
sub esi, 4
cmp esi, ecx
jb 0x40d4c7
mov eax, dword [esi]
test eax, eax
je 0x40d4c0
call eax
mov ecx, dword [0x41dd50]
sub esi, 4
cmp esi, ecx
jae 0x40d4b2
push 0x419034
push 0x41902c
call fcn.0040d510
add esp, 8
push 0x419040
push 0x419038
call fcn.0040d510
add esp, 8
test ebx, ebx
jne 0x40d500
push ebp
mov dword [0x41c7cc], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x40e150
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x416490
push 0x40ffc4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x41c79c], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x41c798], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41c794], ecx
shr eax, 0x10
mov dword [0x41c790], eax
call fcn.00410990
test eax, eax
jne 0x40e1ba
push 0x1c
call fcn.0040e320
add esp, 4
mov dword [ebp - 4], 0
call fcn.00410790
call fcn.0040fb00
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41dd48], eax
call fcn.00410630
mov dword [0x41c7d0], eax
test eax, eax
je 0x40e1ed
mov eax, dword [0x41dd48]
test eax, eax
jne 0x40e1f7
push 0xffffffffffffffff
call fcn.0040d420
add esp, 4
call fcn.00410380
call fcn.00410290
call fcn.0040d3f0
mov esi, dword [0x41dd48]
mov dword [ebp - 0x64], esi
cmp byte [esi], 0x22
jne 0x40e2d6
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
cmp al, 0x22
je 0x40e23e
test al, al
je 0x40e23e
and eax, 0xff
push eax
call fcn.00410230
add esp, 4
test eax, eax
je 0x40e218
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40e218
cmp byte [esi], 0x22
jne 0x40e247
inc esi
mov dword [ebp - 0x64], esi
mov al, byte [esi]
test al, al
je 0x40e257
cmp al, 0x20
ja 0x40e257
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40e247
mov dword [ebp - 0x30], 0
lea eax, [ebp - 0x5c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
test byte [ebp - 0x30], 1
je 0x40e278
mov eax, dword [ebp - 0x2c]
and eax, 0xffff
jmp 0x40e27d
mov eax, 0xa
push eax
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call main
mov dword [ebp - 0x60], eax
push eax
call fcn.0040d420
jmp 0x40e2bb
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0x20
jbe 0x40e247
inc esi
mov dword [ebp - 0x64], esi
jmp 0x40e2d6
Function at 0x40e320
Capabilities:
Terminate process

Disassembly:
cmp dword [0x41c7d8], 1
jne 0x40e32e
call fcn.004109d0
mov eax, dword [esp + 4]
push eax
call fcn.00410a10
add esp, 4
push 0xff
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x410630
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41cb48]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x410672
call edi
mov esi, eax
test esi, esi
je 0x41065c
mov eax, 1
jmp 0x41066d
call ebp
mov ebx, eax
test ebx, ebx
je 0x41077f
mov eax, 2
mov dword [0x41cb48], eax
cmp eax, 1
jne 0x410712
test esi, esi
jne 0x41068b
call edi
mov esi, eax
test esi, esi
je 0x41077f
cmp word [esi], 0
mov eax, esi
je 0x4106a5
add eax, 2
cmp word [eax], 0
jne 0x410693
add eax, 2
cmp word [eax], 0
jne 0x410693
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x410704
push edi
call fcn.0040eff0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x410704
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x4106f6
push ebx
call fcn.0040eea0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x41077f
test ebx, ebx
jne 0x410723
call ebp
mov ebx, eax
test ebx, ebx
je 0x41077f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41073b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41072b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41072b
sub eax, ebx
inc eax
mov esi, eax
push esi
call fcn.0040eff0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x41075d
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, esi
mov esi, ebx
mov eax, ecx
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret