joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40452a
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push edi
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 8]
test bl, 3
jne 0x404558
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x40455f
cmp ebx, dword [eax + 4]
jae 0x40455f
xor eax, eax
jmp 0x40474f
push esi
mov esi, dword [edi + 0xc]
cmp esi, 0xffffffff
jne 0x404570
xor eax, eax
inc eax
jmp 0x40474e
mov eax, ebx
xor edx, edx
mov dword [ebp + 8], edx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x404586
cmp ecx, edx
jae 0x4046cb
cmp dword [eax + 4], 0
je 0x40458f
inc dword [ebp + 8]
inc edx
sub eax, 0xfffffff4
cmp edx, esi
jbe 0x404577
cmp dword [ebp + 8], 0
je 0x4045b1
mov eax, dword [edi - 8]
cmp eax, dword [ebp - 4]
jb 0x4046cb
cmp eax, edi
jae 0x4046cb
mov esi, ebx
mov eax, dword [0x419c10]
and esi, 0xfffff000
xor edi, edi
test eax, eax
jle 0x4045d6
cmp dword [edi*4 + 0x419c18], esi
je 0x4046cf
inc edi
cmp edi, eax
jl 0x4045c4
lea eax, [ebp - 0x20]
push 0x1c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
or eax, eax
je 0x40474b
cmp dword [ebp - 8], 0x1000000
jne 0x40474b
test byte [ebp - 0xc], 0xcc
je 0x404654
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x40474b
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x40474b
cmp word [eax + 0x18], 0x10b
jne 0x40474b
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x40474b
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x404654
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x404654
test byte [ecx + 0x27], 0x80
jne 0x4046cb
push 1
push 0x419c58
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
or eax, eax
jne 0x404568
mov ecx, dword [0x419c10]
mov edx, ecx
or ecx, ecx
jle 0x404688
lea eax, [ecx*4 + 0x419c14]
cmp dword [eax], esi
je 0x404688
dec edx
add eax, 0xfffffffc
or edx, edx
jg 0x40467c
test edx, edx
jne 0x4046b9
push 0xf
pop ebx
cmp ecx, ebx
jg 0x404695
mov ebx, ecx
xor edx, edx
or ebx, ebx
jl 0x4046ad
lea eax, [edx*4 + 0x419c18]
inc edx
cmp edx, ebx
mov edi, dword [eax]
mov dword [eax], esi
mov esi, edi
jle 0x40469b
cmp ecx, 0x10
jge 0x4046b9
inc ecx
mov dword [0x419c10], ecx
push 0
push 0x419c58
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x404568
xor eax, eax
jmp 0x40474e
or edi, edi
jle 0x404568
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x419c58
call ebx
or eax, eax
jne 0x404568
cmp dword [edi*4 + 0x419c18], esi
je 0x404725
mov eax, dword [0x419c10]
lea edi, [eax - 1]
or edi, edi
jl 0x404713
cmp dword [edi*4 + 0x419c18], esi
je 0x40470f
dec edi
jns 0x404703
or edi, edi
jge 0x404723
cmp eax, 0x10
jge 0x40471e
inc eax
mov dword [0x419c10], eax
lea edi, [eax - 1]
jmp 0x404725
je 0x40473d
xor ecx, ecx
or edi, edi
jl 0x40473d
lea eax, [ecx*4 + 0x419c18]
inc ecx
mov edx, dword [eax]
cmp ecx, edi
mov dword [eax], esi
mov esi, edx
jle 0x40472b
push 0
push 0x419c58
call ebx
jmp 0x404568
or eax, 0xffffffff
pop esi
pop edi
pop ebx
leave
ret
Function at 0x40563c
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.00402670
mov edi, esp
lea eax, [ebp - 0x28]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4056d7
lea eax, [ebp - 0x4c]
mov ebx, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x419a98]
mov dword [ebp - 8], ecx
lea esi, [ecx - 1]
not esi
and esi, edi
sub esi, ecx
mov edi, eax
dec edi
neg edi
sbb edi, edi
and edi, 0xfffffff1
sub edi, 0xffffffef
imul edi, ecx
add edi, ebx
cmp esi, edi
jb 0x4056d7
cmp eax, 1
je 0x4056f8
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
or eax, eax
je 0x4056d7
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x4056a4
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4056d3
xor eax, eax
inc eax
jmp 0x405717
cmp esi, eax
jae 0x4056db
xor eax, eax
jmp 0x405717
cmp eax, edi
jae 0x4056e2
mov dword [ebp - 4], edi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x419a98]
jmp 0x4056fb
mov dword [ebp - 4], esi
lea ecx, [ebp - 0xc]
dec eax
neg eax
push ecx
sbb eax, eax
and eax, 0x103
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4153e0
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x19cc74ca
mov byte [esi + eax - 0x6e], dh
cmc
retf 0x1a33
fidivr word [edx - 0x2c71a5e9]
mov edx, 0xd38e5a17
xchg ebx, eax
fisttp qword [ebx - 0x66b365ce]
jo 0x4153e1
mov esi, dword [edx]
lcall 0x7df6, 0xf270994c
fld xword [eax - 0x5d338ae0]
je 0x415408
idiv byte [ebp - 0x25]
test al, 0x20
jne 0x4153c2
mov byte [0xc8e0f74], al
arpl word [edx], si
mov cs, word [ebx]
xor dh, byte [ebx]
ret 0x8bdf
xor eax, edx
fisttp word [ebx - 0x37530977]
xor ecx, dword [edx - 0x24]
sti
jb 0x4153fd
je 0x4153e8
int3
Function at 0x401ec5
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push edi
lea ecx, [ebp - 0xc]
call fcn.00410d24
lea ecx, [ebp - 0x18]
call fcn.00410d24
push 0x3c
pop esi
push esi
xor edi, edi
lea eax, [ebp - 0x54]
push edi
push eax
call fcn.00415110
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 0x401f17
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x50], 0x8740
test byte [ebp + 0xc], 2
je 0x401f24
mov dword [ebp - 0x48], str.runas
mov esi, dword [ebp + 0xc]
and esi, 0x10000
jne 0x401f36
or dword [ebp - 0x50], 0x100
mov eax, dword [0x4241e8]
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]
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
call fcn.00403187
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.004111c6
cmp dword [ebp - 8], edi
jne 0x401f81
push dword [ebp - 0x18]
call fcn.00414eae
push dword [ebp - 0xc]
call fcn.00414eae
xor eax, eax
inc eax
jmp 0x401fc8
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 0x401fb6
cmp esi, edi
jne 0x401faa
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 edi, edi
inc edi
push dword [ebp - 0x18]
call fcn.00414eae
push dword [ebp - 0xc]
call fcn.00414eae
mov eax, edi
pop ecx
pop ecx
pop edi
pop esi
leave
ret
Function at 0x402820
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
push dword [ebp + 8]
mov esi, ecx
call fcn.00402407
xor edi, edi
lea eax, [ebp - 4]
push eax
push edi
push esi
push 0x40266e
push edi
push edi
mov dword [0x4241dc], esi
mov dword [0x4241e4], edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [0x4241e0], eax
cmp eax, edi
je 0x40287b
cmp dword [0x42422c], 2
je 0x40286d
call fcn.00409619
mov eax, dword [0x4241e0]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x4241e0]
mov ecx, dword [0x4241e4]
mov dword [0x424384], edi
cmp ecx, edi
je 0x4028c1
cmp ecx, 1
je 0x4028b5
cmp ecx, 2
je 0x4028b1
cmp ecx, 3
je 0x4028ad
cmp ecx, 0x67
jle 0x4028a8
cmp ecx, 0x6b
jle 0x40292a
push ecx
push 0x14
jmp 0x4028fb
push 0x12
jmp 0x4028b7
push 0x13
jmp 0x4028b7
push 0x11
push edi
call fcn.00409899
pop ecx
pop ecx
jmp 0x40292a
mov dword [ebp + 8], edi
cmp dword [0x42438c], edi
jne 0x40292a
cmp eax, edi
je 0x4028e8
lea ecx, [ebp + 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x4028e8
cmp dword [ebp + 8], edi
jne 0x4028e8
xor eax, eax
jmp 0x40292f
mov ecx, dword [ebp + 8]
mov eax, 0x80070000
and ecx, eax
cmp ecx, eax
je 0x4028fe
push dword [ebp + 8]
push 0x21
push edi
jmp 0x402922
mov eax, dword [ebp + 8]
and eax, 0xffff
cmp eax, 0xe
jne 0x402914
cmp dword [0x424230], 0xffffffff
je 0x40292a
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 8]
push 0x22
push 1
call fcn.00409899
add esp, 0xc
mov eax, 0x80004005
pop edi
pop esi
leave
ret 4

