joyce8/EMBER2024-capa huggingface dataset:
Function at 0x418a2b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x482f90]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x418a6e
cmp word [esi], dx
jne 0x418a6e
or byte [edi + eax + 0x28], 4
jmp 0x418a73
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x418bc6
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x418ba6
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x418ab5
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x418aeb
cmp eax, edx
jae 0x418af7
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x418a8d
jmp 0x418bc6
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x418ba2
cmp dword [ebp - 0x14], 0
je 0x418ba2
mov eax, dword [ebx*4 + 0x482f90]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x418b7a
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x418b43
mov word [esi], cx
jmp 0x418b76
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x482f90]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x482f90]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x482f90]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x418bc6
pop ebx
cmp word [ebp - 4], bx
jne 0x418b8b
cmp esi, dword [ebp + 0xc]
jne 0x418b8b
mov word [esi], bx
jmp 0x418bc3
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041945f
add esp, 0x10
cmp word [ebp - 4], bx
je 0x418bc6
push 0xd
jmp 0x418bbf
mov ecx, dword [ebx*4 + 0x482f90]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x418bbd
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x418bc6
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x404ec7
Capabilities:
Encode data using base64

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, edx
mov ebx, ecx
test edi, edi
jle 0x404fdf
mov esi, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
cmp edi, 2
jle 0x404f47
sub edx, 4
js 0x404fdf
movzx eax, byte [ebx]
shr eax, 2
mov al, byte [eax + 0x439a20]
mov byte [esi], al
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
and ecx, 3
shr eax, 4
add ecx, ecx
mov al, byte [eax + ecx*8 + 0x439a20]
mov byte [esi + 1], al
movzx ecx, byte [ebx + 1]
movzx eax, byte [ebx + 2]
and ecx, 0xf
shr eax, 6
mov al, byte [eax + ecx*4 + 0x439a20]
mov byte [esi + 2], al
movzx eax, byte [ebx + 2]
add ebx, 3
and eax, 0x3f
mov al, byte [eax + 0x439a20]
mov byte [esi + 3], al
add esi, 4
sub edi, 3
jmp 0x404edf
sub edi, 1
je 0x404fa3
sub edi, 1
jne 0x404fd8
sub edx, 3
js 0x404fdf
movzx eax, byte [ebx]
shr eax, 2
mov al, byte [eax + 0x439a20]
mov byte [esi], al
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
and ecx, 3
shr eax, 4
add ecx, ecx
mov al, byte [eax + ecx*8 + 0x439a20]
mov byte [esi + 1], al
movzx eax, byte [ebx + 1]
and eax, 0xf
mov al, byte [eax*4 + 0x439a20]
mov byte [esi + 2], al
lea eax, [edx - 1]
test eax, eax
js 0x404fdf
mov byte [esi + 3], 0x3d
jmp 0x404fd5
sub edx, 2
js 0x404fdf
movzx eax, byte [ebx]
shr eax, 2
mov al, byte [eax + 0x439a20]
mov byte [esi], al
movzx eax, byte [ebx]
and eax, 3
shl eax, 4
mov al, byte [eax + 0x439a20]
mov byte [esi + 1], al
lea eax, [edx - 2]
test eax, eax
js 0x404fdf
mov word [esi + 2], 0x3d3d
add esi, 4
sub esi, dword [ebp + 8]
mov eax, esi
jmp 0x404fe1
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x419430
Capabilities:
Encode data using xor

Disassembly:
mov bh, 0x8a
int3
cli
jge 0x41936f
adc bl, byte [ecx + 0x658b196c]
mov dword [0xd519e387], eax
insb byte es:[edi], dx
sbb dword [ebx - 0x1c785c9b], ecx
sbb ebp, edx
push bp
out dx, al
iretd
xor eax, 0xeab153d7
xlatb
push ebx
mov cl, 0xea
bound eax, qword [eax]
movsb byte es:[edi], byte [esi]
popal
inc ebx
push cs
and ecx, dword [ebx - 0x462fc42a]
lds edi, [esi]
nop
mov bl, 0x68
add bl, byte [ebx]
pop es
lodsd eax, dword [esi]
std
stc
jno 0x41942f
salc
cli
loope 0x4193f0
mov ecx, 0x93246a82
mov esp, edx
mov dword [0xb6753cb], eax
lahf
jl 0x4193eb
test dword [edi - 0x6e], 0xb940e8e
pop edi
or byte [ebx - 0x34a63dc4], ch
mov ecx, 0xa123dd2b
les esi, [edi]
push es
movsb byte es:[edi], byte [esi]
inc edi
xor al, 0xb6
bound ebp, qword [eax + 7]
pop ebx
cmp cl, 0xa9
insb byte es:[edi], dx
ja 0x4194a5
in eax, 0x19
wait
test eax, 0x152fd140
fbld tbyte [ecx]
mov eax, dword [0xd461981]
sub byte [edx - 0x61], al
pop esi
push ecx
ret
ret 0x2a6a

