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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x41e6c0]
sub esp, 0x904
push ebx
xor ebx, ebx
cmp eax, ebx
push esi
push edi
je 0x40105d
cmp word [0x41e6c2], bx
je 0x40104b
call eax
mov dword [0x41e6c0], eax
push eax
call fcn.004025c8
push eax
call fcn.00408db3
pop ecx
jmp 0x4010f0
push 0x27
call fcn.004025c8
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 0x4010c1
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 0x40108a
xor ebx, ebx
cmp byte [str.___CiToVHK__UTF_8_], 0x3b
je 0x4010e4
push ebx
push 3
call fcn.004025c8
pop ecx
push eax
lea eax, [ebp - 0x904]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x4010f1
lea eax, [ebp - 0x904]
push eax
call fcn.00408db3
pop ecx
call fcn.004045d9
push 0xa
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x401477
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.00409012
push dword [ebp + 0xc]
lea edi, [esi + 0x10]
mov ecx, edi
call fcn.00411412
push 0x5c
mov ecx, edi
call fcn.004011ce
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40137a
push edi
push edi
mov dword [0x41e6c4], esi
mov dword [0x41e6cc], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, edi
mov dword [0x41e6c8], eax
je 0x4014eb
cmp dword [0x41e72c], 2
je 0x4014dd
call fcn.00408d21
mov eax, dword [0x41e6c8]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x41e6c8]
mov ecx, dword [0x41e6cc]
cmp ecx, edi
mov dword [0x41e7cc], edi
je 0x401531
cmp ecx, 1
je 0x401525
cmp ecx, 2
je 0x401521
cmp ecx, 3
je 0x40151d
cmp ecx, 0x67
jle 0x401518
cmp ecx, 0x6b
jle 0x40159a
push ecx
push 0x14
jmp 0x40156b
push 0x12
jmp 0x401527
push 0x13
jmp 0x401527
push 0x11
push edi
call fcn.00408e97
pop ecx
pop ecx
jmp 0x40159a
cmp dword [0x41e7d4], edi
mov dword [ebp + 8], edi
jne 0x40159a
cmp eax, edi
je 0x401558
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x401558
cmp dword [ebp + 8], edi
jne 0x401558
xor eax, eax
jmp 0x40159f
mov ecx, dword [ebp + 8]
mov eax, 0x80070000
and ecx, eax
cmp ecx, eax
je 0x40156e
push dword [ebp + 8]
push 0x21
push edi
jmp 0x401592
mov eax, dword [ebp + 8]
and eax, 0xffff
cmp eax, 0xe
jne 0x401584
cmp dword [0x41e730], 0xffffffff
je 0x40159a
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00408e97
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 8
Function at 0x401dc2
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 0x401e03
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x401ded
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 0x401e03
test al, 0x10
jne 0x401e03
push esi
jmp 0x401de3
xor eax, eax
inc eax
pop esi
ret

