joyce8/EMBER2024-capa huggingface dataset:
Function at 0xaefe00
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0xb058f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov ecx, dword [esp + 0x1c]
push esi
mov esi, dword [esp + 0x24]
lea eax, [esp + 4]
push edi
xor edi, edi
push eax
push 0x20019
push edi
push esi
push ecx
mov dword [esp + 0x1c], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, edi
je 0xaefed2
lea edx, [esp + 0x24]
push eax
push edx
call fcn.00aec7a0
add esp, 8
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], edi
cmp eax, edi
je 0xaefe61
mov edx, dword [eax]
jmp 0xaefe63
xor edx, edx
xor ecx, ecx
push edi
xor eax, eax
push edx
push ecx
mov ecx, dword [esp + 0x38]
push eax
lea eax, [esp + 0x1c]
mov edx, dword [ecx + 4]
push eax
push esi
push 2
push edx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], edi
call fcn.00aee050
mov eax, dword [esp + 0x44]
add esp, 0x20
cmp eax, edi
mov dword [esp + 0x1c], 0xffffffff
je 0xaefebf
mov esi, eax
add eax, 8
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0xaefebf
cmp esi, edi
je 0xaefebf
mov ecx, esi
call fcn.00ae7a00
push esi
call fcn.00af51c8
add esp, 4
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
push edi
lea eax, [esp + 0x2c]
push edi
push eax
call fcn.00aec990
add esp, 0xc
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], 1
cmp eax, edi
je 0xaefef5
mov eax, dword [eax]
jmp 0xaefef7
xor eax, eax
mov ecx, dword [esp + 8]
mov edx, dword [esp + 0x2c]
push ebx
push esi
push eax
push ecx
push edx
call fcn.00aeb640
add esp, 0x10
mov bl, al
mov eax, dword [esp + 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x2c]
cmp eax, edi
je 0xaeff25
mov eax, dword [eax]
jmp 0xaeff27
xor eax, eax
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x20], 0xffffffff
cmp esi, edi
je 0xaeff76
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0xaeff76
cmp esi, edi
je 0xaeff76
mov eax, dword [esi]
cmp eax, edi
je 0xaeff5d
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, edi
je 0xaeff6d
push eax
call fcn.00af51c8
add esp, 4
push esi
call fcn.00af51c8
add esp, 4
mov ecx, dword [esp + 0x18]
mov al, bl
pop ebx
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0xaeff90
Capabilities:
Query or enumerate registry key

Disassembly:
sub esp, 0x208
lea eax, [esp]
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
push ebp
push esi
push edi
xor edi, edi
push 0x104
push eax
push edi
push SysStringLen
call ebx
mov esi, dword [esp + 0x21c]
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0xaefffb
mov ecx, dword [esi + 8]
push 0
push ecx
call ebp
test eax, eax
je 0xaf0035
lea edx, [esp + 0x10]
push esi
push edx
push SysStringLen
call fcn.00aefe00
add esp, 0xc
lea eax, [esp + 0x10]
inc edi
push 0x104
push eax
push edi
push SysStringLen
call ebx
test eax, eax
je 0xaeffc5
mov edi, 0xb0a8b0
mov ecx, dword [esi + 8]
push 0
push ecx
call ebp
test eax, eax
je 0xaf0035
mov edx, dword [edi]
push esi
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00aefe00
add edi, 4
add esp, 0xc
cmp edi, 0xb0a8c0
jb 0xaf0000
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x208
ret
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x208
ret

