joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6d541733
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._VirtualAlloc_16
sub esp, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._memcpy
mov eax, dword [ebp - 0xc]
call eax
nop
leave
ret

Function at 0x6d54179a
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x10c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._GetModuleFileNameA_12
sub esp, 0xc
mov dword [esp], 0x1388
call sym._Sleep_4
sub esp, 4
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call sym._DeleteFileA_4
sub esp, 4
nop
leave
ret

Function at 0x6d541b20
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x6d54603c
call sym._EnterCriticalSection_4
mov ebx, dword [0x6d546034]
sub esp, 4
test ebx, ebx
je 0x6d541b6b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x6d541b64
test esi, esi
je 0x6d541b64
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x6d541b40
mov dword [esp], 0x6d54603c
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x6d541d50
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], 0x6d544130
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x6d541da0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x6d541e78
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x6d541dde
cmp eax, 4
jne 0x6d541e00
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x6d541dee
cmp edx, 4
je 0x6d541dee
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.6d541d50
Function at 0x401aa0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
sub esp, 0x30
mov esi, dword [0x4063a0]
test esi, esi
jle 0x401bb0
mov edi, dword [0x4063a4]
xor ebx, ebx
lea edx, [edi + 0xc]
nop
mov ecx, dword [edx]
cmp ecx, eax
ja 0x401ad4
mov edi, dword [edx + 4]
add ecx, dword [edi + 8]
cmp eax, ecx
jb 0x401b55
add ebx, 1
add edx, 0x14
cmp ebx, esi
jne 0x401ac0
mov dword [esp], eax
mov ebx, eax
call fcn.00402390
test eax, eax
mov edi, eax
je 0x401bd7
mov eax, dword [0x4063a4]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.00402490
add eax, dword [edi + 0xc]
mov edx, dword [0x4063a4]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp], eax
mov dword [esp + 4], edx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401bb7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401b4e
sub eax, 4
and eax, 0xfffffffb
jne 0x401b60
add dword [0x4063a0], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
add ebx, dword [0x4063a4]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov dword [ebx + 4], eax
mov dword [ebx + 8], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401b4e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00402730
lea esi, [esi]
xor esi, esi
jmp 0x401ade
mov eax, dword [0x4063a4]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00402730
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00402730
mov esi, esi
lea edi, [edi]