Function at 0x42e006
Capabilities:
Encode data using xor

Disassembly:
call 0x42e00c
nop
pop eax
nop
nop
nop
nop
nop
add eax, 0x403ac5
nop
sub eax, 0x403a6b
mov ebx, dword [eax]
nop
nop
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
nop
nop
jl 0x42e030
nop
add eax, 0xc
nop
nop
nop
nop
cmp dword [eax], 0
nop
nop
jne 0x42e01e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp fcn.00401219
Function at 0x401018
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9e0
push ebx
push esi
lea eax, [ebp - 0x10]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
movzx eax, word [ebp - 4]
push eax
mov edi, dword [sym.imp.MSVCRT.dll__snprintf]
movzx eax, word [ebp - 6]
push eax
movzx eax, word [ebp - 8]
push eax
movzx eax, word [ebp - 0xa]
push eax
movzx eax, word [ebp - 0xe]
push eax
movzx eax, word [ebp - 0x10]
push eax
push str._04d_02d_02d_02d_02d_02d
lea eax, [ebp - 0x50]
push 0x40
push eax
call edi
add esp, 0x24
cmp dword [ebp + 0xc], 0
sete al
dec eax
and al, 0xfc
add eax, 0x49
cmp dword [ebp + 0x14], 0
mov byte [ebp + 0xf], al
jne 0x40108f
push 0x400
lea eax, [ebp - 0x5e0]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
jmp 0x4010aa
push dword [ebp + 0x14]
lea eax, [ebp - 0x5e0]
push dword [ebp + 0x10]
push 0x400
push eax
call dword [sym.imp.MSVCRT.dll__vsnprintf]
add esp, 0x10
cmp dword [0x406014], 0xffffffff
mov ebx, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x401147
lea eax, [ebp - 0x5e0]
push eax
push dword [0x406018]
push dword [ebp + 8]
call ebx
push eax
movsx eax, byte [ebp + 0xf]
push eax
lea eax, [ebp - 0x50]
push eax
push str._s_t_c_t_d_t_s_t_s_t_s_r_n
lea eax, [ebp - 0x9e0]
push 0x400
push eax
call edi
add esp, 0x24
push 0x3e8
push dword [0x406010]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 2
push 0
push 0
push dword [0x406014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp + 0x14]
push 0
push eax
lea eax, [ebp - 0x9e0]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x9e0]
push eax
push dword [0x406014]
call esi
push dword [0x406010]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
push 0
push 0x80
push 3
push 0
push 1
push 0x40000000
push str..mailslotAVITrace
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0x14], eax
je 0x4011f1
lea eax, [ebp - 0x5e0]
push eax
push dword [ebp + 8]
call ebx
push eax
movsx eax, byte [ebp + 0xf]
push dword [0x406018]
push eax
lea eax, [ebp - 0x50]
push eax
push str._s__c__s__4d___8s__s
lea eax, [ebp - 0x1e0]
push 0x190
push eax
call edi
and byte [ebp - 0x51], 0
inc dword [0x406020]
lea eax, [ebp - 0x1e0]
push eax
call sub.MSVCRT.dll_strlen
add esp, 0x28
inc eax
mov dword [0x40602c], eax
lea eax, [ebp + 0x10]
push 0
push eax
push 0x10
push 0x406020
push dword [ebp + 0x14]
call esi
lea eax, [ebp + 0x10]
push 0
push eax
lea eax, [ebp - 0x1e0]
push dword [0x40602c]
push eax
push dword [ebp + 0x14]
call esi
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4012d1
Capabilities:
Accept command line arguments
Create directory
Get common file path
Get hostname

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [ebp + 0xc]
push str.MCAFEE_FRAMEWORK_LOG_MUTEX
push 0
push 0
mov dword [0x406018], eax
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
cmp eax, 0xffffffff
mov dword [0x406010], eax
je 0x4013e5
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov ebx, dword [sym.imp.MSVCRT.dll__mbsstr]
mov esi, str._LOGDIR_
push esi
push eax
call ebx
pop ecx
mov dword [ebp + 0xc], eax
test eax, eax
pop ecx
je 0x401350
mov edi, 0x104
push edi
push esi
call sub.MSVCRT.dll_strlen
add eax, dword [ebp + 0xc]
pop ecx
mov esi, 0x406ffc
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push 0x4060cc
push esi
call ebx
pop ecx
test eax, eax
pop ecx
je 0x401384
and byte [eax], 0
jmp 0x401384
lea eax, [ebp - 0x118]
mov edi, 0x104
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x118]
push str.NAILogs
push eax
push 0x4060bc
mov esi, 0x406ffc
push edi
push esi
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea eax, [ebp - 4]
mov dword [ebp - 4], 0x10
push eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
lea eax, [ebp - 0x14]
push eax
push esi
push str._sFrmInst__s.log
lea eax, [ebp - 0x21c]
push edi
push eax
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
lea eax, [ebp - 0x21c]
push 0
push 0x80
push 4
push dword [ebp + 0x10]
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
pop edi
pop esi
mov dword [0x406014], eax
pop ebx
leave
ret