Function at 0xaf0070
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x250
push esi
push edi
mov edi, dword [esp + 0x25c]
push 0x5c
push edi
call fcn.00af6082
mov esi, eax
add esp, 8
test esi, esi
je 0xaf0107
lea eax, [esp + 8]
mov word [esi], 0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0xaf0102
push ebx
lea ebx, [esi + 2]
push ebp
lea ecx, [esp + 0x3c]
push ebx
push ecx
call fcn.00af5946
add esp, 8
test eax, eax
je 0xaf00e3
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileW]
lea edx, [esp + 0x10]
push edx
push edi
call ebp
test eax, eax
je 0xaf00e8
lea eax, [esp + 0x3c]
push ebx
push eax
call fcn.00af5946
add esp, 8
test eax, eax
jne 0xaf00c5
mov word [esi], 0x5c
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp word [esi], 0
pop ebp
pop ebx
je 0xaf0102
pop edi
mov al, 1
pop esi
add esp, 0x250
ret
mov word [esi], 0x5c
pop edi
xor al, al
pop esi
add esp, 0x250
ret
Function at 0xaf0f10
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0xb059fb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov esi, dword [esp + 0x2c]
xor ebp, ebp
mov dword [esp + 0x10], eax
xor ebx, ebx
mov eax, 1
mov ecx, ebx
shl eax, cl
mov ecx, dword [esp + 0x10]
test ecx, eax
je 0xaf1002
lea edx, [ebx + 0x41]
lea eax, [esp + 0x14]
push edx
push str._c:_
push eax
call fcn.00af4dff
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
jne 0xaf1002
lea edx, [esp + 0x14]
push edx
push str.Mounting__s_n
call fcn.00aec6e0
lea eax, [esp + 0x1c]
lea edi, [esi + 0x1048]
push eax
push edi
mov word [esp + 0x28], bp
call fcn.00af520b
push 0x10
call fcn.00af51d3
add esp, 0x14
mov dword [esp + 0x2c], eax
cmp eax, ebp
mov dword [esp + 0x24], ebp
je 0xaf0fc5
mov cx, word [edi]
push ecx
mov ecx, eax
call fcn.00ae11c0
jmp 0xaf0fc7
xor eax, eax
push esi
mov dword [esp + 0x28], 0xffffffff
mov dword [esi], eax
call fcn.00af0b80
mov edi, dword [esi]
add esp, 4
cmp edi, ebp
je 0xaf0ff0
mov ecx, edi
call fcn.00ae12c0
push edi
call fcn.00af51c8
add esp, 4
mov edx, dword [esi + 0x1024]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0xaf1021
inc ebx
cmp ebx, 0x20
jb 0xaf0f3e
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0xc]
mov dword fs:[0], ecx
add esp, 0x18
ret
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
mov dword fs:[0], ecx
add esp, 0x18
ret
Function at 0xaf2250
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0xb06808
push 0xaf6288
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x28], ebx
xor esi, esi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x24], bl
mov dword [ebp - 4], ebx
mov byte [ebp - 0x34], bl
mov byte [ebp - 0x33], bl
mov byte [ebp - 0x32], bl
mov byte [ebp - 0x31], bl
mov byte [ebp - 0x30], bl
mov byte [ebp - 0x2f], 5
lea eax, [ebp - 0x1c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
push 1
lea ecx, [ebp - 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0xaf2329
lea edx, [ebp - 0x28]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0xaf2329
mov dword [ebp - 0x2c], ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push 1
mov ecx, dword [ebp - 0x28]
push ecx
mov edi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
call edi
mov edx, dword [ebp - 0x2c]
push edx
call fcn.00af51d3
add esp, 4
mov esi, eax
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x20], esi
cmp esi, ebx
je 0xaf2329
lea eax, [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x2c]
push ecx
push esi
push 1
mov edx, dword [ebp - 0x28]
push edx
call edi
test eax, eax
je 0xaf2329
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.ADVAPI32.dll_EqualSid]
neg eax
sbb eax, eax
neg eax
mov byte [ebp - 0x24], al
jmp 0xaf232c
mov al, byte [ebp - 0x24]
mov dword [ebp - 4], 0xffffffff
call fcn.00af2351
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0xaf2d20
Capabilities:
Query or enumerate registry value

Disassembly:
push ecx
mov edx, dword [esp + 8]
push esi
mov esi, dword [esp + 0x10]
lea eax, [esp + 4]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
mov dword [esp + 0x1c], 8
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xaf2d58
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esi], ecx
mov dword [esi + 4], edx
pop esi
pop ecx
ret 0x10

Function at 0xaf2d60
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0xc]
lea eax, [esp + 0x10]
push eax
mov eax, dword [ecx + 4]
push esi
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0xaf2d94
mov eax, dword [esp + 0x14]
test eax, eax
je 0xaf2d94
push eax
push esi
call fcn.00af520b
add esp, 8
pop esi
ret 0x10

