joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405be0
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x174
push ebx
mov eax, dword [esp + 0x17c]
push esi
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 0x80000000
push eax
mov dword [esp + 0x2c], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405e08
push ebp
lea ecx, [esp + 0x18]
push edi
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
test eax, eax
mov dword [esp + 0x14], eax
je 0x405df2
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x405df2
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea edx, [esp + 0x10]
push esi
push edx
lea eax, [esp + 0x2c]
push 0x40
push eax
push ebx
call ebp
test eax, eax
je 0x405df2
cmp dword [esp + 0x10], 0x40
jne 0x405df2
cmp word [esp + 0x24], 0x5a4d
jne 0x405df2
mov ecx, dword [esp + 0x60]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
push esi
push ecx
push ebx
call edi
cmp eax, dword [esp + 0x60]
jne 0x405df2
lea edx, [esp + 0x10]
push esi
push edx
lea eax, [esp + 0x94]
push 0xf8
push eax
push ebx
call ebp
test eax, eax
je 0x405df2
cmp dword [esp + 0x8c], 0x4550
jne 0x405df2
mov eax, dword [esp + 0x92]
test ax, ax
je 0x405df2
mov edx, dword [esp + 0xa0]
and eax, 0xffff
add eax, 0x6666666
and edx, 0xffff
push 0
push 0
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x68]
add eax, edx
lea esi, [eax + ecx*8]
push esi
push ebx
call edi
cmp eax, esi
jne 0x405df2
lea ecx, [esp + 0x10]
push 0
push ecx
lea edx, [esp + 0x6c]
push 0x28
push edx
push ebx
call ebp
test eax, eax
je 0x405df2
cmp dword [esp + 0x10], 0x28
jne 0x405df2
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
mov ebp, dword [esp + 0x14]
lea edi, [ecx + eax]
cmp edi, ebp
mov dword [esp + 0x20], edi
jae 0x405df2
sub ebp, edi
push 4
push 0x1000
push ebp
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
je 0x405df2
push 0
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, edi
jne 0x405de4
lea edx, [esp + 0x10]
push 0
push edx
push ebp
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405de4
cmp dword [esp + 0x10], ebp
jne 0x405de4
mov eax, dword [esp + 0x18c]
mov dword [esp + 0x18], esi
test eax, eax
je 0x405da3
mov ecx, 0x3e
lea esi, [esp + 0x8c]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x198]
test eax, eax
je 0x405db0
mov dword [eax], ebp
mov eax, dword [esp + 0x194]
test eax, eax
je 0x405dc1
mov ecx, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, dword [esp + 0x190]
test eax, eax
je 0x405df2
push ebx
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x174
ret
push 0x8000
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x174
ret
mov eax, esi
pop esi
pop ebx
add esp, 0x174
ret
Function at 0x405f30
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10c
push ebp
lea eax, [esp + 4]
push esi
lea ecx, [esp + 0x18]
push eax
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x120]
lea eax, [esp + 0x24]
push edx
xor esi, esi
push eax
push ecx
xor ebp, ebp
mov dword [esp + 0x24], esi
call fcn.00405be0
mov edx, eax
add esp, 0x14
cmp edx, ebp
mov dword [esp + 0xc], edx
je 0x4060a8
mov ecx, dword [esp + 0x24]
push ebx
push edi
mov eax, 0x41cd60
cmp dword [eax], ecx
je 0x405f91
add eax, 0x14
inc esi
cmp eax, 0x41da30
jb 0x405f7d
jmp 0x406087
cmp ecx, 0x47c45918
jne 0x405f9e
mov word [esp + 0x3a], bp
lea esi, [esi + esi*4]
xor ebx, ebx
shl esi, 2
mov edi, dword [esi + 0x41cd68]
cmp edi, ebp
jne 0x405fba
mov eax, dword [esp + 0x10]
mov edi, dword [eax + edx - 4]
jmp 0x405fd7
cmp edi, 0xffffffff
jne 0x405fd7
mov ebp, dword [esp + 0x14]
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x10]
mov ebx, dword [ebp]
add ebp, 8
sub edi, eax
test ebp, ebp
jne 0x406007
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
mov ecx, edi
push 4
sub ecx, edx
add ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x406007
mov eax, dword [esp + 0x1c]
mov edx, edi
sub edx, eax
mov eax, dword [esp + 0x14]
mov ebx, dword [edx + eax]
lea ebp, [edx + eax]
add ebp, 8
mov eax, dword [esp + 0x10]
cmp ebx, eax
jbe 0x406012
lea ebx, [eax - 8]
test ebp, ebp
je 0x40607f
mov ecx, dword [esi + 0x41cd70]
mov eax, dword [esi + 0x41cd6c]
push ebp
push ecx
mov ecx, dword [esi + 0x41cd64]
push eax
push ecx
push edi
push ebx
call fcn.00405e50
add esp, 0x18
test eax, eax
je 0x406087
mov edx, dword [esp + 0x124]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406087
lea eax, [esp + 0x10]
push 0
push eax
push ebx
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 1
jmp 0x406087
mov dword [esp + 0x18], 2
mov ecx, dword [esp + 0x14]
push 0x8000
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, dword [esp + 0x18]
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x10c
ret
mov eax, esi
pop esi
pop ebp
add esp, 0x10c
ret
Function at 0x4063a0
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419330
push 0x40ee54
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp + 8]
mov dword [ebp - 0x24], eax
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [ebp - 0x20], esi
xor eax, eax
mov ax, word [esi + 0x14]
lea eax, [eax + esi + 0x18]
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp + 0xc]
cmp edx, dword [eax + 0xc]
jae 0x406408
mov dword [ebp - 4], 0xffffffff
mov eax, edx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x28], edi
xor ecx, ecx
mov cx, word [esi + 6]
cmp edi, ecx
jae 0x406456
mov ecx, dword [eax + 0xc]
cmp edx, ecx
jb 0x406444
mov ebx, dword [eax + 8]
add ebx, ecx
cmp edx, ebx
jae 0x406444
mov eax, dword [eax + 0x14]
sub eax, ecx
add eax, edx
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
add eax, 0x28
mov dword [ebp - 0x1c], eax
inc edi
jmp 0x406408
or eax, 0xffffffff
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x406530
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
push esi
mov esi, ecx
push eax
mov dword [esp + 8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x406571
cmp dword [esp + 8], 5
jb 0x406571
mov ecx, esi
call fcn.004066a0
test eax, eax
jne 0x406571
mov dword [esi + 4], 1
pop esi
add esp, 0x94
ret
mov dword [esi + 4], 0
xor eax, eax
pop esi
add esp, 0x94
ret

Function at 0x406600
Capabilities:
Enumerate processes

Disassembly:
sub esp, 0x128
push ebx
push esi
push 0
push 2
or ebx, 0xffffffff
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov esi, eax
cmp esi, 0xffffffff
jne 0x406628
pop esi
xor eax, eax
pop ebx
add esp, 0x128
ret 4
lea eax, [esp + 8]
push edi
push eax
push esi
mov dword [esp + 0x14], 0x128
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x40668a
lea ecx, [esp + 0x30]
push ecx
call fcn.0040e5fb
mov edi, dword [esp + 0x13c]
push edi
push eax
call fcn.0040ea20
add esp, 0xc
test eax, eax
je 0x406686
lea edx, [esp + 0xc]
push edx
push esi
call sub.KERNEL32.dll_Process32Next
test eax, eax
je 0x40668a
lea eax, [esp + 0x30]
push eax
call fcn.0040e5fb
push edi
push eax
call fcn.0040ea20
add esp, 0xc
test eax, eax
jne 0x40665f
mov ebx, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x128
ret 4
Function at 0x406840
Capabilities:
Get common file path

Disassembly:
sub esp, 0x17c
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov ebx, ecx
mov dword [esp + 0x10], ebp
call fcn.004066e0
lea eax, [esp + 0x88]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str._repair_system
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x88]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x40]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetControl
lea edi, [esp + 0x44]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov ecx, 8
mov esi, str.360safebootControlSet001Control
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
movsw word es:[edi], word [esi]
call fcn.00406750
test eax, eax
je 0x4068dd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x17c
ret 4
call fcn.004066e0
lea ecx, [esp + 0x88]
push ecx
push str.360safeboot
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
lea edx, [esp + 0x64]
mov ecx, ebx
push edx
call fcn.00406750
test eax, eax
je 0x406912
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x190]
test eax, eax
je 0x406966
mov eax, dword [esp + 0x10]
test eax, eax
je 0x406966
mov ecx, 0xa
mov esi, str.360safebootControlSet001ControlSafeboot
lea edi, [esp + 0x14]
lea eax, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push str.SYSTEMCurrentControlSetControl_safeboot
push eax
push 0x80000002
mov ecx, ebx
movsb byte es:[edi], byte [esi]
call fcn.00406b90
lea ecx, [esp + 0x14]
push str.SYSTEMControlSet001Control_safeboot
push ecx
push 0x80000002
mov ecx, ebx
call fcn.00406b90
mov ebp, eax
push str.360safeboot
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyA]
mov eax, dword [esp + 0x190]
test eax, eax
mov eax, ebp
jne 0x406987
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x17c
ret 4
Function at 0x4069a0
Capabilities:
Extract resource via kernel32 functions
Get common file path
Write file on windows