Function at 0x40220d
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]
movzx ecx, word [0x41e6e0]
mov esi, dword [sym.imp.KERNEL32.dll_FindResourceExA]
push ecx
push dword [ebp + 0xc]
mov dword [ebp - 4], eax
push dword [ebp + 8]
push eax
call esi
mov ebx, eax
test ebx, ebx
mov edi, 0x409
jne 0x402255
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call esi
mov ebx, eax
test ebx, ebx
je 0x40227f
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x402268
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esi], eax
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40227f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x4022e9
cmp dword [0x41e6f0], 0
jne 0x4022e7
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetProcessPreferredUILanguages
push dword [0x41e6f4]
mov dword [0x41e6f0], 1
call esi
push 0
mov ebx, eax
movzx eax, word [0x41e6e0]
push edi
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
test ebx, ebx
jne 0x4022dd
push str.SetThreadPreferredUILanguages
push dword [0x41e6f4]
call esi
mov ebx, eax
test ebx, ebx
je 0x4022e7
push 0
lea eax, [ebp - 0x44]
push eax
push 4
call ebx
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4025c8
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 [0x41e0a0], ebx
je 0x4025fb
mov eax, 0x41e0a0
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x4025fb
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x41e0a0]
cmp dword [eax], ebx
jne 0x4025e4
shl esi, 4
cmp dword [esi + 0x41e0a0], ebx
jne 0x402610
mov eax, 0x41a634
jmp 0x402782
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 0x4026c0
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 0x4026b7
call edi
test eax, eax
jne 0x4026b7
mov eax, dword [esi + 0x41e0ac]
test eax, eax
je 0x4026ac
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x4026a9
push dword [esi + 0x41e0ac]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
mov dword [esi + 0x41e0ac], edi
jmp 0x4026bf
push edi
jmp 0x4026ba
mov eax, dword [ebp - 8]
mov dword [esi + 0x41e0ac], eax
jmp 0x4026c0
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 + 0x41e0ac]
test eax, eax
jne 0x402781
mov ebx, dword [esi + 0x41e0a4]
lea edi, [esi + 0x41e0a8]
cmp dword [edi], eax
je 0x4026f6
call fcn.00402572
cmp eax, dword [0x41b4b0]
jne 0x4026f6
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 [0x41e074], 0xffffffff
pop ecx
mov dword [esi + 0x41e0ac], eax
jne 0x402761
and dword [0x41e074], 0
push 0x1f
lea eax, [ebp - 0xa4]
push eax
movzx eax, word [0x41e6e0]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x402761
lea eax, [ebp - 0xa4]
push eax
call dword [sym.imp.MSVCRT.dll__wtol]
pop ecx
mov dword [0x41e074], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x41e0ac]
push edi
push ebx
push 0
push dword [0x41e074]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x41e0ac]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40287d
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 0x4028da
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 0x402a8e
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.004113e3
push 0x41a748
lea ecx, [ebp - 0xc]
call fcn.0041146a
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402b6a
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00411412
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.004011ce
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.0041146a
test byte [ebp - 0x25c], 0x10
je 0x402b35
push 0x41a744
lea eax, [ebp - 0x230]
push eax
call edi
test eax, eax
je 0x402b4d
push 0x41a73c
lea eax, [ebp - 0x230]
push eax
call edi
test eax, eax
je 0x402b4d
push dword [ebp - 0xc]
call fcn.00402a8e
pop ecx
jmp 0x402b49
push 0
push dword [ebp - 0xc]
call esi
test eax, eax
je 0x402b8f
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x402b8f
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x402ad9
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x402b8f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x402b8f
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
inc eax
jmp 0x402b99
push dword [ebp - 0xc]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x402b9f
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
cmp dword [0x41e7e0], 0
je 0x402bb6
xor eax, eax
inc eax
leave
ret
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x250]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
jne 0x402bd2
xor eax, eax
inc eax
jmp 0x402c03
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x250], 0x10
jne 0x402bfc
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x402bf8
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x402c03
xor eax, eax
jmp 0x402c03
push esi
call fcn.00402a8e
pop ecx
pop esi
leave
ret

