joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401e00
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov dword [ebp - 0x10], ecx
xor eax, eax
jne 0x401e09
xor ecx, ecx
jne 0x401e09
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
shl eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0x10]
mov dword [ecx], 0
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 4]
push ecx
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x401e50
mov eax, dword [ebp - 0xc]
jmp 0x401ead
cmp dword [ebp - 4], 1
je 0x401e63
cmp dword [ebp - 4], 2
je 0x401e63
mov eax, 0xd
jmp 0x401ead
cmp dword [ebp + 0xc], 0
je 0x401ea1
cmp dword [ebp - 8], 0
je 0x401e99
mov eax, dword [ebp - 8]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x401e90
mov edx, dword [ebp - 8]
shr edx, 1
mov eax, dword [ebp + 0xc]
movzx ecx, word [eax + edx*2 - 2]
test ecx, ecx
je 0x401e97
mov eax, 0xd
jmp 0x401ead
jmp 0x401ea1
xor edx, edx
mov eax, dword [ebp + 0xc]
mov word [eax], dx
mov ecx, dword [ebp - 8]
shr ecx, 1
mov edx, dword [ebp + 0x10]
mov dword [edx], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc

Function at 0x401fb0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0x14], ecx
xor eax, eax
jne 0x401fb9
xor ecx, ecx
jne 0x401fb9
xor edx, edx
cmp dword [ebp + 0xc], 0
setne dl
mov dword [ebp - 0x10], edx
cmp dword [ebp - 0x10], 0
jne 0x401fda
mov eax, 0xd
jmp 0x402035
xor eax, eax
jne 0x401fc1
mov dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
lea edx, [ecx + eax*2]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 4]
lea edx, [ecx + eax*2]
mov dword [ebp - 4], edx
cmp dword [ebp - 0xc], 1
jne 0x401feb
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
push 7
push 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esp, ebp
pop ebp
ret 8
Function at 0x406650
Capabilities:
Create service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x21c], ecx
mov ecx, dword [ebp - 0x21c]
call fcn.00408620
test eax, eax
je 0x406682
mov eax, 1
jmp 0x406727
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x4066a1
xor eax, eax
jmp 0x406727
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push str.RPCSS
push 0
push 0
lea ecx, [ebp - 0x218]
push ecx
push 1
push 3
push 0x10
push 0xf01ff
mov edx, dword [ebp - 0x21c]
add edx, 0x230
push edx
mov eax, dword [ebp - 0x21c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40670e
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x406727
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret

Function at 0x406740
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
mov dword [ebp - 0x2c], ecx
mov ecx, dword [ebp - 0x2c]
call fcn.00408620
test eax, eax
jne 0x40675f
mov eax, 1
jmp 0x4067ea
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40677b
xor eax, eax
jmp 0x4067ea
push 0x10020
mov eax, dword [ebp - 0x2c]
add eax, 0x230
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4067aa
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x4067ea
lea eax, [ebp - 0x28]
push eax
push 1
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_ControlService]
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp dword [ebp - 8], 0
je 0x4067e8
mov eax, 1
jmp 0x4067ea
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x4073f8
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40e018]
jne 0x407402
repz ret
jmp fcn.00407982
Function at 0x407dc0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x430], ax
push 0x208
push 0
lea ecx, [ebp - 0x42e]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
mov word [ebp - 0x218], dx
push 0x208
push 0
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x438], 0
push 0x105
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x438]
push edx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x434]
push ecx
push 0x105
lea edx, [ebp - 0x430]
push edx
push 0x40a8d8
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x407e86
push 0xa
push 0x104
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x434]
push ecx
call dword [sym.imp.MSVCR90.dll__itow_s]
add esp, 0x10
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x10
jge 0x407ea8
push str.thsnYaViMRAeBoda
push 0x104
mov eax, dword [ebp + 8]
push eax
call fcn.004062f0
cmp dword [ebp + 0xc], 0
je 0x407ec0
mov ecx, dword [ebp + 0xc]
push ecx
push 0x104
mov edx, dword [ebp + 8]
push edx
call fcn.004062f0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret
Function at 0x4080f0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
mov word [ebp - 0x210], ax
push 0x206
push 0
lea ecx, [ebp - 0x20e]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x210]
push edx
call fcn.00408040
add esp, 4
lea eax, [ebp - 0x210]
push eax
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [ebp - 0x214], eax
cmp dword [ebp - 0x214], 0
jne 0x408193
push 0x40ae24
push 0x104
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004062a0
push str.Could_not_open_file_mapping_object.
push 0x104
mov edx, dword [ebp + 0xc]
add edx, 0x208
push edx
call fcn.004062a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x410], eax
xor eax, eax
jmp 0x40828e
push 0x1e78
push 0
push 0
push 4
mov edx, dword [ebp - 0x214]
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x218], eax
cmp dword [ebp - 0x218], 0
jne 0x408209
push 0x40aed8
push 0x104
mov eax, dword [ebp + 0xc]
push eax
call fcn.004062a0
push str.Could_not_map_view_of_file.
push 0x104
mov ecx, dword [ebp + 0xc]
add ecx, 0x208
push ecx
call fcn.004062a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x410], eax
mov eax, dword [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40828e
mov dword [ebp - 4], 0xe3c
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x218]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR90.dll_memcpy_s]
add esp, 0x10
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.ReadSharedMemory__:
push 0x104
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004062a0
lea edx, [ebp - 0x210]
push edx
push str.succeeded._mapping_obj_name:__s
push 0x104
mov eax, dword [ebp + 0xc]
add eax, 0x208
push eax
call dword [sym.imp.MSVCR90.dll_swprintf_s]
add esp, 0x10
mov ecx, dword [ebp + 0xc]
mov dword [ecx + 0x410], 0
mov eax, 1
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret
Function at 0x408550
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 8], eax
lea eax, [ebp + 0x10]
mov dword [ebp - 0x210], eax
mov ecx, dword [ebp - 0x210]
push ecx
mov edx, dword [ebp + 0xc]
push edx
push pe_nt_image_headers32
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.MSVCR90.dll_vswprintf_s]
add esp, 0x10
mov dword [ebp - 0x210], 0
lea ecx, [ebp - 0x208]
mov dword [ebp - 0x20c], ecx
mov edx, dword [ebp + 8]
cmp dword [edx + 0x454], 0
je 0x4085f3
mov eax, dword [ebp + 8]
add eax, 0x230
push eax
push 0
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4085f1
push 0
lea ecx, [ebp - 0x20c]
push ecx
push 0
push 1
push 0
push 0
push 0
push 4
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x408603
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.MSVCR90.dll__putws]
add esp, 4
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret

Function at 0x409360
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0
jne 0x409380
xor eax, eax
jmp 0x409417
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x409415
mov dword [ebp - 0x258], 0
push 0x24c
push 0
lea ecx, [ebp - 0x254]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x409415
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0xc], 0xffffffff
je 0x4093ee
mov edx, dword [ebp - 0x238]
cmp edx, dword [ebp + 0xc]
je 0x4093ee
xor eax, eax
jmp 0x409417
mov eax, dword [ebp + 8]
push eax
call fcn.00408df0
add esp, 4
test eax, eax
je 0x409415
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40940e
mov eax, dword [ebp - 0x238]
jmp 0x409417
mov eax, 1
jmp 0x409417
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret
Function at 0x409430
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x450
mov eax, dword [0x40e018]
xor eax, ebp
mov dword [ebp - 0x40], eax
xor eax, eax
mov word [ebp - 0x248], ax
push 0x206
push 0
lea ecx, [ebp - 0x246]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
mov word [ebp - 0x450], dx
push 0x206
push 0
lea eax, [ebp - 0x44e]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.MSVCR90.dll_wcslen]
add esp, 4
test eax, eax
jbe 0x4094bf
mov edx, dword [ebp + 0xc]
push edx
push 0x104
lea eax, [ebp - 0x450]
push eax
call fcn.004062a0
push 0x40b404
push 0x104
lea ecx, [ebp - 0x450]
push ecx
call fcn.004062f0
jmp 0x409525
lea edx, [ebp - 0x450]
push edx
push 0
push 0
push 0x2b
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jl 0x4094f0
push 0x40b408
push 0x104
lea eax, [ebp - 0x450]
push eax
call fcn.004062f0
jmp 0x409525
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40b428
push str.Status_SHGetFolderPath
call fcn.00407ed0
add esp, 0xc
push 0x352
push 0x40b468
push 0x40b478
call fcn.00407ed0
add esp, 0xc
jmp 0x409629
lea ecx, [ebp - 0x450]
push ecx
push 0x104
lea edx, [ebp - 0x248]
push edx
call fcn.004062a0
push str.AdobeARMHelper.exe
push 0x104
lea eax, [ebp - 0x248]
push eax
call fcn.004062f0
push 0xffffffffffffffff
lea ecx, [ebp - 0x248]
push ecx
call fcn.00409360
add esp, 8
test eax, eax
jne 0x40959a
push 0
lea edx, [ebp - 0x248]
push edx
push str.Status_file_validation_failed
call fcn.00407ed0
add esp, 0xc
push 0x352
push 0x40b50c
push 0x40b51c
call fcn.00407ed0
add esp, 0xc
jmp 0x409629
mov dword [ebp - 0x3c], 0
push 0x38
push 0
lea eax, [ebp - 0x38]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [ebp - 0x3c], 0x3c
mov dword [ebp - 0x38], 0x540
mov dword [ebp - 0x20], 5
mov ecx, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
lea edx, [ebp - 0x248]
mov dword [ebp - 0x2c], edx
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x4095f9
push 0
push str.succeeded
push 0x40b560
call fcn.00407ed0
add esp, 0xc
jmp 0x409629
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40b58c
push str.Status_ShellExecuteEx
call fcn.00407ed0
add esp, 0xc
push 0x352
push str.failed
push str.Status_Service_workflow
call fcn.00407ed0
add esp, 0xc
mov ecx, dword [ebp - 0x40]
xor ecx, ebp
call fcn.004073f8
mov esp, ebp
pop ebp
ret
Function at 0x403116
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94
push ebx
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 8], esi
test edi, edi
jne 0x403136
mov dword [ebp - 8], 0x8000
and dword [ebp - 4], 0
mov dword [ebp - 0xc], edi
test edi, edi
jne 0x403148
mov dword [ebp - 0xc], 0x78f6d8
mov eax, dword [ebp + 8]
test eax, eax
jl 0x40315d
mov ecx, dword [0x7a8a98]
add ecx, eax
push ecx
call fcn.00403324
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.0040330e
test eax, eax
je 0x4032fc
test byte [ebp + 0x17], 0x80
je 0x4032a7
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebx
and dword [0x40ce38], 0
and dword [ebp + 0x14], 0x7fffffff
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov byte [0x40ce20], 0xb
mov dword [ebp + 8], eax
jle 0x403304
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x4031b3
mov esi, dword [ebp + 0x14]
mov edi, 0x78b6d8
push esi
push edi
call fcn.0040330e
test eax, eax
je 0x4032fc
sub dword [ebp + 0x14], esi
mov dword [0x40ce10], edi
mov dword [0x40ce14], esi
mov edi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push 0x40ce10
mov dword [0x40ce18], edi
mov dword [0x40ce1c], eax
call fcn.004067d2
test eax, eax
mov dword [ebp - 0x14], eax
jl 0x40329f
mov esi, dword [0x40ce18]
sub esi, edi
call ebx
test byte [0x7a8af4], 1
mov edi, eax
je 0x40325a
sub eax, dword [ebp - 0x10]
cmp eax, 0xc8
ja 0x403221
cmp dword [ebp + 0x14], 0
jne 0x40325a
mov eax, dword [ebp + 8]
push dword [ebp + 8]
sub eax, dword [ebp + 0x14]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
push eax
lea eax, [ebp - 0x94]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x94]
push eax
push 0
call fcn.004052ff
mov dword [ebp - 0x10], edi
test esi, esi
je 0x403293
cmp dword [ebp + 0x10], 0
jne 0x403279
push esi
push dword [ebp - 0xc]
push dword [ebp + 0xc]
call fcn.00405e3f
test eax, eax
je 0x4032a3
add dword [ebp - 4], esi
jmp 0x403287
mov eax, dword [0x40ce18]
add dword [ebp - 4], esi
sub dword [ebp - 8], esi
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x14], 4
jne 0x4031d6
jmp 0x403304
cmp dword [ebp + 0x14], 0
jg 0x4031a6
jmp 0x403304
push 0xfffffffffffffffc
jmp 0x4032fe
push 0xfffffffffffffffe
jmp 0x4032fe
test edi, edi
jne 0x4032e9
cmp dword [ebp + 0x14], edi
jle 0x403304
mov ebx, dword [ebp - 8]
cmp dword [ebp + 0x14], ebx
mov esi, dword [ebp + 0x14]
jl 0x4032bd
mov esi, ebx
mov edi, 0x78b6d8
push esi
push edi
call fcn.0040330e
test eax, eax
je 0x4032fc
push esi
push edi
push dword [ebp + 0xc]
call fcn.00405e3f
test eax, eax
je 0x4032a3
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x4032b3
jmp 0x403304
cmp dword [ebp + 0x14], esi
jge 0x4032f1
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.0040330e
test eax, eax
jne 0x403301
push 0xfffffffffffffffd
pop eax
jmp 0x403307
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4057ce
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, 0x4083f0
and byte [ebp - 0x1f], 0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push esi
push eax
mov byte [ebp - 0x20], 1
push dword [ebp + 8]
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x4083e0
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40581f
xor eax, eax
jmp 0x405846
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405846
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
jne 0x40581b
call esi
pop esi
leave
ret 4