Disassembly:
sub esp, 0x144
push ebx
push ebp
mov ebp, ecx
push esi
mov ecx, dword [0x41e598]
push edi
mov dword [esp + 0x20], ecx
mov ecx, 8
mov esi, str.SYSTEMCurrentControlSetControl
lea edi, [esp + 0x2c]
mov eax, dword [str.360safeboot]
mov edx, dword [0x41e59c]
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x2c]
xor ebx, ebx
push eax
mov ecx, ebp
mov dword [esp + 0x28], edx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
movsb byte es:[edi], byte [esi]
call fcn.00406750
test eax, eax
je 0x406a03
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret 4
push str.SAFEREG
push 0xd3
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
cmp esi, ebx
jne 0x406a29
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, ebx
jne 0x406a44
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, ebx
mov dword [esp + 0x18], eax
jne 0x406a62
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x144
ret 4
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esp + 0x50]
mov ebx, eax
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edi, str.360safefix
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x50]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push eax
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x80
mov ecx, edx
push 2
push eax
and ecx, 3
push 2
lea eax, [esp + 0x64]
push 0x40000000
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406ae7
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x28]
push 0
push ecx
push ebx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call fcn.004066e0
lea eax, [esp + 0x50]
push eax
push str.360safeboot
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyA]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebp
call fcn.00406e60
test eax, eax
mov ebx, 1
jne 0x406b1a
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0x158]
test edi, edi
je 0x406b59
test ebx, ebx
je 0x406b59
push str.SYSTEMCurrentControlSetControl_safeboot
push str.360safeboot
push 0x80000002
mov ecx, ebp
call fcn.00406b90
push str.SYSTEMControlSet001Control_safeboot
push str.360safeboot
push 0x80000002
mov ecx, ebp
call fcn.00406b90
mov esi, eax
jmp 0x406b5d
mov esi, dword [esp + 0x14]
push str.360safeboot
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyA]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test edi, edi
mov eax, esi
jne 0x406b7b
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x144
ret 4
Function at 0x4079e0
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418150
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1010
call fcn.0040f430
mov al, byte [0x421ce8]
push ebx
push esi
push edi
mov byte [ebp - 0x1020], al
mov ecx, 0x3ff
xor eax, eax
lea edi, [ebp - 0x101f]
rep stosd dword es:[edi], eax
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x10], esp
xor ebx, ebx
push ecx
lea edx, [ebp - 0x18]
push ebx
stosw word es:[edi], ax
push edx
push str.E2A91EC5_8DF7_4d9c_9723_509CBC1015C9
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
stosb byte es:[edi], al
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x18], 4
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
je 0x407b5a
lea eax, [ebp - 0x1c]
push 4
push eax
push 4
push str.E2A91EC5_8DF7_4d9c_9723_509CBC1015C9
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x14], ebx
push ecx
push 0xf003f
push ebx
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x407ab1
mov eax, dword [ebp - 0x14]
cmp eax, ebx
je 0x407ab1
push eax
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x1020]
push 0x1000
push eax
mov dword [ebp - 4], ebx
call fcn.00407880
add esp, 8
call fcn.004076d0
cmp eax, ebx
je 0x407afe
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1020]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
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.00407710
cmp eax, ebx
je 0x407b3e
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1020]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x407b3e
push str.E2A91EC5_8DF7_4d9c_9723_509CBC1015C9
push str.SOFTWAREMicrosoftWindowsCurrentVersion
push 0x80000002
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.SHLWAPI.dll_SHDeleteValueA]
cmp byte [ebp - 0x1020], bl
jne 0x407b8a
mov edi, str.Mid2Failed
or ecx, 0xffffffff
xor eax, eax
lea edx, [ebp - 0x1020]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
lea eax, [ebp - 0x1020]
push edx
push eax
call fcn.00407930
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407d90
Capabilities:
Delete file