Function at 0x403489
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 0x18]
mov edi, eax
mov dword [ebp - 4], eax
call fcn.004113e3
push 0
lea ecx, [ebp - 0x18]
call fcn.0040307e
mov esi, eax
movzx eax, word [ebx + edi*2 - 2]
cmp ax, 0x5c
je 0x4034c7
cmp ax, 0x2f
jne 0x4034f5
and word [esi + edi*2 - 2], 0
dec edi
mov dword [ebp - 4], edi
jmp 0x4034f5
movzx eax, word [esi + edi*2]
cmp ax, 0x2f
je 0x4034e8
cmp ax, 0x5c
je 0x4034e8
dec edi
test edi, edi
jg 0x4034d3
test edi, edi
je 0x403599
and word [esi + edi*2], 0
push esi
call fcn.00401dc2
test eax, eax
pop ecx
je 0x4034e4
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test al, 0x10
jne 0x40352c
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.00403186
test eax, eax
pop ecx
pop ecx
je 0x40352c
xor esi, esi
jmp 0x4035bc
push esi
call fcn.00401dc2
test eax, eax
pop ecx
jne 0x403586
push esi
push 0xc
push 1
call fcn.00408e97
add esp, 0xc
jmp 0x403525
mov eax, dword [ebp - 4]
sub eax, edi
inc eax
push eax
mov eax, dword [ebp + 8]
lea eax, [eax + edi*2]
push eax
lea ebx, [esi + edi*2]
push ebx
call sub.MSVCRT.dll_memcpy
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x40357a
jmp 0x403579
movzx eax, word [esi + edi*2]
cmp ax, 0x5c
je 0x403580
cmp ax, 0x2f
je 0x403580
inc edi
cmp word [esi + edi*2], cx
jne 0x403569
mov word [esi + edi*2], cx
jmp 0x40352c
cmp edi, dword [ebp - 4]
jl 0x403546
push dword [ebp - 0x18]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
xor eax, eax
pop ecx
inc eax
jmp 0x4035e0
cmp dword [ebp - 4], 2
jne 0x4035c9
mov ax, word [ebx]
or ax, 0x20
cmp ax, 0x61
jb 0x4035c9
cmp ax, 0x7a
ja 0x4035c9
cmp word [ebx + 2], 0x3a
jne 0x4035c9
xor esi, esi
inc esi
push dword [ebp - 0x18]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
mov eax, esi
jmp 0x4035e0
push ebx
push 0xc
push 1
call fcn.00408e97
push dword [ebp - 0x18]
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 0x4038f1
Capabilities:
Get graphical window text

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
mov ecx, edi
call fcn.00410ff6
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
mov esi, eax
test esi, esi
jle 0x40392f
lea eax, [esi + 1]
push eax
push eax
mov ecx, edi
call fcn.0040307e
push eax
push dword [esp + 0x18]
call dword [sym.imp.USER32.dll_GetWindowTextW]
mov eax, dword [edi]
mov dword [edi + 4], esi
and word [eax + esi*2], 0
mov eax, edi
pop edi
pop esi
ret