Function at 0x4031fa
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 0x40323c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0xb7
cmp eax, esi
je 0x403227
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x40323f
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40323c
test al, 0x10
jne 0x40323c
push esi
jmp 0x40321d
xor eax, eax
inc eax
pop esi
pop ebp
ret
Function at 0x403692
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 [0x4241ec]
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
mov edi, 0x409
test ebx, ebx
jne 0x4036da
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call esi
mov ebx, eax
test ebx, ebx
je 0x403704
mov esi, dword [ebp + 0x10]
test esi, esi
je 0x4036ed
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 0x403704
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x40376e
cmp dword [0x4241f0], 0
jne 0x40376c
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetProcessPreferredUILanguages
push dword [0x4241f8]
mov dword [0x4241f0], 1
call esi
push 0
mov ebx, eax
movzx eax, word [0x4241ec]
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 0x403762
push str.SetThreadPreferredUILanguages
push dword [0x4241f8]
call esi
mov ebx, eax
test ebx, ebx
je 0x40376c
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 0x403a52
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 [0x4230c0], ebx
je 0x403a85
mov eax, 0x4230c0
mov ecx, dword [ebp + 8]
cmp dword [eax], ecx
je 0x403a85
inc esi
mov eax, esi
shl eax, 4
lea eax, [eax + 0x4230c0]
cmp dword [eax], ebx
jne 0x403a6e
shl esi, 4
cmp dword [esi + 0x4230c0], ebx
jne 0x403a9a
mov eax, 0x41d940
jmp 0x403c0d
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 0x403b4a
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.00414f32
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 0x403b41
call edi
test eax, eax
jne 0x403b41
mov eax, dword [esi + 0x4230cc]
test eax, eax
je 0x403b36
mov edi, dword [ebp - 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x403b33
push dword [esi + 0x4230cc]
call fcn.00414eae
mov dword [esi + 0x4230cc], edi
jmp 0x403b49
push edi
jmp 0x403b44
mov eax, dword [ebp - 8]
mov dword [esi + 0x4230cc], eax
jmp 0x403b4a
push dword [ebp - 8]
call fcn.00414eae
pop ecx
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [esi + 0x4230cc]
test eax, eax
jne 0x403c0c
mov ebx, dword [esi + 0x4230c4]
cmp dword [esi + 0x4230c8], eax
je 0x403b82
call fcn.004039f7
cmp eax, dword [0x41e878]
jne 0x403b82
mov ebx, dword [esi + 0x4230c8]
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.00414f32
cmp dword [0x423088], 0xffffffff
pop ecx
mov dword [esi + 0x4230cc], eax
jne 0x403bec
and dword [0x423088], 0
push 0x1f
lea eax, [ebp - 0xa4]
push eax
movzx eax, word [0x4241ec]
push 0x1004
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
jle 0x403bec
lea eax, [ebp - 0xa4]
push eax
call fcn.004150ec
pop ecx
mov dword [0x423088], eax
lea eax, [edi + 1]
push eax
push dword [esi + 0x4230cc]
push edi
push ebx
push 0
push dword [0x423088]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov eax, dword [esi + 0x4230cc]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x403f9a
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, 0x25c
push ebx
push esi
push edi
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.0041118d
push 0x41dbf8
lea ecx, [ebp - 0xc]
call fcn.0041122c
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 0x404076
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.004111c6
push 0x5c
lea ecx, [ebp - 0xc]
call fcn.0040164b
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0xc]
call fcn.0041122c
test byte [ebp - 0x25c], 0x10
je 0x404041
push 0x41dbf4
lea eax, [ebp - 0x230]
push eax
call edi
test eax, eax
je 0x404059
push 0x41dbec
lea eax, [ebp - 0x230]
push eax
call edi
test eax, eax
je 0x404059
push dword [ebp - 0xc]
call fcn.00403f9a
pop ecx
jmp 0x404055
push 0
push dword [ebp - 0xc]
call esi
test eax, eax
je 0x4040a7
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
je 0x4040a7
lea eax, [ebp - 0x25c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x403fe5
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
push dword [0x42425c]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
push dword [ebp + 8]
call esi
test eax, eax
je 0x4040a7
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4040a7
push dword [ebp - 0xc]
call fcn.00414eae
xor eax, eax
inc eax
jmp 0x4040b1
push dword [ebp - 0xc]
call fcn.00414eae
xor eax, eax
pop ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4040b7
Capabilities:
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
cmp dword [0x424398], 0
je 0x4040ce
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 0x4040ea
xor eax, eax
inc eax
jmp 0x40411b
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test byte [ebp - 0x250], 0x10
jne 0x404114
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test eax, eax
je 0x404110
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x40411b
xor eax, eax
jmp 0x40411b
push esi
call fcn.00403f9a
pop ecx
pop esi
leave
ret
Function at 0x404661
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ecx, esi
call fcn.00410d24
push 2
mov ecx, esi
call fcn.004045af
mov edi, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push eax
push 1
call edi
and dword [esi + 4], 0
mov ecx, dword [esi]
xor edx, edx
mov word [ecx], dx
test eax, eax
je 0x4046aa
lea ebx, [eax + 1]
push ebx
mov ecx, esi
call fcn.004045af
push eax
push ebx
call edi
mov ecx, esi
call fcn.00404594
mov eax, dword [esi + 4]
and dword [ebp + 8], 0
lea ebx, [eax + 0xf]
lea edi, [eax + eax]
push ebx
mov ecx, esi
call fcn.004045af
push dword [ebp + 8]
add eax, edi
push dword [ebp + 0xc]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
mov ecx, esi
call fcn.00404594
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4046f1
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xfff
jl 0x4046b7
pop edi
mov eax, esi
pop esi
pop ebx
pop ebp
ret

Function at 0x404a61
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 esi, eax
mov dword [ebp - 4], eax
call fcn.0041118d
push 0
lea ecx, [ebp - 0x18]
call fcn.004045af
mov edi, eax
movzx eax, word [ebx + esi*2 - 2]
cmp eax, 0x5c
je 0x404a9d
cmp eax, 0x2f
jne 0x404acb
xor eax, eax
mov word [edi + esi*2 - 2], ax
dec esi
mov dword [ebp - 4], esi
jmp 0x404acb
movzx eax, word [edi + esi*2]
cmp eax, 0x2f
je 0x404abd
cmp eax, 0x5c
je 0x404abd
dec esi
test esi, esi
jg 0x404aaa
test esi, esi
je 0x404b6f
xor eax, eax
mov word [edi + esi*2], ax
push edi
call fcn.004031fa
pop ecx
test eax, eax
je 0x404ab9
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 0x404b02
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.004047ca
pop ecx
pop ecx
test eax, eax
je 0x404b02
xor esi, esi
jmp 0x404b92
push edi
call fcn.004031fa
pop ecx
test eax, eax
jne 0x404b5c
push edi
push 0xc
push 1
call fcn.00409899
add esp, 0xc
jmp 0x404afb
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 fcn.00415500
xor ecx, ecx
add esp, 0xc
cmp word [ebx], cx
je 0x404b4e
jmp 0x404b4d
movzx eax, word [edi + esi*2]
cmp eax, 0x5c
je 0x404b54
cmp eax, 0x2f
je 0x404b54
inc esi
cmp word [edi + esi*2], cx
jne 0x404b3f
xor eax, eax
mov word [edi + esi*2], ax
jmp 0x404b02
cmp esi, dword [ebp - 4]
jl 0x404b1c
push dword [ebp - 0x18]
call fcn.00414eae
xor eax, eax
pop ecx
inc eax
jmp 0x404bb6
cmp dword [ebp - 4], 2
jne 0x404b9f
mov ax, word [ebx]
or ax, 0x20
cmp ax, 0x61
jb 0x404b9f
cmp ax, 0x7a
ja 0x404b9f
cmp word [ebx + 2], 0x3a
jne 0x404b9f
xor esi, esi
inc esi
push dword [ebp - 0x18]
call fcn.00414eae
pop ecx
mov eax, esi
jmp 0x404bb6
push ebx
push 0xc
push 1
call fcn.00409899
push dword [ebp - 0x18]
call fcn.00414eae
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4050e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
push edi
push 1
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
call esi
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov edi, eax
call fcn.00410d24
lea eax, [edi + 2]
push eax
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.004045af
inc edi
push edi
push dword [ebp + 8]
mov ecx, ebx
call fcn.004045af
push eax
push dword [ebp + 0xc]
call esi
mov ecx, ebx
call fcn.00404594
pop edi
pop esi
mov eax, ebx
pop ebx
leave
ret

Function at 0x4055b3
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 [0x4241f8], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call fcn.00409d60
call fcn.004039f7
push 3
call fcn.00403a52
push 0x28
mov dword [0x424220], eax
call fcn.00403a52
push 2
mov dword [0x42421c], eax
call fcn.00403a52
push 5
mov dword [0x424218], eax
call fcn.00403a52
push 0x15
mov dword [0x424214], eax
call fcn.00403a52
push 0x16
mov dword [0x424210], eax
call fcn.00403a52
push 0x17
mov dword [0x42420c], eax
call fcn.00403a52
xor ebx, ebx
add esp, 0x1c
mov dword [0x424208], eax
mov dword [0x424200], ebx
mov dword [0x424204], 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 0x4056a7
push edi
lea eax, [ebp - 0x5c]
push 0x41e930
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.00405132
add esp, 0x18
xor esi, esi
cmp dword [esi + 0x4233c4], edi
jne 0x40569f
push ebx
lea eax, [ebp - 0x268]
push eax
push dword [esi + 0x4233c8]
call fcn.00405132
add esp, 0xc
add esi, 8
cmp esi, 0x28
jb 0x405681
inc edi
cmp edi, 0x40
jl 0x405646
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405c40
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
cmp dword [0x424360], esi
jle 0x405c94
mov eax, dword [0x42435c]
mov eax, dword [eax + esi*4]
add eax, 0xc
push eax
lea ecx, [ebp - 0xc]
call fcn.00410d48
lea eax, [ebp - 0xc]
push eax
call fcn.004056e9
mov eax, dword [0x42435c]
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 fcn.00414eae
inc esi
pop ecx
cmp esi, dword [0x424360]
jl 0x405c51
pop esi
leave
ret
Function at 0x405f51
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, 0x30
cmp word [eax + 2], 0x3a
push ebx
push edi
jne 0x406105
movzx ecx, word [eax + 4]
cmp ecx, 0x5c
je 0x405f79
cmp ecx, 0x2f
jne 0x406105
mov ax, word [eax]
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 3
je 0x405fab
push dword [ebp + 8]
jmp 0x406106
lea eax, [ebp - 0x24]
push str.7ZSfx_03x.cmd
push eax
call fcn.00404661
pop ecx
pop ecx
xor eax, eax
push eax
push 0x80
push 2
push eax
push eax
push 0x40000000
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4060cd
push esi
lea ecx, [ebp - 0x18]
call fcn.00410d24
push str.:Repeat_r_n
lea ecx, [ebp - 0x18]
call fcn.004111c6
mov edi, str.del__
push edi
lea ecx, [ebp - 0x18]
call fcn.0041122c
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.00410dd5
mov esi, 0x41ea50
push esi
lea ecx, [ebp - 0x18]
call fcn.0041122c
push str.if_exist__
lea ecx, [ebp - 0x18]
call fcn.0041122c
lea eax, [ebp + 8]
push eax
lea ecx, [ebp - 0x18]
call fcn.00410dd5
push str.__goto_Repeat_r_n
lea ecx, [ebp - 0x18]
call fcn.0041122c
push edi
lea ecx, [ebp - 0x18]
call fcn.0041122c
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x18]
call fcn.00410dd5
push esi
lea ecx, [ebp - 0x18]
call fcn.0041122c
mov esi, dword [ebp - 0x14]
push 1
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x30]
push eax
call fcn.00404742
mov eax, dword [eax]
add esp, 0xc
xor edi, edi
push edi
lea ecx, [ebp - 4]
push ecx
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x30]
mov esi, eax
call fcn.00414eae
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
pop esi
je 0x4060e0
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x14]
jne 0x4060e0
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push edi
push edi
push edi
push dword [ebp - 0x24]
push str.open
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push dword [ebp - 0x18]
call fcn.00414eae
pop ecx
push dword [ebp - 0x24]
call fcn.00414eae
push dword [ebp + 8]
call fcn.00414eae
pop ecx
jmp 0x40610b
push dword [ebp - 0x24]
call fcn.004040b7
push dword [ebp - 0x18]
call fcn.00414eae
push dword [ebp - 0x24]
call fcn.00414eae
push dword [ebp + 8]
call fcn.00414eae
add esp, 0x10
jmp 0x40610c
push eax
call fcn.00414eae
pop ecx
pop edi
pop ebx
leave
ret