Function at 0x405880
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x7a4f28], 0x44
push eax
xor eax, eax
push 0x7a4f28
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4058bf
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x4058c3
Capabilities:
Create process on windows

Disassembly:
mov eax, dword [esp + 4]
push eax
and dword [eax + 0x24], 0
mov dword [eax], 0x3c
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
ret 4

Function at 0x405961
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405d68
mov edi, eax
cmp edi, 0xffffffff
je 0x4059a2
test byte [esp + 0x10], 1
push esi
je 0x405984
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40598a
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x405993
xor eax, eax
inc eax
jmp 0x4059a4
test byte [esp + 0x10], 4
jne 0x4059a2
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4059a9
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405c74
test bl, 8
mov dword [ebp - 8], eax
je 0x4059e8
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x7a8ac8], eax
jmp 0x405b65
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x405a02
test eax, eax
je 0x405b13
test bl, 2
je 0x405b13
mov esi, 0x7a3f28
push edi
push esi
call fcn.00406297
cmp dword [ebp + 8], 0
je 0x405a21
push str..
push esi
call sub.KERNEL32.dll_lstrcatW
jmp 0x405a27
push edi
call fcn.00405bb8
cmp word [edi], 0
jne 0x405a37
cmp word [0x7a3f28], 0x5c
jne 0x405a42
push 0x40a014
push edi
call sub.KERNEL32.dll_lstrcatW
push edi
call sub.KERNEL32.dll_lstrlenW
lea ebx, [edi + eax*2]
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405b08
cmp word [ebp - 0x22c], 0x2e
jne 0x405a8c
cmp word [ebp - 0x22a], 0
je 0x405aeb
cmp word [ebp - 0x22a], 0x2e
jne 0x405a8c
cmp word [ebp - 0x228], 0
je 0x405aeb
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00406297
test byte [ebp - 0x258], 0x10
je 0x405ab7
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405aeb
push dword [ebp + 0xc]
push edi
call fcn.004059a9
jmp 0x405aeb
push dword [ebp - 4]
push edi
call fcn.00405961
test eax, eax
jne 0x405ae3
cmp dword [ebp - 4], eax
je 0x405adb
push edi
push 0xfffffffffffffff1
call fcn.004052ff
push 0
push edi
call fcn.0040605d
jmp 0x405aeb
inc dword [0x7a8ac8]
jmp 0x405aeb
push edi
push 0xfffffffffffffff2
call fcn.004052ff
lea eax, [ebp - 0x258]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x405a64
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x405b13
and word [ebx - 2], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x405b65
cmp dword [ebp - 8], esi
jne 0x405b27
inc dword [0x7a8ac8]
jmp 0x405b65
push edi
call fcn.004065da
test eax, eax
je 0x405b65
push edi
call fcn.00405b6c
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.00405961
test eax, eax
jne 0x405b5d
cmp dword [ebp - 4], esi
je 0x405b1f
push edi
push 0xfffffffffffffff1
call fcn.004052ff
push esi
push edi
call fcn.0040605d
jmp 0x405b65
push edi
push 0xffffffffffffffe5
call fcn.004052ff
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405c74
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x7a4728
push esi
call fcn.00406297
push esi
call fcn.00405c17
mov edi, eax
test edi, edi
jne 0x405c95
xor eax, eax
jmp 0x405ced
push edi
call fcn.0040652b
test byte [0x7a8a3c], 0x80
je 0x405cb2
mov ax, word [edi]
test ax, ax
je 0x405c91
cmp ax, 0x5c
je 0x405c91
sub edi, esi
sar edi, 1
jmp 0x405ccc
call fcn.004065da
test eax, eax
je 0x405cc6
test byte [eax], 0x10
je 0x405c91
push esi
call fcn.00405bb8
push esi
call sub.KERNEL32.dll_lstrlenW
cmp eax, edi
push esi
jg 0x405cb8
call fcn.00405b6c
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405d68
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x405d87
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x405d8d
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc

Function at 0x405dbc
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40a558]
dec edi
mov dword [ebp - 8], eax
mov eax, dword [0x40a55c]
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp - 8]
push 0
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x405e0c
test edi, edi
jne 0x405dc9
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x405e06