Function at 0x4013e7
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push 0x406ff8
push dword [ebp + 8]
call fcn.004011f6
pop ecx
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
lea eax, [ebp - 0x400]
push 0x400
push eax
call fcn.00401985
lea eax, [ebp - 0x400]
push eax
push str.START___s_
push dword [ebp + 8]
call fcn.004011f6
add esp, 0x18
leave
ret

Function at 0x401661
Capabilities:
Create directory

Disassembly:
push esi
xor esi, esi
push edi
push esi
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x40168d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40168d
cmp esi, 0xb7
je 0x4016bb
cmp esi, 5
je 0x4016bb
push dword [esp + 0xc]
mov edi, str.Common
push str.CreateDirectory___s_
push edi
call fcn.004011f6
add esp, 0xc
test esi, esi
je 0x4016bb
push 0x406ff8
push esi
push edi
call fcn.0040120e
add esp, 0xc
xor eax, eax
jmp 0x4016be
push 1
pop eax
pop edi
pop esi
ret
Function at 0x40173f
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push dword [ebp + 0xc]
mov esi, ecx
mov dword [esi + 0x10], eax
lea eax, [ebp - 0x444]
push 0x400
push eax
call fcn.00401985
lea eax, [ebp - 0x444]
mov ebx, str.Common
push eax
push dword [esi + 0x10]
push str.CreateProcess___s___s_
push ebx
call fcn.004011f6
xor edi, edi
push 0x44
lea eax, [ebp - 0x44]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0x28
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0x44
push esi
push eax
push edi
push edi
push edi
push edi
push edi
push edi
push dword [ebp + 0xc]
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4017cd
push 0x406ff8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
call fcn.0040120e
add esp, 0xc
xor eax, eax
jmp 0x4017d0
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x401822
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
lea eax, [ebp - 0x104]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
jne 0x401862
push str.GetTempPath
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Common
call fcn.0040120e
add esp, 0xc
xor eax, eax
pop edi
pop esi
leave
ret
lea eax, [ebp - 0x104]
push eax
call fcn.004016c1
test eax, eax
pop ecx
je 0x40185c
xor esi, esi
xor edi, edi
test esi, esi
jne 0x4018c5
push dword [ebp + 0xc]
lea eax, [ebp - 0x104]
push esi
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
je 0x401896
push 1
pop esi
inc edi
cmp edi, 0x19
jl 0x401877
test esi, esi
jne 0x4018c5
push dword [ebp + 8]
lea eax, [ebp - 0x104]
push eax
push str.getNewTempDirectory___GetTempFileName___s___s_
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Common
call fcn.0040120e
add esp, 0x14
jmp 0x40185c
push dword [ebp + 0xc]
call fcn.00401931
push dword [ebp + 0xc]
call fcn.00401661
pop ecx
pop ecx
jmp 0x40185e

Function at 0x401931
Capabilities:
Check if file exists
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push 0x80
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x40197f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 2
je 0x40197f
push esi
mov esi, str.Common
push str.Delete___s_
push esi
call fcn.004011f6
push 0x406ff8
push edi
push esi
call fcn.0040120e
add esp, 0x18
xor eax, eax
jmp 0x401982
push 1
pop eax
pop edi
pop esi
ret
Function at 0x401a44
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, str.NAIMServInst
xor edi, edi
push esi
push edi
mov dword [0x408434], eax
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceA]
push dword [0x408434]
mov ebx, eax
lea eax, [ebp - 0x108]
push esi
push str._s_error:__d
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [ebp - 0x108]
add esp, 0x10
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
cmp ebx, edi
mov dword [ebp - 4], eax
je 0x401ab6
lea eax, [ebp - 8]
push edi
push eax
push edi
push 2
push edi
push edi
push edi
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ReportEventA]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4023c2
Capabilities:
Compare security identifiers

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
lea eax, [ebp - 0xc]
xor ebx, ebx
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x12
lea eax, [ebp - 0x14]
push 1
push eax
mov dword [ebp - 0xc], ebx
mov byte [ebp - 0x14], bl
mov byte [ebp - 0x13], bl
mov byte [ebp - 0x12], bl
mov byte [ebp - 0x11], bl
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
jne 0x40241c
push str.AllocateAndInitializeSid
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Stub
call fcn.0040120e
add esp, 0xc
jmp 0x4024dc
lea eax, [ebp - 8]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x402451
push str.OpenProcessToken
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Stub
call fcn.0040120e
add esp, 0xc
jmp 0x4024d3
push esi
lea eax, [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push edi
push eax
push ebx
push ebx
push 1
push dword [ebp - 8]
mov dword [ebp - 4], ebx
call esi
push dword [ebp - 4]
call dword [sym.imp.MSVCRT.dll_malloc]
mov edi, eax
pop ecx
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push edi
push 1
push dword [ebp - 8]
call esi
test eax, eax
jne 0x4024a0
push str.GetTokenInformation
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Stub
call fcn.0040120e
jmp 0x4024bd
push dword [ebp - 0xc]
push dword [edi]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
mov ebx, eax
push ebx
push str.System_d
push str.Stub
call fcn.004011f6
add esp, 0xc
push edi
call dword [sym.imp.MSVCRT.dll_free]
pop ecx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, ebx
pop ebx
leave
ret
Function at 0x4014de
Capabilities:
Delete registry key
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x214
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, esi
lea eax, [ebp - 4]
push eax
and esi, 0x300
mov eax, esi
or eax, 9
push eax
push dword [ebp + 0xc]
and edi, 1
push dword [ebp + 8]
call fcn.004067f9
xor ebx, ebx
cmp eax, ebx
jne 0x4015c2
test byte [ebp + 0x10], 2
je 0x401540
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push ebx
push dword [ebp - 4]
mov dword [ebp - 8], ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
cmp eax, 0x103
jne 0x4015a7
push 0x105
lea eax, [ebp - 0x214]
push eax
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
jmp 0x40157c
test edi, edi
jne 0x4015a7
push dword [ebp + 0x10]
lea eax, [ebp - 0x214]
push eax
push dword [ebp - 4]
call fcn.004014de
test eax, eax
jne 0x401585
push 0x105
lea eax, [ebp - 0x214]
push eax
push edi
push dword [ebp - 4]
call ebx
test eax, eax
je 0x401555
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.00406d61
test eax, eax
jne 0x4015b7
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
jmp 0x4015c2
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, 0x3eb
jmp 0x4015c2
push 0
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x406356
Capabilities:
Create directory

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

Function at 0x4063f4
Capabilities:
Create process on windows

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

Function at 0x406437
Capabilities:
Create process on windows

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

Function at 0x406600
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 0x406620
and eax, 0xfffffffe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x406626
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
inc ecx
push 0
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 0x406655
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 [0x40a734]
mov dword [ebp - 8], eax
mov eax, dword [0x40a738]
dec edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x4066a5
test edi, edi
jne 0x406662
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x40669f
Function at 0x40685a
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push dword [ebp + 0xc]
mov dword [ebp - 4], 0x4008
push dword [ebp + 8]
call fcn.004067f9
test eax, eax
mov esi, dword [ebp + 0x14]
jne 0x4068ca
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0x18]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and word [esi + 0x4006], 0
test edi, edi
pop edi
jne 0x4068ca
cmp dword [ebp + 0xc], 1
je 0x4068ce
cmp dword [ebp + 0xc], 2
je 0x4068ce
and word [esi], 0
pop esi
leave
ret 0x14

Function at 0x406cf1
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
push esi
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x406d15
xor eax, eax
test eax, eax
je 0x406d28
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406d28
xor ecx, ecx
jmp 0x406d2b
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x4097d4]
push ecx
lea eax, [ebp + eax*2 - 0x23c]
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 8
push 0
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00406600
mov edi, eax
cmp edi, 0xffffffff
je 0x406ea5
test byte [esp + 0x10], 1
push esi
je 0x406e8e
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x406e96
xor eax, eax
inc eax
jmp 0x406ea7
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x406e85
test byte [esp + 0x10], 4
jne 0x406ea5
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8

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

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x4582e0
push esi
call fcn.0040698c
push esi
call fcn.00406529
mov edi, eax
test edi, edi
jne 0x406f6e
xor eax, eax
jmp 0x406fcc
push edi
call fcn.004069c9
test byte [0x473650], 0x80
je 0x406f8b
movzx eax, word [edi]
test ax, ax
je 0x406f6a
cmp ax, 0x5c
je 0x406f6a
sub edi, esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
sar edi, 1
jmp 0x406fad
push esi
call fcn.00406cca
test eax, eax
je 0x406fa7
test byte [eax], 0x10
je 0x406fd1
push esi
call fcn.00406edb
push esi
call ebx
cmp eax, edi
jg 0x406f98
push esi
call fcn.00406eac
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x406fcb