joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x41b900]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x401036
cmp word [0x41b902], bx
je 0x401027
call eax
mov dword [0x41b900], eax
push eax
call fcn.004024a4
push eax
call fcn.00409506
pop ecx
jmp 0x4010a4
push 0x27
call fcn.004024a4
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.00409506
pop ecx
call fcn.0040492a
push 0xa
call dword [sym.imp.KERNEL32.DLL_ExitProcess]

Function at 0x4018a7
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.004105fd
push dword [ebp + 0xc]
lea edi, [esi + 0x10]
mov ecx, edi
call fcn.00401466
push 0x5c
mov ecx, edi
call fcn.004017bc
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x401350
push edi
push edi
mov dword [0x41b904], esi
mov dword [0x41b90c], edi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
cmp dword [0x41b964], 2
mov dword [0x41b908], eax
je 0x401904
call fcn.00408c8e
push 0xffffffffffffffff
push dword [0x41b908]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
mov eax, dword [0x41b90c]
cmp eax, edi
mov dword [0x41b9f8], edi
je 0x401953
cmp eax, 1
je 0x401947
cmp eax, 2
je 0x401943
cmp eax, 3
je 0x40193f
cmp eax, 0x67
jle 0x40193a
cmp eax, 0x6b
jle 0x4019b7
push eax
push 0x14
jmp 0x40198a
push 0x12
jmp 0x401949
push 0x13
jmp 0x401949
push 0x11
push edi
call fcn.004095ea
pop ecx
pop ecx
jmp 0x4019b7
cmp dword [0x41ba00], edi
jne 0x4019b7
lea eax, [ebp + 8]
push eax
push dword [0x41b908]
call dword [sym.imp.KERNEL32.DLL_GetExitCodeThread]
test eax, eax
mov ecx, dword [ebp + 8]
je 0x40197a
cmp ecx, edi
jne 0x40197a
xor eax, eax
jmp 0x4019bc
mov eax, 0x80070000
mov edx, ecx
and edx, eax
cmp edx, eax
je 0x40198d
push ecx
push 0x21
push edi
jmp 0x4019af
and ecx, 0xffff
cmp ecx, 0xe
jne 0x4019a1
cmp dword [0x41b968], 0xffffffff
je 0x4019b7
push ecx
call dword [sym.imp.KERNEL32.DLL_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.004095ea
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401e92
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 0x401ed3
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401ebd
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 0x401ed3
test al, 0x10
jne 0x401ed3
push esi
jmp 0x401eb3
xor eax, eax
inc eax
pop esi
ret

Function at 0x4020e6
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 [0x41b920]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x40212a
push 0x409
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call esi
mov edi, eax
test edi, edi
je 0x402150
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x40213b
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 0x402150
push eax
call dword [sym.imp.KERNEL32.DLL_LockResource]
jmp 0x4021ca
cmp dword [0x41b930], 0
jne 0x4021c8
mov esi, dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
push str.SetProcessPreferredUILanguages
mov ebx, str.kernel32
push ebx
mov dword [0x41b930], 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 [0x41b920]
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 0x4021bd
push str.SetThreadPreferredUILanguages
push ebx
call esi
push eax
call edi
test eax, eax
mov dword [ebp - 4], eax
je 0x4021c8
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 0x4024a4
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 [0x41b0a0], ebx
je 0x4024d7
mov eax, 0x41b0a0
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4024d7
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41b0a0]
cmp dword [eax], ebx
jne 0x4024c0
shl esi, 4
cmp dword [esi + 0x41b0a0], ebx
jne 0x4024ec
mov eax, 0x417584
jmp 0x40265e
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 0x40259c
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 0x402593
call edi
test eax, eax
jne 0x402593
mov eax, dword [esi + 0x41b0ac]
test eax, eax
je 0x402588
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpiW]
test eax, eax
je 0x402585
push dword [esi + 0x41b0ac]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41b0ac], edi
jmp 0x40259b
push edi
jmp 0x402596
mov eax, dword [ebp - 8]
mov dword [esi + 0x41b0ac], eax
jmp 0x40259c
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 + 0x41b0ac]
test eax, eax
jne 0x40265d
mov ebx, dword [esi + 0x41b0a4]
lea edi, [esi + 0x41b0a8]
cmp dword [edi], eax
je 0x4025d2
call fcn.0040244e
cmp eax, dword [0x41841c]
jne 0x4025d2
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 [0x41b074], 0xffffffff
pop ecx
mov dword [esi + 0x41b0ac], eax
jne 0x40263d
and dword [0x41b074], 0
push 0x1f
lea eax, [ebp - 0xa4]
push eax
movzx eax, word [0x41b920]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.DLL_GetLocaleInfoW]
test eax, eax
jle 0x40263d
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41b074], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41b0ac]
push edi
push ebx
push 0
push dword [0x41b074]
call dword [sym.imp.KERNEL32.DLL_MultiByteToWideChar]
mov eax, dword [esi + 0x41b0ac]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40276b
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 0x4027c8
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 0x4029ec
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
jne 0x4029fc
xor eax, eax
leave
ret
test byte [0x41b968], 2
mov dword [ebp - 0x40], 0x40
jne 0x402a51
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.DLL_GlobalMemoryStatusEx]
test eax, eax
je 0x402a51
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp ecx, eax
ja 0x402a51
jb 0x402a2d
mov eax, dword [ebp - 0x30]
cmp eax, dword [ebp + 8]
jae 0x402a51
push 0x2b
call fcn.004024a4
push eax
call fcn.0040957d
cmp eax, 1
pop ecx
pop ecx
je 0x402a4a
or dword [0x41b968], 0xffffffff
jmp 0x4029f8
or dword [0x41b968], 2
xor eax, eax
inc eax
leave
ret