Function at 0xaf2da0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x24
lea eax, [esp + 0x28]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xaf2e22
push ebx
mov ebx, dword [esp + 0x30]
push esi
xor esi, esi
test ebx, ebx
jbe 0xaf2e15
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push edi
mov edi, dword [esp + 0x40]
push esi
lea ecx, [esp + 0x18]
push 0xb0b320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00af4dff
mov ecx, dword [esp + 0x44]
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push edi
push 0
push 0
push eax
push ecx
call ebp
inc esi
add edi, 4
cmp esi, ebx
jb 0xaf2dda
pop edi
pop ebp
mov edx, dword [esp + 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
add esp, 0x24
ret 0xc

Function at 0xaf2e30
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x28
lea eax, [esp + 0x2c]
push eax
mov eax, dword [ecx + 4]
push 0x20019
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0xaf2ec2
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
test ebp, ebp
jbe 0xaf2eb5
push ebx
mov ebx, dword [esp + 0x40]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push esi
lea ecx, [esp + 0x1c]
push 0xb0b320
push ecx
mov dword [esp + 0x1c], 4
call fcn.00af4dff
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x40]
push eax
push 0
push 0
push ecx
push edx
call edi
test eax, eax
jne 0xaf2eab
mov ax, word [esp + 0x14]
mov word [ebx], ax
inc esi
add ebx, 2
cmp esi, ebp
jb 0xaf2e6a
pop edi
pop ebx
mov ecx, dword [esp + 0x34]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebp
add esp, 0x28
ret 0xc
Function at 0xaf3000
Capabilities:
Get file version info

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov esi, eax
test esi, esi
je 0xaf3131
push esi
call fcn.00af6145
add esp, 4
mov edi, eax
push edi
push esi
push 0
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
push 0
push 0x80
push 3
push 0
push 0
push 0xc0000000
push ebx
call fcn.00ae5080
mov ebp, eax
add esp, 0x1c
cmp ebp, 0xffffffff
je 0xaf3131
push 0
push ebp
call fcn.00ae53a0
push 0
push 0
push 0
push 4
push 0
push ebp
mov ebx, eax
call fcn.00ae5260
add esp, 0x20
mov dword [esp + 0x18], eax
test eax, eax
jne 0xaf308b
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0
push 0
push 0
push 6
push eax
call fcn.00ae52f0
mov esi, eax
add esp, 0x14
test esi, esi
je 0xaf3121
push 0xb0b918
push edi
call fcn.00af43f0
push eax
push ebx
push esi
call fcn.00af2f60
push 0xb0b8f8
push edi
call fcn.00af43f0
push eax
push ebx
push esi
call fcn.00af2f60
push 0xb0b8d8
push edi
call fcn.00af43f0
push eax
push ebx
push esi
call fcn.00af2f60
push 0xb0b8c0
push edi
call fcn.00af43f0
add esp, 0x44
push eax
push ebx
push esi
call fcn.00af2f60
push 0xb0b8a0
push edi
call fcn.00af43f0
push eax
push ebx
push esi
call fcn.00af2f60
push 0xb0b888
push edi
call fcn.00af43f0
push eax
push ebx
push esi
call fcn.00af2f60
add esp, 0x34
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
push ebp
call esi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0xaf41b0
Capabilities:
Acquire debug privileges

Disassembly:
push ecx
lea eax, [esp]
mov dword [esp], 0
push eax
push 0x20
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp]
push 1
push str.SeBackupPrivilege
push ecx
call fcn.00af4140
mov edx, dword [esp + 0xc]
push 1
push str.SeDebugPrivilege
push edx
call fcn.00af4140
mov eax, dword [esp + 0x18]
push 1
push str.SeRestorePrivilege
push eax
call fcn.00af4140
mov ecx, dword [esp + 0x24]
push 1
push str.SeSecurityPrivilege
push ecx
call fcn.00af4140
mov edx, dword [esp + 0x30]
add esp, 0x30
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
pop ecx
ret

Function at 0xaf4bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push str.CLSIDADB880A6_D8FF_11CF_9377_00AA003B7A11InprocServer32
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0xaf4c50
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 0x104
push esi
push esi
push 0xb0687c
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0xaf4c43
inc esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
jmp 0xaf4c52
xor eax, eax
pop esi
leave
ret 4
Function at 0x98a68c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x98a6b3
call fcn.0092cbf8
mov dword [eax], esi
call fcn.0092cbe5
push 0x16
pop esi
mov dword [eax], esi
call fcn.0092d83a
mov eax, esi
jmp 0x98a708
test dword [ebp + 0xc], 0xfffffff9
jne 0x98a699
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x98a6e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0092cc0b
pop ecx
call fcn.0092cbe5
mov eax, dword [eax]
jmp 0x98a708
test al, 0x10
jne 0x98a706
test al, 1
je 0x98a706
test byte [ebp + 0xc], 2
je 0x98a706
call fcn.0092cbf8
mov dword [eax], 5
call fcn.0092cbe5
mov dword [eax], 0xd
jmp 0x98a6d7
xor eax, eax
pop esi
pop ebp
ret

Function at 0x422be0
Capabilities:
Encode data using xor