Disassembly:
sub esp, 0x24
lea eax, [esp]
push esi
mov esi, dword [esp + 0x2c]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x407dd2
cmp dword [esp + 0x24], 0x13
jne 0x407dd2
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x407dd2
mov eax, dword [esp + 0x30]
test eax, eax
je 0x407dc8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, 1
pop esi
add esp, 0x24
ret
xor eax, eax
pop esi
add esp, 0x24
ret

Function at 0x407e10
Capabilities:
Check if file exists
Get disk information
Get file attributes

Disassembly:
sub esp, 0x134
push ebx
push ebp
push esi
xor esi, esi
push edi
mov byte [esp + 0x10], 0x43
mov byte [esp + 0x11], 0x3a
mov byte [esp + 0x12], 0x5c
mov byte [esp + 0x13], 0
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
test eax, eax
mov dword [esp + 0x14], eax
je 0x407f4b
mov ebx, dword [esp + 0x14c]
mov edi, dword [esp + 0x148]
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x407f33
lea eax, [esp + 0x10]
push eax
call fcn.00407de0
add esp, 4
test eax, eax
je 0x407f2f
lea ecx, [esp + 0x10]
lea edx, [esp + 0x40]
push ecx
push str._s_autorun.inf
push 0x104
push edx
call fcn.00401200
add esp, 0x10
lea eax, [esp + 0x1c]
lea ecx, [esp + 0x40]
push eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExA]
test eax, eax
je 0x407f2f
test byte [esp + 0x1c], 0x10
jne 0x407f2f
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x407f2f
test edi, edi
je 0x407ece
push ebx
lea edx, [esp + 0x44]
push 1
push edx
call edi
test eax, eax
je 0x407f4b
mov esi, 0x41e7f0
mov eax, dword [esi]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x41c0b0
lea edx, [esp + 0x4c]
push 0x104
push edx
call fcn.00401200
add esp, 0x14
lea eax, [esp + 0x40]
push eax
call ebp
cmp eax, 0xffffffff
je 0x407f20
test al, 0x10
jne 0x407f20
test al, 6
je 0x407f20
test edi, edi
mov dword [esp + 0x18], 1
je 0x407f20
push ebx
lea ecx, [esp + 0x44]
push 1
push ecx
call edi
test eax, eax
je 0x407f2b
add esi, 4
cmp esi, str.ntfsus.exe
jb 0x407ed3
mov esi, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov dl, byte [esp + 0x10]
shr eax, 1
inc dl
mov dword [esp + 0x14], eax
test eax, eax
mov byte [esp + 0x10], dl
jne 0x407e5a
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x134
ret
Function at 0x407fd0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
sub esp, 0x108
push ebx
push esi
push edi
push 0x41e8a4
push 0xcd
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x407ffb
pop edi
pop esi
pop ebx
add esp, 0x108
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x408012
pop edi
pop esi
pop ebx
add esp, 0x108
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
push 0
mov edi, eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, dword [esp + 0x118]
push eax
push str._s_antiRK.dll
lea ecx, [esp + 0x18]
push 0x104
push ecx
call fcn.00401200
add esp, 0x10
lea edx, [esp + 0x10]
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x408075
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x108
ret
lea eax, [esp + 0xc]
push 0
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
push esi
jne 0x40809c
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x108
ret
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
add esp, 0x108
ret