Function at 0x402e8e
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.00401558
cmp dword [ebp - 4], 1
jg 0x402eac
push 1
lea ecx, [ebp - 0xc]
call fcn.004011cb
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 0x402ed0
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x402f07
push ebx
mov ebx, dword [edi]
inc eax
push eax
push eax
lea ecx, [ebp - 0xc]
call fcn.00402ac7
push eax
push ebx
call esi
mov esi, dword [ebp - 0xc]
push esi
call fcn.00401198
and word [esi + eax*2], 0
pop ecx
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
mov ecx, edi
call fcn.0040149f
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x403203
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.00402a8e
push 0x417688
lea ecx, [ebp - 0xc]
call fcn.00402adf
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 0x4032df
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00401466
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.004017bc
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.00402adf
test byte [ebp - 0x25c], 0x10
mov edi, dword [ebp - 0xc]
je 0x4032ae
push 0x417684
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpW]
test eax, eax
je 0x4032c2
push 0x41767c
lea eax, [ebp - 0x230]
push eax
call dword [sym.imp.KERNEL32.DLL_lstrcmpW]
test eax, eax
je 0x4032c2
push edi
call fcn.00403203
pop ecx
jmp 0x4032be
push 0
push edi
call esi
test eax, eax
je 0x403302
push edi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
test eax, eax
je 0x403302
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.DLL_FindNextFileW]
test eax, eax
jne 0x403249
push ebx
call dword [sym.imp.KERNEL32.DLL_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x403302
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.DLL_RemoveDirectoryW]
test eax, eax
je 0x403302
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x40330a
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 0x403310
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
cmp dword [0x41ba0c], 0
je 0x40331d
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 0x403333
xor eax, eax
inc eax
pop esi
ret
test al, 0x10
jne 0x403351
push 0
push esi
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
test eax, eax
je 0x40334d
push esi
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
pop esi
ret
xor eax, eax
pop esi
ret
push esi
call fcn.00403203
pop ecx
pop esi
ret

Function at 0x403407
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.00401558
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x403445
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.00402ac7
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 0x40359a
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.00401558
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.00402ac7
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.00402ac7
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.00401198
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 0x40371e
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 0x40373b
xor eax, eax
jmp 0x403794
test al, 0x10
je 0x40374c
push 0x10
call dword [sym.imp.KERNEL32.DLL_SetLastError]
or eax, 0xffffffff
jmp 0x403794
mov eax, dword [0x41b96c]
test eax, eax
jne 0x40375e
push esi
call fcn.004036f1
pop ecx
jmp 0x403794
cmp eax, 2
jne 0x403791
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.DLL_FindFirstFileW]
cmp eax, 0xffffffff
je 0x403755
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 0x403755
xor eax, eax
inc eax
pop esi
leave
ret
Function at 0x403a88
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.00402a8e
xor esi, esi
cmp dword [ebp - 0x10], esi
jg 0x403ab9
push esi
lea ecx, [ebp - 0x18]
call fcn.004011cb
movzx eax, word [edi + ebx*2 - 2]
cmp ax, 0x5c
mov edi, dword [ebp - 0x18]
je 0x403acd
cmp ax, 0x2f
jne 0x403ad6
mov word [edi + ebx*2 - 2], si
dec ebx
mov dword [ebp - 4], ebx
mov esi, ebx
jmp 0x403afc
movzx eax, word [edi + esi*2]
cmp ax, 0x2f
je 0x403aef
cmp ax, 0x5c
je 0x403aef
dec esi
test esi, esi
jg 0x403ada
test esi, esi
je 0x403bab
and word [edi + esi*2], 0
push edi
call fcn.00401e92
test eax, eax
pop ecx
je 0x403aeb
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 0x403b33
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.0040371e
test eax, eax
pop ecx
pop ecx
je 0x403b33
xor esi, esi
jmp 0x403bd0
push edi
call fcn.00401e92
test eax, eax
pop ecx
jne 0x403b4d
push edi
push 0xc
push 1
call fcn.004095ea
add esp, 0xc
jmp 0x403b2c
cmp esi, ebx
jge 0x403b9f
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 0x403b85
jmp 0x403b84
movzx eax, word [edi + esi*2]
cmp ax, 0x5c
je 0x403b8b
cmp ax, 0x2f
je 0x403b8b
inc esi
cmp word [edi + esi*2], cx
jne 0x403b74
push edi
mov word [edi + esi*2], cx
call fcn.00401e92
test eax, eax
pop ecx
je 0x403b3e
cmp esi, dword [ebp - 4]
jl 0x403b51
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
inc eax
jmp 0x403bf0
cmp ebx, 2
mov ecx, dword [ebp + 8]
jne 0x403bdb
mov ax, word [ecx]
or ax, 0x20
cmp ax, 0x61
jb 0x403bdb
cmp ax, 0x7a
ja 0x403bdb
cmp word [ecx + 2], 0x3a
jne 0x403bdb
xor esi, esi
inc esi
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
jmp 0x403bf0
push ecx
push 0xc
push 1
call fcn.004095ea
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 0x40454f
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.00415e70
call fcn.0040244e
push 3
call fcn.004024a4
push 0x28
mov dword [0x41b958], eax
call fcn.004024a4
push 2
mov dword [0x41b954], eax
call fcn.004024a4
push 5
mov dword [0x41b950], eax
call fcn.004024a4
push 0x15
mov dword [0x41b94c], eax
call fcn.004024a4
push 0x16
mov dword [0x41b948], eax
call fcn.004024a4
push 0x17
mov dword [0x41b944], eax
call fcn.004024a4
xor ebx, ebx
add esp, 0x1c
mov dword [0x41b940], eax
mov dword [0x41b938], ebx
mov dword [0x41b93c], 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 0x404633
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.00403677
add esp, 0x18
xor esi, esi
cmp dword [esi + 0x41b3a4], edi
jne 0x40462b
push ebx
lea eax, [ebp - 0x268]
push eax
push dword [esi + 0x41b3a8]
call fcn.00403677
add esp, 0xc
add esi, 8
cmp esi, 0x28
jb 0x40460d
inc edi
cmp edi, 0x40
jl 0x4045d2
pop edi
pop esi
pop ebx
leave
ret

Function at 0x404a4f
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.00401558
push 2
mov ecx, esi
call fcn.00402ac7
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 0x404aa2
lea ebx, [eax + 1]
push ebx
mov ecx, esi
call fcn.00402ac7
push eax
push ebx
call edi
mov edi, dword [esi]
push edi
call fcn.00401198
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.00402ac7
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.00401198
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 0x404af7
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xfff
jl 0x404ab2
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x404afe
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41b3d4], esi
jle 0x404b52
mov eax, dword [0x41b3d8]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0xc]
call fcn.00401434
lea eax, [ebp - 0xc]
push eax
call fcn.00404672
mov eax, dword [0x41b3d8]
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 [0x41b3d4]
pop ecx
jl 0x404b0f
pop esi
leave
ret
Function at 0x4053d3
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.00401558
lea ecx, [ebp - 0x18]
call fcn.00401558
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 0x405424
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x50], 0x8740
test byte [ebp + 0xc], 2
je 0x405431
mov dword [ebp - 0x48], str.runas
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00404ec0
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.00401466
cmp dword [ebp - 8], edi
jne 0x405466
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 0x4054a6
test dword [ebp + 0xc], 0x10000
jne 0x405494
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 0x405458
xor ebx, ebx
jmp 0x40549d