Disassembly:
jmp 0x422d3e
nop
jl 0x422c37
int1
ror dword [edi], 1
push cs
cmpsb byte [esi], byte es:[edi]
jb 0x422c2b
push cs
sbb ah, cl
popal
loope 0x422c54
popal
popal
popal
popal
popal
jnp 0x422bf1
mov bh, 0x79
div byte [esi - 0x97bd510]
jp 0x422bf3
jb 0x422c25
or eax, 0x1c832ae0
dec ecx
invalid
jb 0x422c46
or eax, 0x15822ae0
sar byte [eax], 0x72
adc eax, 0x197238c0
cmp esp, 0x30
sbb edx, esi
cmp esp, 0x30
adc ecx, edi
stc
jnp 0x422c2f
div dword [edi - 0x7af1fe8e]
test dword [eax + 0x34], edi
lock sub al, byte [esi + esi*8 + 0x1f72ef7a]
mov bh, 0x72
add dword [esi], ecx
test dword [ebp + 0x2af03478], eax
test dh, dh
jp 0x422c35
jb 0x422c67
or eax, 0x38e02ae0
lock sub al, byte [esi + esi*8 + 0x1f72ef7a]
pop ds
or eax, 0x38e02ae0
test cl, dl
mov al, 0xf0
sub al, byte [esi + esi*8 + 0x1f72ef7a]
or eax, 0x38e02ae0
lock sub al, byte [edx + 0x7af8841e]
sub ah, al
cmp al, dh
sub al, byte [edx + 0x7af8841e]
out dx, eax
jb 0x422c93
or eax, 0x15822ae0
jb 0x422cab
xor bl, dh
jo 0x422c8a
jo 0x422c8a
int1
add cl, byte [esi]
push cs
jb 0x422ca4
invalid
or eax, 0xf37bfe87
mov bl, 0x79
div byte [esi + 0x180684b8]
xchg edx, eax
mov eax, 0x92180684
push cs
push cs
push cs
popal
jp 0x422c91
jb 0x422cd3
cmc
js 0x422c99
jb 0x422cdb
cmc
cmc
jb 0x422cc0
cmc
xchg byte [eax], al
lock sbb byte ds:[ebp - 0x50f1f1f2], bh
scasd eax, dword es:[edi]
js 0x422cbb
dec eax
int1
int1
int1
jnp 0x422cb2
div byte [esi - 0xf32e623]
xchg byte [esi], al
mov dh, 0xdd
sbb ebp, ecx
lock xchg byte [esi], al
jno 0x422c93
test byte [ebx], al
jp 0x422cc0
jnp 0x422c7a
cmc
xchg edi, eax
xor byte [ecx], bl
stc
xor byte [ecx], dh
loope 0x422d4c
xor eax, 0x1a7109d8
sbb eax, esi
add dword [eax - 0xa], edi
lock add dword [eax - 0xa], edi
jb 0x422d17
hlt
mov dh, 0xa1
mov dh, 0x48
cmpsb byte [esi], byte es:[edi]
mov ecx, 0xea45f03
sbb dword [bp - 0xe0e], esp
clc
xor dword [ebp + 0x72f278f6], eax
xor dh, ch
sbb ch, byte [ecx]
push cs
sbb eax, 0x90f1f2a6
sbb byte [ebx], dl
in eax, dx
std
inc dword [eax]
mov eax, section._4321280
xor byte [eax], 0x56
inc eax
cmp eax, 0x422bcc
jle 0x422d43
mov eax, 0x422be6
xor byte [eax], 0xf1
inc eax
cmp eax, 0x422d38
jle 0x422d53
pushal
mov esi, section._4321280
jmp 0x422be5
Function at 0x4020d4
Capabilities:
Create directory