Function at 0x402010
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x4063b8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x4063b0]
sub esp, 4
test ebx, ebx
je 0x402065
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x40205e
test esi, esi
je 0x40205e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x402040
mov dword [esp], 0x4063b8
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402730
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.00402700
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.00402700
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
nop
nop
nop
nop
nop
jmp fcn.004014e0
Function at 0x4020c6
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
lea eax, [ebp - 0xc]
call fcn.00401000
lea eax, [ebp - 0x18]
call fcn.00401000
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x54]
push 0
push eax
call fcn.0041d490
mov eax, dword [ebp + 0x10]
add esp, 0xc
test byte [ebp + 0xc], 1
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], 0x740
mov dword [ebp - 0x38], 0xa
je 0x402117
and dword [ebp - 0x38], 0
mov dword [ebp - 0x50], 0x8740
test byte [ebp + 0xc], 2
je 0x402124
mov dword [ebp - 0x48], str.runas
mov esi, dword [ebp + 0xc]
and esi, 0x10000
jne 0x402136
or dword [ebp - 0x50], 0x100
mov eax, dword [0x43027c]
push 5
push eax
mov dword [ebp - 0x4c], eax
call dword [sym.imp.USER32.dll_ShowWindow]
push dword [ebp - 0x4c]
call dword [sym.imp.USER32.dll_BringWindowToTop]
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0xc]
call fcn.00403688
push eax
lea eax, [ebp - 0x18]
call fcn.0040100c
lea eax, [ebp - 0xc]
call fcn.0040ba98
test eax, eax
jne 0x402186
lea eax, [ebp - 0x18]
call fcn.0040177f
lea eax, [ebp - 0xc]
call fcn.0040177f
xor eax, eax
inc eax
pop esi
leave
ret
lea eax, [ebp - 0xc]
call fcn.0040bba8
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x18]
call fcn.0040bba8
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x4021d9
test esi, esi
jne 0x4021b9
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
inc esi
lea eax, [ebp - 0x18]
call fcn.0040177f
lea eax, [ebp - 0xc]
call fcn.0040177f
mov eax, esi
jmp 0x402183
xor esi, esi
jmp 0x4021c5
Function at 0x402c3e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push dword [ebp + 8]
mov eax, esi
call fcn.004026f7
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x402d52
push edi
push edi
mov dword [0x42dee0], esi
mov dword [0x430278], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x42dee4], eax
cmp eax, edi
je 0x402c99
cmp dword [0x43028c], 2
je 0x402c8b
call fcn.00409f54
mov eax, dword [0x42dee4]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x42dee4]
mov ecx, dword [0x430278]
mov dword [0x4302b8], edi
cmp ecx, edi
je 0x402cdf
cmp ecx, 1
je 0x402cd3
cmp ecx, 2
je 0x402ccf
cmp ecx, 3
je 0x402ccb
cmp ecx, 0x67
jle 0x402cc6
cmp ecx, 0x6b
jle 0x402d48
push ecx
push 0x14
jmp 0x402d19
push 0x12
jmp 0x402cd5
push 0x13
jmp 0x402cd5
push 0x11
push edi
call fcn.00409e57
pop ecx
pop ecx
jmp 0x402d48
mov dword [ebp + 8], edi
cmp dword [0x4302c0], edi
jne 0x402d48
cmp eax, edi
je 0x402d06
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x402d06
cmp dword [ebp + 8], edi
jne 0x402d06
xor eax, eax
jmp 0x402d4d
mov ecx, dword [ebp + 8]
mov eax, 0x80070000
and ecx, eax
cmp ecx, eax
je 0x402d1c
push dword [ebp + 8]
push 0x21
push edi
jmp 0x402d40
mov eax, dword [ebp + 8]
and eax, 0xffff
cmp eax, 0xe
jne 0x402d32
cmp dword [0x430290], 0xffffffff
je 0x402d48
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00409e57
add esp, 0xc
mov eax, 0x80004005
pop edi
leave
ret 4

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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov eax, esi
call fcn.00401000
push 2
mov eax, esi
call fcn.00403465
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push eax
push 1
call edi
mov ebx, eax
xor eax, eax
mov ecx, esi
call fcn.00401799
test ebx, ebx
je 0x4035fd
inc ebx
push ebx
mov eax, esi
call fcn.00403465
push eax
push ebx
call edi
push esi
call fcn.00403447
mov eax, esi
call fcn.0040ba98
and dword [ebp - 4], 0
lea ebx, [eax + 0xf]
lea edi, [eax + eax]
push ebx
mov eax, esi
call fcn.00403465
push dword [ebp - 4]
add eax, edi
push dword [ebp + 8]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push esi
call fcn.00403447
mov eax, esi
call fcn.0040bba8
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40364d
inc dword [ebp - 4]
cmp dword [ebp - 4], 0xfff
jl 0x40360e
pop edi
mov eax, esi
pop ebx
leave
ret
Function at 0x403838
Capabilities:
Check if file exists
Create directory
Get file attributes

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

Function at 0x40417f
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
mov dword [ebp - 8], eax
push ebx
lea eax, [ebp - 0x1c]
push eax
call fcn.00401784
push 0
lea eax, [ebp - 0x1c]
call fcn.00403465
mov edi, eax
movzx eax, word [ebx + esi*2 - 2]
cmp eax, 0x5c
je 0x4041bc
cmp eax, 0x2f
jne 0x4041ea
xor eax, eax
mov word [edi + esi*2 - 2], ax
dec esi
mov dword [ebp - 8], esi
jmp 0x4041ea
movzx eax, word [edi + esi*2]
cmp eax, 0x2f
je 0x4041dc
cmp eax, 0x5c
je 0x4041dc
dec esi
test esi, esi
jg 0x4041c9
test esi, esi
je 0x40428d
xor eax, eax
mov word [edi + esi*2], ax
push edi
call fcn.00403838
pop ecx
test eax, eax
je 0x4041d8
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x404221
lea eax, [ebp - 0x10]
push eax
mov eax, edi
call fcn.004037ca
pop ecx
test eax, eax
je 0x404221
xor esi, esi
jmp 0x4042b0
push edi
call fcn.00403838
pop ecx
test eax, eax
jne 0x40427b
push edi
push 0xc
push 1
call fcn.00409e57
add esp, 0xc
jmp 0x40421a
mov eax, dword [ebp - 8]
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 fcn.0041d510
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x40426d
jmp 0x40426c
movzx eax, word [edi + esi*2]
cmp eax, 0x5c
je 0x404273
cmp eax, 0x2f
je 0x404273
inc esi
cmp word [edi + esi*2], cx
jne 0x40425e
xor eax, eax
mov word [edi + esi*2], ax
jmp 0x404221
cmp esi, dword [ebp - 8]
jl 0x40423b
lea eax, [ebp - 0x1c]
call fcn.0040177f
xor eax, eax
inc eax
jmp 0x4042d3
cmp dword [ebp - 8], 2
jne 0x4042bc
mov ax, word [ebx]
or ax, 0x20
cmp ax, 0x61
jb 0x4042bc
cmp ax, 0x7a
ja 0x4042bc
cmp word [ebx + 2], 0x3a
jne 0x4042bc
xor esi, esi
inc esi
lea eax, [ebp - 0x1c]
call fcn.0040177f
mov eax, esi
jmp 0x4042d3
push ebx
push 0xc
push 1
call fcn.00409e57
add esp, 0xc
lea eax, [ebp - 0x1c]
call fcn.0040177f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4042d8
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push ebx
push esi
push edi
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
call fcn.00401784
push 0x427af8
lea esi, [ebp - 0x10]
call fcn.00412698
lea eax, [ebp - 0x264]
push eax
mov eax, esi
call fcn.0040bba8
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov dword [ebp - 0x14], eax
cmp eax, 0xffffffff
je 0x4043c7
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push dword [ebp + 8]
lea eax, [ebp - 0x10]
call fcn.0040100c
push 0x5c
lea esi, [ebp - 0x10]
call fcn.00401cb6
lea eax, [ebp - 0x238]
push eax
call fcn.00412698
test byte [ebp - 0x264], 0x10
je 0x404388
push 0x427b00
lea eax, [ebp - 0x238]
push eax
call ebx
test eax, eax
je 0x4043a6
push 0x427b04
lea eax, [ebp - 0x238]
push eax
call ebx
test eax, eax
je 0x4043a6
mov eax, esi
call fcn.0040bba8
push eax
call fcn.004042d8
pop ecx
jmp 0x4043a2
lea eax, [ebp - 0x10]
call fcn.0040bba8
mov esi, eax
push 0
push esi
call edi
test eax, eax
je 0x4043fd
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4043fd
lea eax, [ebp - 0x264]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40432a
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, 0x4302f8
call fcn.0040bba8
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push dword [ebp + 8]
call edi
test eax, eax
je 0x4043fd
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4043fd
lea eax, [ebp - 0x10]
call fcn.0040177f
xor eax, eax
inc eax
jmp 0x404407
lea eax, [ebp - 0x10]
call fcn.0040177f
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40440c
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x250
cmp dword [0x4302c8], 0
je 0x404426
xor eax, eax
inc eax
jmp 0x404464
lea eax, [esp]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x404421
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [esp], 0x10
jne 0x40445d
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404459
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x404464
xor eax, eax
jmp 0x404464
push esi
call fcn.004042d8
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x405235
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 [0x42cdd0], ebx
je 0x405268
mov eax, 0x42cdd0
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x405268
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x42cdd0]
cmp dword [eax], ebx
jne 0x405251
shl esi, 4
cmp dword [esi + 0x42cdd0], ebx
jne 0x40527d
mov eax, 0x427944
jmp 0x4053ef
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 0x40532d
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 fcn.0041d292
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 0x405324
call edi
test eax, eax
jne 0x405324
mov eax, dword [esi + 0x42cddc]
test eax, eax
je 0x405319
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x405316
push dword [esi + 0x42cddc]
call fcn.0041bce4
mov dword [esi + 0x42cddc], edi
jmp 0x40532c
push edi
jmp 0x405327
mov eax, dword [ebp - 8]
mov dword [esi + 0x42cddc], eax
jmp 0x40532d
push dword [ebp - 8]
call fcn.0041bce4
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x42cddc]
test eax, eax
jne 0x4053ee
mov ebx, dword [esi + 0x42cdd4]
cmp dword [esi + 0x42cdd8], eax
je 0x405364
call fcn.004051db
cmp eax, 0x419
jne 0x405364
mov ebx, dword [esi + 0x42cdd8]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
xor ecx, ecx
push 2
pop edx
lea eax, [edi + 2]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0041d292
cmp dword [0x42d0d8], 0xffffffff
pop ecx
mov dword [esi + 0x42cddc], eax
jne 0x4053ce
and dword [0x42d0d8], 0
push 0x1f
lea eax, [ebp - 0xa4]
push eax
movzx eax, word [0x430280]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x4053ce
lea eax, [ebp - 0xa4]
push eax
call fcn.0041d476
pop ecx
mov dword [0x42d0d8], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x42cddc]
push edi
push ebx
push 0
push dword [0x42d0d8]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x42cddc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4054a7
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 dword [ebp - 0x10], ebx
mov word [ebp - 0xc], 0x500
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x4054fa
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 0x405b94
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x274
push ebx
push esi
push edi
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x42dee8], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.0040a534
call fcn.004051db
push 3
call fcn.00405235
pop ecx
push 0x28
mov dword [0x42df10], eax
call fcn.00405235
pop ecx
push 2
mov dword [0x42df0c], eax
call fcn.00405235
pop ecx
push 5
mov dword [0x42df08], eax
call fcn.00405235
pop ecx
push 0x15
mov dword [0x42df04], eax
call fcn.00405235
pop ecx
push 0x16
mov dword [0x42df00], eax
call fcn.00405235
pop ecx
push 0x17
mov dword [0x42defc], eax
call fcn.00405235
xor ebx, ebx
pop ecx
mov dword [0x42def8], eax
mov dword [0x42def0], ebx
mov dword [0x42def4], ebx
xor edi, edi
push ebx
push edi
lea eax, [ebp - 0x270]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x405c8f
push edi
lea eax, [ebp - 0x60]
push str.SfxFolder_02d
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 1
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x60]
push eax
call fcn.00403543
add esp, 0xc
xor esi, esi
cmp dword [esi + 0x42cda8], edi
jne 0x405c87
push ebx
lea eax, [ebp - 0x270]
push eax
push dword [esi + 0x42cdac]
call fcn.00403543
add esp, 0xc
add esi, 8
cmp esi, 0x28
jb 0x405c69
inc edi
cmp edi, 0x40
jl 0x405c2b
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405cd4
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, 0x4303f4
push edi
mov eax, esi
xor edi, edi
call fcn.00414fbb
test eax, eax
jle 0x405d3f
push ebx
mov ecx, edi
mov eax, esi
call fcn.00410794
lea ebx, [eax + 0xc]
lea eax, [ebp - 0xc]
push eax
call fcn.004025fb
lea eax, [ebp - 0xc]
call fcn.00405cbc
lea eax, [ebp - 0xc]
call fcn.0040bba8
push eax
mov ecx, edi
mov eax, esi
call fcn.00410794
call fcn.0040bba8
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
lea eax, [ebp - 0xc]
call fcn.0040177f
mov eax, esi
inc edi
call fcn.00414fbb
cmp edi, eax
jl 0x405cef
pop ebx
pop edi
pop esi
leave
ret