Function at 0x403afb
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.00410ff6
lea eax, [ebx + 2]
push eax
mov ecx, esi
mov dword [ebp + 8], eax
call fcn.0040307e
inc ebx
push ebx
push dword [ebp + 8]
mov ecx, esi
call fcn.0040307e
push eax
push dword [ebp + 0xc]
call edi
mov edi, dword [esi]
push edi
call fcn.00401d2f
pop ecx
mov dword [esi + 4], eax
and word [edi + eax*2], 0
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x403f77
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
push ebx
push esi
push edi
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [0x41e6f4], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00418200
call fcn.00402572
push 3
call fcn.004025c8
push 0x28
mov dword [0x41e71c], eax
call fcn.004025c8
push 2
mov dword [0x41e718], eax
call fcn.004025c8
push 5
mov dword [0x41e714], eax
call fcn.004025c8
push 0x15
mov dword [0x41e710], eax
call fcn.004025c8
push 0x16
mov dword [0x41e70c], eax
call fcn.004025c8
push 0x17
mov dword [0x41e708], eax
call fcn.004025c8
xor ebx, ebx
add esp, 0x1c
mov dword [0x41e704], eax
mov dword [0x41e6fc], ebx
mov dword [0x41e700], 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 0x40406b
push edi
lea eax, [ebp - 0x5c]
push 0x41b568
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.00403baf
add esp, 0x18
xor esi, esi
cmp dword [esi + 0x41e3a4], edi
jne 0x404063
push ebx
lea eax, [ebp - 0x268]
push eax
push dword [esi + 0x41e3a8]
call fcn.00403baf
add esp, 0xc
add esi, 8
cmp esi, 0x28
jb 0x404045
inc edi
cmp edi, 0x40
jl 0x40400a
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404ab8
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push edi
lea ecx, [ebp - 0xc]
call fcn.00410ff6
lea ecx, [ebp - 0x18]
call fcn.00410ff6
push 0x3c
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], 0x3c
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x50], 0x740
mov dword [ebp - 0x38], ebx
je 0x404b0a
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x50], 0x8740
test byte [ebp + 0xc], 2
je 0x404b17
mov dword [ebp - 0x48], str.runas
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00404675
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.00411412
cmp dword [ebp - 8], edi
jne 0x404b47
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__
mov eax, ebx
jmp 0x404b92
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x404b80
test dword [ebp + 0xc], 0x10000
jne 0x404b75
push 0xffffffffffffffff
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, ebx
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__
mov eax, edi
pop ecx
pop ecx
pop edi
pop ebx
leave
ret
Function at 0x404e5e
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.00410ff6
push 2
mov ecx, esi
call fcn.0040307e
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push eax
push 1
call edi
and dword [esi + 4], 0
mov ecx, dword [esi]
and word [ecx], 0
test eax, eax
jbe 0x404eb1
lea ebx, [eax + 1]
push ebx
mov ecx, esi
call fcn.0040307e
push eax
push ebx
call edi
mov edi, dword [esi]
push edi
call fcn.00401d2f
mov dword [esi + 4], eax
and word [edi + eax*2], 0
pop ecx
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.0040307e
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.00401d2f
add esp, 0x10
mov dword [esi + 4], eax
and word [edi + eax*2], 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404f06
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xfff
jl 0x404ec1
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x404f0d
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x41e7a8], esi
jle 0x404f61
mov eax, dword [0x41e7a4]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0xc]
call fcn.00411019
lea eax, [ebp - 0xc]
push eax
call fcn.004040aa
mov eax, dword [0x41e7a4]
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 [0x41e7a8]
pop ecx
jl 0x404f1e
pop esi
leave
ret
Function at 0x405041
Capabilities:
Create process on windows
Get disk information
Self delete
Set file attributes
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x34
cmp word [eax + 2], 0x3a
push ebx
jne 0x4051f7
movzx ecx, word [eax + 4]
cmp cx, 0x5c
je 0x40506a
cmp cx, 0x2f
jne 0x4051f7
mov ax, word [eax]
mov word [ebp - 0x10], ax
lea eax, [ebp - 0x10]
xor ebx, ebx
push eax
mov word [ebp - 0xe], 0x3a
mov word [ebp - 0xc], 0x5c
mov word [ebp - 0xa], bx
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x40509a
push dword [ebp + 8]
jmp 0x4051f8
lea eax, [ebp - 0x28]
push str.7ZSfx_03x.cmd
push eax
call fcn.00404e5e
pop ecx
pop ecx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
je 0x4051bf
push esi
push edi
lea ecx, [ebp - 0x1c]
call fcn.00410ff6
push str.:Repeat_r_n
lea ecx, [ebp - 0x1c]
call fcn.00411412
mov edi, str.del__
push edi
lea ecx, [ebp - 0x1c]
call fcn.0041146a
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00411099
mov esi, 0x41b99c
push esi
lea ecx, [ebp - 0x1c]
call fcn.0041146a
push str.if_exist__
lea ecx, [ebp - 0x1c]
call fcn.0041146a
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00411099
push str.__goto_Repeat_r_n
lea ecx, [ebp - 0x1c]
call fcn.0041146a
push edi
lea ecx, [ebp - 0x1c]
call fcn.0041146a
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00411099
push esi
lea ecx, [ebp - 0x1c]
call fcn.0041146a
mov esi, dword [ebp - 0x18]
push 1
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x34]
push eax
call fcn.00403103
mov eax, dword [eax]
add esp, 0xc
push ebx
lea ecx, [ebp - 8]
push ecx
push esi
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x34]
mov esi, eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
cmp esi, ebx
pop esi
je 0x4051d2
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x18]
jne 0x4051d2
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push ebx
push ebx
push ebx
push dword [ebp - 0x28]
push str.open
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
push dword [ebp - 0x28]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
jmp 0x4051fd
push dword [ebp - 0x28]
call fcn.00402b9f
push dword [ebp - 0x1c]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp - 0x28]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
push dword [ebp + 8]
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 0x10
jmp 0x4051fe
push eax
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
pop ecx
pop ebx
leave
ret
Function at 0x406dc6
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
lea eax, [ebp - 4]
push eax
xor eax, eax
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
push eax
call dword [sym.imp.MSVCRT.dll__beginthreadex]
mov ecx, dword [ebp + 8]
push eax
mov dword [ecx], eax
call fcn.00406d79
add esp, 0x1c
leave
ret