Disassembly:
mov eax, 0x4059d0
call fcn.00405300
sub esp, 0x34
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x28]
push dword [eax + 0x74]
push 0x14
push dword [ebp - 0x28]
call fcn.00403304
add esp, 0xc
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x74
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40215e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40215e
push 0xffffffffffffffff
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x28]
call fcn.0040370c
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x30], eax
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x30]
push dword [eax]
mov eax, dword [ebp - 0x28]
push dword [eax + 0x74]
push 0x2d
lea eax, [ebp - 0x10]
push eax
call fcn.004011d4
add esp, 0x10
push 0x4071f0
lea eax, [ebp - 0x10]
push eax
call sub.MSVCR70.dll__CxxThrowException
mov eax, dword [ebp - 0x28]
push dword [eax + 0x94]
push 0x14
push dword [ebp - 0x28]
call fcn.00403304
add esp, 0xc
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x94
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4021e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4021e4
push 0xffffffffffffffff
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x28]
call fcn.0040370c
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x38]
push dword [eax]
mov eax, dword [ebp - 0x28]
push dword [eax + 0x94]
push 0x2d
lea eax, [ebp - 0x18]
push eax
call fcn.004011d4
add esp, 0x10
push 0x4071f0
lea eax, [ebp - 0x18]
push eax
call sub.MSVCR70.dll__CxxThrowException
mov eax, dword [ebp - 0x28]
push dword [eax + 0x98]
push 0x14
push dword [ebp - 0x28]
call fcn.00403304
add esp, 0xc
push 0
mov ecx, dword [ebp - 0x28]
add ecx, 0x98
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40226a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40226a
push 0xffffffffffffffff
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x28]
call fcn.0040370c
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 4], 2
mov eax, dword [ebp - 0x40]
push dword [eax]
mov eax, dword [ebp - 0x28]
push dword [eax + 0x98]
push 0x2d
lea eax, [ebp - 0x20]
push eax
call fcn.004011d4
add esp, 0x10
push 0x4071f0
lea eax, [ebp - 0x20]
push eax
call sub.MSVCR70.dll__CxxThrowException
push 1
push 0x3f2
mov ecx, dword [ebp - 0x28]
call fcn.004032cd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret
Function at 0x40229e
Capabilities:
Check if file exists
Delete directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 4]
cmp dword [eax + 0x80], 0
jne 0x40237b
mov eax, dword [ebp - 4]
push dword [eax + 0x98]
push 0x15
push dword [ebp - 4]
call fcn.00403304
add esp, 0xc
mov ecx, dword [ebp - 4]
add ecx, 0x98
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4022fa
mov ecx, dword [ebp - 4]
add ecx, 0x98
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov eax, dword [ebp - 4]
push dword [eax + 0x94]
push 0x15
push dword [ebp - 4]
call fcn.00403304
add esp, 0xc
mov ecx, dword [ebp - 4]
add ecx, 0x94
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40233f
mov ecx, dword [ebp - 4]
add ecx, 0x94
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
mov eax, dword [ebp - 4]
push dword [eax + 0x74]
push 0x15
push dword [ebp - 4]
call fcn.00403304
add esp, 0xc
mov ecx, dword [ebp - 4]
add ecx, 0x74
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40237b
mov ecx, dword [ebp - 4]
add ecx, 0x74
call fcn.00404214
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
cmp dword [ebp + 8], 0
je 0x402390
push 1
push 0x3f2
mov ecx, dword [ebp - 4]
call fcn.004032cd
leave
ret 4
Function at 0x402a70
Capabilities:
Create service

Disassembly:
mov eax, 0x405aa8
call fcn.00405300
sub esp, 0x38
mov dword [ebp - 0x34], ecx
push 0x18
push dword [ebp - 0x34]
call fcn.00403304
pop ecx
pop ecx
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x402ae0
push 0xffffffffffffffff
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x34]
call fcn.0040370c
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x3c], eax
and dword [ebp - 4], 0
mov eax, dword [ebp - 0x3c]
push dword [eax]
push 0x24
lea eax, [ebp - 0x24]
push eax
call fcn.004011d4
add esp, 0xc
push 0x4071f0
lea eax, [ebp - 0x24]
push eax
call sub.MSVCR70.dll__CxxThrowException
mov dword [ebp - 0x14], 3
mov eax, dword [ebp - 0x34]
cmp dword [eax + 0x7c], 0
je 0x402af7
mov dword [ebp - 0x14], 2
mov dword [ebp - 0x10], 0x10
lea ecx, [ebp - 0x20]
call fcn.0040412d
mov dword [ebp - 4], 1
mov eax, dword [ebp - 0x34]
push dword [eax + 0x74]
push str._s_bin_named.exe
lea eax, [ebp - 0x20]
push eax
call fcn.00403cff
add esp, 0xc
push 0x19
push dword [ebp - 0x34]
call fcn.00403304
pop ecx
pop ecx
push 0
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x20]
call fcn.00404214
push eax
push 1
push dword [ebp - 0x14]
push dword [ebp - 0x10]
push 0xf01ff
push 0x406ad8
push str.named
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402bb5
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x431
je 0x402bb5
push 0xffffffffffffffff
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x34]
call fcn.0040370c
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x44], eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x44]
push dword [eax]
push 0x29
lea eax, [ebp - 0x2c]
push eax
call fcn.004011d4
add esp, 0xc
push 0x4071f0
lea eax, [ebp - 0x2c]
push eax
call sub.MSVCR70.dll__CxxThrowException
cmp dword [ebp - 0x18], 0
je 0x402bc4
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 0x1c], 0
je 0x402bd3
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 1
push 0x3f0
mov ecx, dword [ebp - 0x34]
call fcn.004032cd
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.00401168
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret