joyce8/EMBER2024-capa huggingface dataset:
Function at 0x941e80
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x3ab8
call fcn.0094b290
mov eax, dword [0x95003c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
movzx ecx, cx
mov dword [ebp - 0x3aa0], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x3a9c], ecx
mov dword [ebp - 0x3a98], edx
mov dword [ebp - 0x3a94], eax
mov edi, edi
mov ecx, 0x3a34
cmp ebx, 0x3a34
ja 0x941ecf
mov ecx, ebx
sub ebx, ecx
mov esi, 0x1a2c
xor edi, edi
mov dword [ebp - 0x3a90], ecx
mov dword [ebp - 0x3ab0], ebx
mov dword [ebp - 0x3ab4], ecx
mov dword [ebp - 0x3aa8], esi
mov eax, 0x4c5b
test ecx, ecx
jle 0x941faf
mov ecx, dword [ebp - 0x3aa0]
lea edx, [ebp - 0x3a8c]
sub ecx, edx
mov dword [ebp - 0x3aac], ecx
mov edx, esi
shr edx, 8
mov dword [ebp - 0x3aa4], edx
mov ebx, eax
shr ebx, 0x18
mov edx, eax
shr edx, 0x10
and bl, dl
mov edx, esi
mov ecx, eax
shr ecx, 8
and bl, cl
mov dword [ebp - 0x3ab8], ecx
mov ecx, esi
mov esi, dword [ebp - 0x3aac]
shr ecx, 0x18
shr edx, 0x10
and cl, dl
mov dl, byte [ebp - 0x3aa4]
xor bl, cl
mov ecx, dword [ebp - 0x3aa8]
and dl, cl
xor bl, dl
lea edx, [ebp + edi - 0x3a8c]
xor bl, byte [esi + edx]
lea esi, [eax*4]
xor esi, eax
add esi, esi
xor esi, eax
xor bl, al
and esi, 0xfffffff0
shl eax, 4
xor esi, eax
shl ecx, 0x18
or ecx, dword [ebp - 0x3ab8]
shl esi, 0x14
or esi, dword [ebp - 0x3aa4]
inc edi
mov byte [edx], bl
mov dword [ebp - 0x3aa8], esi
mov eax, ecx
cmp edi, dword [ebp - 0x3ab4]
jl 0x941f11
mov ecx, dword [ebp - 0x3a90]
mov ebx, dword [ebp - 0x3ab0]
add dword [ebp - 0x3aa0], ecx
add ecx, 0x10
movzx esi, cx
lea edi, [ebp - 0x3a9c]
test si, si
je 0x942007
mov ecx, dword [ebp + 8]
push 0
movzx eax, si
push eax
push edi
push ecx
call dword [0x94c1b8]
test eax, eax
js 0x941fe1
add edi, eax
sub esi, eax
jmp 0x942002
cmp eax, 0xffffffff
jne 0x942002
call dword [0x94c1a4]
cmp eax, 0x2746
je 0x942020
cmp eax, 0x2744
je 0x942020
push 0xa
call dword [0x94c07c]
test si, si
jne 0x941fc6
test ebx, ebx
jne 0x941ec0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00943734
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00943734
mov esp, ebp
pop ebp
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x41a820]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x41a822], bx
je 0x401027
call eax
mov dword [0x41a820], eax
push eax
call fcn.00402482
push eax
call fcn.004094eb
pop ecx
jmp 0x4010a4
push 0x27
call fcn.00402482
mov esi, dword [ebp + 8]
push dword [esi + 0xc]
mov edi, dword [sym.imp.USER32.dll_wsprintfW]
push dword [esi]
push eax
lea eax, [ebp - 0x904]
push eax
call edi
add esp, 0x14
cmp dword [esi + 0x10], ebx
mov dword [ebp - 4], ebx
jbe 0x401098
lea ebx, [esi + 0x14]
push dword [ebx]
lea eax, [ebp - 0x104]
push str._t0x_p_n
push eax
call edi
add esp, 0xc
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x904]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
add ebx, 4
cmp eax, dword [esi + 0x10]
jb 0x401063
lea eax, [ebp - 0x904]
push eax
call fcn.004094eb
pop ecx
call fcn.004048f3
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x401893
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
lea ecx, [esi + 0xc]
call fcn.0040e0c0
push dword [ebp + 0xc]
lea edi, [esi + 0x10]
mov ecx, edi
call fcn.00401403
push 0x5c
mov ecx, edi
call fcn.004017a8
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40133c
push edi
push edi
mov dword [0x41a824], esi
mov dword [0x41a82c], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp dword [0x41a884], 2
mov dword [0x41a828], eax
je 0x4018f0
call fcn.00408c73
push 0xffffffffffffffff
push dword [0x41a828]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41a82c]
cmp eax, edi
mov dword [0x41a918], edi
je 0x40193f
cmp eax, 1
je 0x401933
cmp eax, 2
je 0x40192f
cmp eax, 3
je 0x40192b
cmp eax, 0x67
jle 0x401926
cmp eax, 0x6b
jle 0x4019a3
push eax
push 0x14
jmp 0x401976
push 0x12
jmp 0x401935
push 0x13
jmp 0x401935
push 0x11
push edi
call fcn.004095cf
pop ecx
pop ecx
jmp 0x4019a3
cmp dword [0x41a920], edi
jne 0x4019a3
lea eax, [ebp + 8]
push eax
push dword [0x41a828]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x401966
cmp ecx, edi
jne 0x401966
xor eax, eax
jmp 0x4019a8
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x401979
push ecx
push 0x21
push edi
jmp 0x40199b
and ecx, 0xffff
cmp ecx, 0xe
jne 0x40198d
cmp dword [0x41a888], 0xffffffff
je 0x4019a3
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.004095cf
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401e7e
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push esi
push 0
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x401ebf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401ea9
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
ret
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401ebf
test al, 0x10
jne 0x401ebf
push esi
jmp 0x401e9f
xor eax, eax
inc eax
pop esi
ret

Function at 0x4020c4
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
mov ebx, eax
movzx eax, word [0x41a840]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x402108
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x40212e
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x402119
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40212e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x4021a8
cmp dword [0x41a850], 0
jne 0x4021a6
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x41a850], 1
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call edi
push 0
mov dword [ebp - 4], eax
movzx eax, word [0x41a840]
push 0x409
push 0
push eax
lea eax, [ebp - 0x44]
push str._04X_c_04X_c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
cmp dword [ebp - 4], 0
jne 0x40219b
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x4021a6
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call dword [ebp - 4]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402482
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
push ebx
push esi
xor ebx, ebx
xor esi, esi
cmp dword [0x41a090], ebx
je 0x4024b5
mov eax, 0x41a090
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4024b5
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41a090]
cmp dword [eax], ebx
jne 0x40249e
shl esi, 4
cmp dword [esi + 0x41a090], ebx
jne 0x4024ca
mov eax, 0x41657c
jmp 0x40263c
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
push dword [ebp + 8]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x64]
push str.SfxString_d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push ebx
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x64]
push eax
call ebx
mov dword [ebp - 4], eax
call edi
test eax, eax
jne 0x40257a
mov eax, dword [ebp - 4]
xor ecx, ecx
push 2
add eax, 2
pop edx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
pop ecx
mov ecx, dword [ebp - 4]
inc ecx
push ecx
push eax
mov dword [ebp - 8], eax
lea eax, [ebp - 0x64]
push eax
call ebx
cmp eax, dword [ebp - 4]
ja 0x402571
call edi
test eax, eax
jne 0x402571
mov eax, dword [esi + 0x41a09c]
test eax, eax
je 0x402566
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x402563
push dword [esi + 0x41a09c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41a09c], edi
jmp 0x402579
push edi
jmp 0x402574
mov eax, dword [ebp - 8]
mov dword [esi + 0x41a09c], eax
jmp 0x40257a
push dword [ebp - 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x41a09c]
test eax, eax
jne 0x40263b
mov ebx, dword [esi + 0x41a094]
lea edi, [esi + 0x41a098]
cmp dword [edi], eax
je 0x4025b0
call fcn.0040242c
cmp eax, dword [0x417414]
jne 0x4025b0
mov ebx, dword [edi]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
cmp dword [0x41a064], 0xffffffff
pop ecx
mov dword [esi + 0x41a09c], eax
jne 0x40261b
and dword [0x41a064], 0
push 0x1f
lea eax, [ebp - 0xa4]
push eax
movzx eax, word [0x41a840]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x40261b
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41a064], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41a09c]
push edi
push ebx
push 0
push dword [0x41a064]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41a09c]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402749
Capabilities:
Get token membership

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
lea eax, [ebp - 4]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x10]
push eax
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
mov byte [ebp - 0x10], bl
mov byte [ebp - 0xf], bl
mov byte [ebp - 0xe], bl
mov byte [ebp - 0xd], bl
mov byte [ebp - 0xc], bl
mov byte [ebp - 0xb], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4027a6
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4029ca
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x4029da
xor eax, eax
leave
ret
test byte [0x41a888], 2
mov dword [ebp - 0x40], 0x40
jne 0x402a2f
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x402a2f
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402a2f
jb 0x402a0b
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402a2f
push 0x2b
call fcn.00402482
push eax
call fcn.00409562
cmp eax, 1
pop ecx
pop ecx
je 0x402a28
or dword [0x41a888], 0xffffffff
jmp 0x4029d6
or dword [0x41a888], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402e57
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.004014eb
cmp dword [ebp - 4], 1
jg 0x402e75
push 1
lea ecx, [ebp - 0xc]
call fcn.004011b7
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push edi
mov edi, dword [ebp + 8]
mov eax, dword [edi]
push 1
push dword [ebp - 0xc]
push eax
call esi
test eax, eax
jne 0x402e99
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402ed0
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.00402a90
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00401184
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.0040143c
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x4031cc
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00402a57
push 0x416680
lea ecx, [ebp - 0xc]
call fcn.00402aa8
mov edi, dword [ebp - 0xc]
lea eax, [ebp - 0x25c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4032a8
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00401403
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.004017a8
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.00402aa8
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x403277
push 0x41667c
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40328b
push 0x416674
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x40328b
push edi
call fcn.004031cc
pop ecx
jmp 0x403287
push 0
push edi
call esi
test eax, eax
je 0x4032cb
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4032cb
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x403212
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x4032cb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4032cb
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x4032d3
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

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

Disassembly:
cmp dword [0x41a92c], 0
je 0x4032e6
xor eax, eax
inc eax
ret
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4032fc
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x40331a
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x403316
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.004031cc
pop ecx
pop esi
ret

Function at 0x4033d0
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.004014eb
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x40340e
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.00402a90
push eax
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [edi]
and word [eax + esi*2], 0
mov dword [edi + 4], esi
mov eax, edi
pop edi
pop esi
ret
Function at 0x403563
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push 1
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call edi
mov esi, dword [ebp + 8]
mov ecx, esi
mov ebx, eax
call fcn.004014eb
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.00402a90
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.00402a90
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
push esi
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403704
xor eax, eax
jmp 0x40375d
test al, 0x10
je 0x403715
push 0x10
call dword [sym.imp.KERNEL32.dll_SetLastError]
or eax, 0xffffffff
jmp 0x40375d
mov eax, dword [0x41a88c]
test eax, eax
jne 0x403727
push esi
call fcn.004036ba
pop ecx
jmp 0x40375d
cmp eax, 2
jne 0x40375a
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40371e
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [ebp + 0xc]
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_CompareFileTime]
test eax, eax
jl 0x40371e
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x403a51
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push edi
lea ecx, [ebp - 0x18]
mov ebx, eax
mov dword [ebp - 4], eax
call fcn.00402a57
xor esi, esi
cmp dword [ebp - 0x10], esi
jg 0x403a82
push esi
lea ecx, [ebp - 0x18]
call fcn.004011b7
movzx eax, word [edi + ebx*2 - 2]
cmp ax, 0x5c
mov edi, dword [ebp - 0x18]
je 0x403a96
cmp ax, 0x2f
jne 0x403a9f
mov word [edi + ebx*2 - 2], si
dec ebx
mov dword [ebp - 4], ebx
mov esi, ebx
jmp 0x403ac5
movzx eax, word [edi + esi*2]
cmp ax, 0x2f
je 0x403ab8
cmp ax, 0x5c
je 0x403ab8
dec esi
test esi, esi
jg 0x403aa3
test esi, esi
je 0x403b74
and word [edi + esi*2], 0
push edi
call fcn.00401e7e
test eax, eax
pop ecx
je 0x403ab4
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x403afc
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.004036e7
test eax, eax
pop ecx
pop ecx
je 0x403afc
xor esi, esi
jmp 0x403b99
push edi
call fcn.00401e7e
test eax, eax
pop ecx
jne 0x403b16
push edi
push 0xc
push 1
call fcn.004095cf
add esp, 0xc
jmp 0x403af5
cmp esi, ebx
jge 0x403b68
mov eax, dword [ebp - 4]
sub eax, esi
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + esi*2]
push eax
lea ebx, [edi + esi*2]
push ebx
call sub.MSVCRT.dll_memcpy
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x403b4e
jmp 0x403b4d
movzx eax, word [edi + esi*2]
cmp ax, 0x5c
je 0x403b54
cmp ax, 0x2f
je 0x403b54
inc esi
cmp word [edi + esi*2], cx
jne 0x403b3d
push edi
mov word [edi + esi*2], cx
call fcn.00401e7e
test eax, eax
pop ecx
je 0x403b07
cmp esi, dword [ebp - 4]
jl 0x403b1a
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
inc eax
jmp 0x403bb9
cmp ebx, 2
mov ecx, dword [ebp + 8]
jne 0x403ba4
mov ax, word [ecx]
or ax, 0x20
cmp ax, 0x61
jb 0x403ba4
cmp ax, 0x7a
ja 0x403ba4
cmp word [ecx + 2], 0x3a
jne 0x403ba4
xor esi, esi
inc esi
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
jmp 0x403bb9
push ecx
push 0xc
push 1
call fcn.004095cf
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404518
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push ebx
push esi
push edi
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.004141e0
call fcn.0040242c
push 3
call fcn.00402482
push 0x28
mov dword [0x41a878], eax
call fcn.00402482
push 2
mov dword [0x41a874], eax
call fcn.00402482
push 5
mov dword [0x41a870], eax
call fcn.00402482
push 0x15
mov dword [0x41a86c], eax
call fcn.00402482
push 0x16
mov dword [0x41a868], eax
call fcn.00402482
push 0x17
mov dword [0x41a864], eax
call fcn.00402482
xor ebx, ebx
add esp, 0x1c
mov dword [0x41a860], eax
mov dword [0x41a858], ebx
mov dword [0x41a85c], ebx
xor edi, edi
push ebx
push edi
lea eax, [ebp - 0x268]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4045fc
push edi
lea eax, [ebp - 0x5c]
push str.SfxFolder_02d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
push 1
lea eax, [ebp - 0x268]
push eax
lea eax, [ebp - 0x5c]
push eax
call fcn.00403640
add esp, 0x18
xor esi, esi
cmp dword [esi + 0x41a394], edi
jne 0x4045f4
push ebx
lea eax, [ebp - 0x268]
push eax
push dword [esi + 0x41a398]
call fcn.00403640
add esp, 0xc
add esi, 8
cmp esi, 0x28
jb 0x4045d6
inc edi
cmp edi, 0x40
jl 0x40459b
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404a18
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
call fcn.004014eb
push 2
mov ecx, esi
call fcn.00402a90
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push eax
push 1
call edi
mov ecx, dword [esi]
and word [ecx], 0
and dword [esi + 4], 0
test eax, eax
jbe 0x404a6b
lea ebx, [eax + 1]
push ebx
mov ecx, esi
call fcn.00402a90
push eax
push ebx
call edi
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
pop ecx
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
and dword [ebp + 8], 0
lea ecx, [eax + 0xf]
mov dword [ebp - 4], ecx
lea ebx, [eax + eax]
push dword [ebp - 4]
mov ecx, esi
call fcn.00402a90
push dword [ebp + 8]
add eax, ebx
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov edi, dword [esi]
push edi
call fcn.00401184
and word [edi + eax*2], 0
add esp, 0x10
push dword [esi]
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404ac0
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xfff
jl 0x404a7b
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x404ac7
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41a3c4], esi
jle 0x404b1b
mov eax, dword [0x41a3c8]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0xc]
call fcn.004013d1
lea eax, [ebp - 0xc]
push eax
call fcn.0040463b
mov eax, dword [0x41a3c8]
mov eax, dword [eax + esi*4]
pop ecx
push dword [ebp - 0xc]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
inc esi
cmp esi, dword [0x41a3c4]
pop ecx
jl 0x404ad8
pop esi
leave
ret
Function at 0x40539c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
push edi
lea ecx, [ebp - 0xc]
call fcn.004014eb
lea ecx, [ebp - 0x18]
call fcn.004014eb
push 0x3c
pop esi
push esi
xor edi, edi
lea eax, [ebp - 0x54]
push edi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x10]
xor ebx, ebx
inc ebx
add esp, 0xc
test byte [ebp + 0xc], bl
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], 0x740
mov dword [ebp - 0x38], ebx
je 0x4053ed
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x50], 0x8740
test byte [ebp + 0xc], 2
je 0x4053fa
mov dword [ebp - 0x48], str.runas
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00404e89
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.00401403
cmp dword [ebp - 8], edi
jne 0x40542f
push dword [ebp - 0x18]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ecx
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40546f
test dword [ebp + 0xc], 0x10000
jne 0x40545d
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push esi
jmp 0x405421
xor ebx, ebx
jmp 0x405466