Function at 0x4082c0
Capabilities:
Shutdown system

Disassembly:
sub esp, 0x14
push esi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 4]
push ecx
push 0x28
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x408331
lea edx, [esp + 0xc]
push edx
push str.SeShutdownPrivilege
push esi
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x408326
mov ecx, dword [esp + 4]
push esi
push esi
lea eax, [esp + 0x10]
push esi
push eax
push esi
push ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x2c], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
je 0x408326
push esi
push 6
call dword [sym.imp.USER32.dll_ExitWindowsEx]
mov esi, eax
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
add esp, 0x14
ret

Function at 0x408390
Capabilities:
Check if file exists
Create service
Get file attributes

Disassembly:
push ecx
push ebx
push esi
push edi
mov edi, dword [esp + 0x14]
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0
push eax
push edi
call fcn.00408340
mov esi, eax
add esp, 8
test esi, esi
jne 0x4083ec
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4083fb
mov ebx, dword [esp + 0x18]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4083ec
push esi
push esi
push esi
mov ecx, dword [esp + 0x18]
push esi
push esi
push ebx
push 1
push 3
push 1
push 0xf01ff
push edi
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov esi, eax
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4083fb
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x408650
Capabilities:
Delete file
Extract resource via kernel32 functions
Set file attributes
Write file on windows

Disassembly:
push ecx
push esi
push edi
push 0x41e8a4
push 0xce
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x40866f
pop edi
pop esi
pop ecx
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x408680
pop edi
pop esi
pop ecx
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
test edi, edi
jne 0x408691
pop edi
pop esi
pop ecx
ret
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, dword [esp + 0x10]
push 0x80
push esi
mov dword [esp + 0x10], eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4086db
pop edi
xor eax, eax
pop esi
pop ecx
ret
mov ecx, dword [esp + 8]
lea eax, [esp + 8]
push 0
push eax
push ecx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
pop edi
pop esi
pop ecx
ret