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

Disassembly:
push ecx
push edi
xor edi, edi
cmp dword [0x42f118], edi
mov dword [0x42f0ec], 2
je 0x401a32
mov ecx, dword [0x42f0f0]
push ebx
push ebp
push esi
mov esi, 0x7fff
mov ebx, 0x3ff
movzx eax, byte [ecx + 0x45bad2]
mov edx, dword [0x42f0f8]
and eax, esi
and edx, ebx
mov ebp, ecx
shl edx, 5
xor eax, edx
and ebp, esi
movzx edx, word [eax*2 + 0x44bad0]
mov dword [0x42f0f8], eax
lea eax, [eax*2 + 0x44bad0]
mov word [ebp*2 + 0x43bad0], dx
test edx, edx
mov word [eax], cx
je 0x4018fa
mov eax, ecx
sub eax, edx
cmp eax, 0x7efa
ja 0x4018fa
push edx
call fcn.004013ce
mov edi, eax
mov eax, dword [0x42f118]
cmp edi, eax
pop ecx
jbe 0x4018f4
mov edi, eax
mov ecx, dword [0x42f0f0]
cmp edi, 3
jb 0x40199b
sub ecx, dword [0x42f110]
lea eax, [edi - 3]
push eax
push ecx
call fcn.00403af8
sub dword [0x42f118], edi
cmp edi, dword [0x42f0f4]
pop ecx
mov dword [esp + 0x14], eax
pop ecx
ja 0x40196d
mov ecx, dword [0x42f0f0]
dec edi
movzx eax, byte [ecx + 0x45bad3]
mov edx, dword [0x42f0f8]
inc ecx
and edx, ebx
and eax, esi
shl edx, 5
xor eax, edx
mov dword [0x42f0f8], eax
mov bp, word [eax*2 + 0x44bad0]
lea edx, [eax*2 + 0x44bad0]
mov eax, ecx
and eax, esi
dec edi
mov word [eax*2 + 0x43bad0], bp
mov word [edx], cx
jne 0x40192e
jmp 0x4019bc
mov ecx, dword [0x42f0f0]
add ecx, edi
xor edi, edi
mov dword [0x42f0f0], ecx
movzx eax, byte [ecx + 0x45bad0]
movzx edx, byte [ecx + 0x45bad1]
and eax, ebx
and edx, esi
shl eax, 5
xor eax, edx
mov dword [0x42f0f8], eax
jmp 0x4019c3
movzx eax, byte [ecx + 0x45bad0]
push eax
push 0
call fcn.00403af8
dec dword [0x42f118]
pop ecx
pop ecx
mov dword [esp + 0x10], eax
mov ecx, dword [0x42f0f0]
inc ecx
mov dword [0x42f0f0], ecx
cmp dword [esp + 0x10], 0
je 0x4019f7
mov eax, dword [0x42f114]
test eax, eax
jl 0x4019db
lea edx, [eax + 0x45bad0]
jmp 0x4019dd
xor edx, edx
sub ecx, eax
push 0
push ecx
push edx
call fcn.004032ff
mov ecx, dword [0x42f0f0]
add esp, 0xc
mov dword [0x42f114], ecx
mov ebp, 0x106
cmp dword [0x42f118], ebp
jae 0x401a20
cmp dword [0x42f0fc], 0
jne 0x401a20
call fcn.0040150b
cmp dword [0x42f118], ebp
mov ecx, dword [0x42f0f0]
jb 0x401a04
cmp dword [0x42f118], 0
jne 0x401898
pop esi
pop ebp
pop ebx
jmp 0x401a38
mov ecx, dword [0x42f0f0]
mov edx, dword [0x42f114]
pop edi
test edx, edx
jl 0x401a4b
lea eax, [edx + 0x45bad0]
jmp 0x401a4d
xor eax, eax
sub ecx, edx
push 1
push ecx
push eax
call fcn.004032ff
add esp, 0x10
ret

Function at 0x4050f3
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x405100
or eax, 0xffffffff
jmp 0x40512e
cmp dword [esp + 8], 0
mov eax, dword [0x42c4a4]
je 0x40512e
push esi
movzx esi, byte [ecx]
mov edx, eax
and edx, 0xff
xor edx, esi
shr eax, 8
mov edx, dword [edx*4 + 0x42c4a8]
xor eax, edx
inc ecx
dec dword [esp + 0xc]
jne 0x40510d
pop esi
mov dword [0x42c4a4], eax
not eax
ret
Function at 0x40521c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
lea eax, [ebp + 0x10]
push 0
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40523d
call fcn.00405411
mov eax, dword [0x47f768]
mov ecx, dword [0x480274]
add eax, dword [ebp + 0x10]
mov dword [0x47f768], eax
lea edx, [eax - 0x8400]
cmp edx, ecx
jle 0x405276
cmp byte [0x4802fa], 0
je 0x405276
sub eax, ecx
push eax
call fcn.004159bc
mov eax, dword [0x47f768]
pop ecx
mov dword [0x480274], eax
pop ebp
ret
Function at 0x406ae7
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
push 0x10
lea eax, [ebp - 0x2c]
push 0
push eax
or esi, 0xffffffff
call fcn.00425010
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
je 0x406b9d
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
push ebx
mov dword [ebp - 4], 0xa
lea eax, [ebp - 0x14]
push eax
call edi
mov eax, 0x80000000
mov bx, 0xfa0
bsf ecx, eax
dec bx
jne 0x406b31
lea eax, [ebp - 0xc]
push eax
call edi
mov eax, dword [ebp - 0xc]
sub eax, dword [ebp - 0x14]
cmp eax, esi
jae 0x406b4a
mov esi, eax
dec dword [ebp - 4]
jne 0x406b22
mov ecx, dword [ebp - 0x1c]
push 0xa
mov eax, ecx
xor edx, edx
pop edi
imul esi, esi, 0x186a0
div edi
xor edx, edx
pop ebx
mov edi, eax
mov eax, esi
div edi
xor edx, edx
mov esi, eax
div ecx
shr ecx, 1
cmp edx, ecx
jbe 0x406b77
inc esi
mov edi, dword [ebp + 0xc]
xor edx, edx
mov eax, edi
div esi
xor edx, edx
mov ecx, eax
mov eax, edi
div esi
mov eax, esi
mov dword [ebp - 0x24], ecx
shr eax, 1
cmp edx, eax
jbe 0x406b94
inc ecx
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 8]
lea esi, [ebp - 0x2c]
mov edi, eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
leave
ret

Function at 0x406bad
Capabilities:
Check for time delay via gettickcount
Execute anti-debugging instructions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4295d8
push 0x4259f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov ebx, eax
mov dword [ebp - 0x30], ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetThreadPriority]
mov dword [ebp - 0x24], eax
push 0xf
push ebx
mov edi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [ebp - 0x20], eax
call esi
sub eax, dword [ebp - 0x20]
je 0x406bfe
call esi
mov dword [ebp - 0x20], eax
and dword [ebp - 4], 0
rdtsc
mov dword [ebp - 0x1c], eax
or dword [ebp - 4], 0xffffffff
push dword [ebp - 0x24]
push ebx
call edi
push 0x3c
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0xf
push ebx
call edi
call esi
mov dword [ebp - 0x2c], eax
call esi
sub eax, dword [ebp - 0x2c]
je 0x406c2f
call esi
mov esi, eax
rdtsc
mov dword [ebp - 0x34], eax
push dword [ebp - 0x24]
push ebx
call edi
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x1c]
sub esi, dword [ebp - 0x20]
xor edx, edx
div esi
mov esi, eax
xor edx, edx
mov ecx, 0x3e8
div ecx
mov ecx, eax
mov eax, esi
xor edx, edx
push 0x64
pop esi
div esi
lea edx, [ecx + ecx*4]
shl edx, 1
sub eax, edx
cmp eax, 5
jb 0x406c75
inc ecx
mov eax, ecx
jmp 0x406c92
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x407319
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov esi, ecx
push dword [ebp + 8]
mov dword [0x47efd4], esi
call fcn.00408577
mov ebx, eax
xor edi, edi
cmp ebx, edi
jge 0x40736b
lea ecx, [ebp - 0xc]
call fcn.0041c7ab
push ebx
lea eax, [ebp - 0xc]
push str.Load_template_failed___d_
push eax
call fcn.0041ce4d
add esp, 0xc
lea ecx, [ebp - 0xc]
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
lea ecx, [ebp - 0xc]
call fcn.0041c8e1
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 0x10]
call fcn.00409389
mov eax, dword [ebp + 0x14]
mov dword [0x47efd4], edi
cmp eax, edi
je 0x407387
mov dword [eax], esi
cmp dword [esi + 4], edi
mov dword [esi + 0x6c], eax
jne 0x407397
or eax, 0xffffffff
jmp 0x4074cb
push dword [0x47efcc]
inc dword [0x47efc4]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [0x47efc4]
push 0x42
shl eax, 2
push eax
push dword [0x47efcc]
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
push eax
mov dword [0x47efcc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp dword [0x47efcc], edi
mov dword [0x47efc8], eax
jne 0x4073ea
mov ecx, 0x47f994
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
mov eax, dword [0x47efc4]
mov ecx, dword [0x47efc8]
mov dword [ecx + eax*4 - 4], esi
mov ecx, esi
call fcn.004095a6
push edi
push edi
push 0x110
push dword [esi + 4]
call dword [sym.imp.USER32.dll_SendMessageA]
xor ebx, ebx
cmp dword [esi + 0x7c], edi
jle 0x407440
push ebx
lea ecx, [esi + 0x70]
call fcn.0041f2e9
cmp dword [eax + 0x10], 1
je 0x40742e
inc ebx
cmp ebx, dword [esi + 0x7c]
jl 0x407417
jmp 0x407440
push ebx
lea ecx, [esi + 0x70]
call fcn.0041f2e9
push dword [eax + 0x50]
call dword [sym.imp.USER32.dll_SetFocus]
mov ecx, esi
call fcn.00408161
test al, al
je 0x4074c8
push edi
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetSystemMenu]
mov ebx, eax
push edi
mov edi, dword [sym.imp.USER32.dll_DeleteMenu]
push 0xf120
push ebx
call edi
push 0
push 0xf020
push ebx
call edi
push 0
push 0xf030
push ebx
call edi
push 0
push 0xf000
push ebx
call edi
push 0x400
push 1
push ebx
call edi
mov edi, dword [sym.imp.USER32.dll_AppendMenuA]
push 0x42c9e4
push 2
push 0x800
push ebx
call edi
push str.About...
push 1
push 0
push ebx
call edi
push 1
push dword [esi + 4]
call dword [sym.imp.USER32.dll_ShowWindow]
push 1
call fcn.00407f07
pop ecx
mov dword [0x47f180], esi
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4079f3
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 0x50]
call dword [sym.imp.USER32.dll_GetFocus]
cmp eax, edi
push 0xfffffffffffffff0
push edi
sete byte [ebp - 1]
call dword [sym.imp.USER32.dll_GetWindowLongA]
mov ebx, dword [ebp + 0xc]
mov ecx, eax
mov eax, 0x8000000
push 0
and ecx, eax
pop edi
cmp ecx, eax
mov al, byte [ebx + 0x10]
sete byte [ebp + 0xb]
and al, 1
mov byte [ebp + 0xf], al
mov eax, edi
je 0x407a40
mov eax, dword [esi + 0x1c]
jmp 0x407a83
cmp byte [ebp + 0xb], 0
je 0x407a4d
mov eax, dword [esi + 0x1c]
shl eax, 1
jmp 0x407a83
mov ecx, dword [ebx + 0x10]
and ecx, 0x40
cmp cl, 0x40
jne 0x407a69
mov ecx, dword [esi + 0x1c]
lea edx, [ecx + ecx*2 + 3]
cmp dword [esi + 0x64], edx
jle 0x407a69
lea eax, [ecx + ecx*2]
jmp 0x407a83
cmp byte [ebp - 1], 0
je 0x407a83
mov ecx, dword [esi + 0x1c]
lea edx, [ecx*4 + 4]
cmp dword [esi + 0x64], edx
jle 0x407a83
mov eax, ecx
shl eax, 2
push 0xcc0020
push edi
push eax
push dword [esi + 0x5c]
push dword [esi + 0x20]
push dword [esi + 0x1c]
push edi
push edi
push dword [ebx + 0x18]
call dword [sym.imp.GDI32.dll_BitBlt]
and byte [ebp - 0xf4], 0
push 0x31
pop ecx
xor eax, eax
lea edi, [ebp - 0xf3]
push 0xc8
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0xf4]
push eax
push dword [esi + 0x50]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov edi, eax
push 1
test edi, edi
jle 0x407baa
push dword [ebx + 0x18]
call dword [sym.imp.GDI32.dll_SetBkMode]
cmp byte [ebp + 0xb], 0
je 0x407aec
push 0xa0a0a0
jmp 0x407aef
push dword [esi + 0x2c]
push dword [ebx + 0x18]
call dword [sym.imp.GDI32.dll_SetTextColor]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0xf4]
push edi
push eax
push dword [ebx + 0x18]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
push 0
push dword [ebx + 0x18]
call dword [sym.imp.GDI32.dll_SetTextAlign]
mov eax, dword [esi + 0x1c]
and dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x1c]
and dword [ebp - 0x18], 0
push 0x25
push eax
lea eax, [ebp - 0xf4]
push edi
push eax
push dword [ebx + 0x18]
call dword [sym.imp.USER32.dll_DrawTextA]
cmp byte [ebp - 1], 0
je 0x407ba8
mov eax, dword [esi + 0x1c]
lea ecx, [eax*4 + 4]
cmp dword [esi + 0x64], ecx
jg 0x407ba8
add dword [ebp - 0xc], 6
add dword [ebp - 8], 4
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp - 0xc]
cdq
sub eax, edx
sar ecx, 1
mov edi, eax
mov eax, ecx
sar edi, 1
sub eax, edi
add edi, ecx
mov dword [ebp - 0x2c], eax
mov eax, dword [esi + 0x20]
cdq
sub eax, edx
mov dword [ebp - 0x24], edi
mov esi, eax
mov eax, dword [ebp - 8]
cdq
sar esi, 1
sub eax, edx
mov edx, esi
sar eax, 1
sub edx, eax
add eax, esi
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x28], edx
push dword [ebx + 0x18]
call dword [sym.imp.USER32.dll_DrawFocusRect]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40bc80
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
lea eax, [ebp - 8]
push edi
mov esi, ecx
push eax
push 0xa
push dword [esi + 4]
call fcn.0041e62d
mov ecx, dword [ebp + 8]
add esp, 0xc
push dword [ebp - 8]
call fcn.0041c8f8
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
xor ebx, ebx
mov dword [eax], ecx
mov al, byte [ecx]
cmp al, bl
jne 0x40bcc6
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fca0
jmp 0x40be70
mov byte [ebp - 4], al
mov byte [ebp - 3], 0x3a
mov byte [ebp - 2], 0x5c
mov byte [ebp - 1], bl
cmp byte [ecx], 0x5c
mov byte [ebp + 0xb], bl
jne 0x40bd70
cmp byte [ecx + 1], 0x5c
jne 0x40bd70
mov byte [ebp + 0xb], 1
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov cl, byte [ebp + 0xb]
neg cl
sbb ecx, ecx
and ecx, 2
cmp ecx, eax
jge 0x40bded
mov edi, dword [ebp - 8]
mov dl, byte [ecx + edi]
cmp dl, 0x3a
jne 0x40bd1b
cmp ecx, 1
jne 0x40bdde
cmp dl, 0x7c
je 0x40bdde
cmp dl, 0x2a
je 0x40bdde
cmp dl, 0x2f
je 0x40bdde
cmp dl, 0x3e
je 0x40bdde
cmp dl, 0x3c
je 0x40bdde
cmp dl, 0x3f
je 0x40bdde
cmp dl, 0x22
je 0x40bdde
cmp ecx, ebx
jle 0x40bd69
cmp dl, 0x5c
jne 0x40bd69
cmp byte [ecx + edi - 1], dl
je 0x40bdcf
inc ecx
cmp ecx, eax
jl 0x40bd0a
jmp 0x40bded
lea eax, [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
mov ecx, dword [ebp - 8]
cmp byte [ecx + 1], 0x3a
jne 0x40be66
cmp byte [ecx + 2], 0x5c
jne 0x40be66
cmp eax, 1
jne 0x40bda5
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fcb8
jmp 0x40be70
cmp eax, 3
je 0x40bcee
cmp eax, 4
je 0x40bcee
cmp eax, 2
je 0x40bcee
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fcc4
jmp 0x40be70
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fcd0
jmp 0x40be70
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fcdc
jmp 0x40be70
cmp byte [ebp + 0xb], bl
jne 0x40be62
lea eax, [ebp - 4]
push 1
push eax
call fcn.0040e6f4
cmp edx, dword [0x47f6c4]
pop ecx
pop ecx
mov dword [0x47f6b8], eax
mov dword [0x47f6bc], edx
ja 0x40be62
jb 0x40be1c
cmp eax, dword [0x47f6c0]
jae 0x40be62
lea ecx, [ebp - 0x14]
call fcn.0041c7ab
lea eax, [ebp - 4]
mov ecx, 0x47fce8
push eax
call fcn.0041d704
push eax
lea eax, [ebp - 0x14]
push eax
call fcn.0041ce4d
mov esi, dword [esi + 4]
add esp, 0xc
lea ecx, [ebp - 0x14]
push ebx
push ebx
call fcn.0041d704
push eax
push esi
mov ecx, 0x47f028
call fcn.0041bcab
lea ecx, [ebp - 0x14]
call fcn.0041c8e1
jmp 0x40be81
mov al, 1
jmp 0x40be83
mov esi, dword [esi + 4]
push ebx
push ebx
mov ecx, 0x47fcac
call fcn.0041d704
push eax
push esi
mov ecx, 0x47f028
call fcn.0041bcab
xor al, al
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40be8a
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x248
mov ecx, dword [ebp + 0xc]
lea eax, [ebp - 0x144]
push eax
call fcn.0041d704
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
je 0x40bf58
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_SendDlgItemMessageA]
push edi
xor ebx, ebx
test byte [ebp - 0x144], 0x10
je 0x40bf3d
cmp byte [ebp - 0x118], 0x2e
je 0x40bf3d
cmp byte [ebp - 0x118], bl
je 0x40bf3d
push ebx
push ebx
push 0x18b
push 0xb
push dword [ebp + 8]
call esi
xor edi, edi
cmp eax, ebx
mov dword [ebp - 4], eax
jle 0x40bf29
lea eax, [ebp - 0x248]
mov byte [ebp - 0x248], bl
push eax
push edi
push 0x189
push 0xb
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x118]
push eax
lea eax, [ebp - 0x248]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40bf3d
inc edi
cmp edi, dword [ebp - 4]
jl 0x40bef1
lea eax, [ebp - 0x118]
push eax
push ebx
push 0x180
push 0xb
push dword [ebp + 8]
call esi
lea eax, [ebp - 0x144]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40bec0
pop edi
pop esi
pop ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
leave
ret 8
Function at 0x40e0af
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
and byte [ebp - 0x104], 0
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x103]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x104]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea eax, [ebp - 0x104]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
pop edi
jne 0x40e104
lea eax, [ebp - 0x104]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
leave
ret

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

Disassembly:
push esi
mov esi, dword [esp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40e121
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
pop esi
ret

Function at 0x40e12a
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
lea eax, [ebp - 8]
push esi
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
test esi, esi
jne 0x40e148
or eax, 0xffffffff
jmp 0x40e1bb
push edi
push esi
call fcn.004258e9
mov edi, eax
pop ecx
test edi, edi
jne 0x40e167
mov ecx, 0x47f994
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
push edi
push esi
push dword [ebp - 8]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40e17c
push 0xfffffffffffffffd
jmp 0x40e1b0
and dword [ebp - 4], 0
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
push 0x42cc6c
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
jne 0x40e19b
push 0xfffffffffffffffc
jmp 0x40e1b0
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
push 1
mov ecx, dword [eax + 8]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x10]
mov eax, dword [eax + 0xc]
mov dword [ecx], eax
pop esi
push edi
call fcn.004258de
pop ecx
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x40e1be
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push esi
lea eax, [ebp - 0x10]
push edi
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
xor edi, edi
cmp esi, edi
jne 0x40e1e2
or eax, 0xffffffff
jmp 0x40e35d
push ebx
push esi
call fcn.004258e9
mov ebx, eax
pop ecx
cmp ebx, edi
mov dword [ebp - 0xc], ebx
jne 0x40e204
mov ecx, 0x47f994
call fcn.0041d704
push eax
call fcn.0041e30a
pop ecx
push ebx
push esi
push dword [ebp - 0x10]
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
jne 0x40e21c
push 0xfffffffffffffffd
jmp 0x40e350
lea eax, [ebp - 8]
mov dword [ebp - 8], edi
push eax
lea eax, [ebp - 4]
push eax
push str.VarFileInfoTranslation
push ebx
call sub.VERSION.dll_VerQueryValueA
mov eax, dword [ebp - 8]
mov bl, 3
test bl, al
jne 0x40e34e
cmp eax, edi
je 0x40e34e
shr eax, 2
test eax, eax
jle 0x40e334
mov eax, dword [ebp + 0xc]
cmp eax, edi
je 0x40e260
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
mov dword [eax], ecx
lea ecx, [ebp - 0x1c]
call fcn.0041c7ab
mov eax, dword [ebp - 4]
mov esi, 0x42cd94
movzx eax, word [eax]
push eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.0041ce4d
add esp, 0xc
test byte [ebp - 0x1c], bl
je 0x40e293
push edi
push 0x30
lea ecx, [ebp - 0x1c]
call fcn.0041d3e7
jmp 0x40e281
push str.StringFileInfo_
lea ecx, [ebp - 0x28]
call fcn.0041c81b
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x28]
push eax
call fcn.0041caab
push 0x42f138
lea ecx, [ebp - 0x1c]
call fcn.0041c8f8
mov eax, dword [ebp - 4]
movzx eax, word [eax + 2]
push eax
lea eax, [ebp - 0x1c]
push esi
push eax
call fcn.0041ce4d
add esp, 0xc
test byte [ebp - 0x1c], bl
je 0x40e2e0
push edi
push 0x30
lea ecx, [ebp - 0x1c]
call fcn.0041d3e7
jmp 0x40e2ce
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x28]
push eax
call fcn.0041caab
push edi
push str.FileDescription
lea ecx, [ebp - 0x28]
call fcn.0041ca2d
lea eax, [ebp - 8]
lea ecx, [ebp - 0x28]
push eax
lea eax, [ebp + 8]
push eax
call fcn.0041d704
push eax
push dword [ebp - 0xc]
call sub.VERSION.dll_VerQueryValueA
mov ecx, dword [ebp + 0x10]
cmp ecx, edi
je 0x40e322
push dword [ebp + 8]
call fcn.0041c8f8
lea ecx, [ebp - 0x28]
call fcn.0041c8e1
lea ecx, [ebp - 0x1c]
call fcn.0041c8e1
jmp 0x40e34a
mov eax, dword [ebp + 0xc]
mov word [ebp + 8], di
cmp eax, edi
mov word [ebp + 0xa], 0x4b0
je 0x40e34a
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
push 1
jmp 0x40e350
push 0xfffffffffffffffc
pop esi
push dword [ebp - 0xc]
call fcn.004258de
pop ecx
mov eax, esi
pop ebx
pop edi
pop esi
leave
ret
Function at 0x40e7f9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call fcn.0040e3c0
test al, al
pop ecx
je 0x40e80a
xor al, al
ret
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov al, cl
ret

Function at 0x40e81f
Capabilities:
Get common file path
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
cmp esi, 2
push edi
je 0x40e8e7
cmp esi, 7
je 0x40e8e7
cmp esi, 0x10
je 0x40e8e7
cmp esi, 0x14
je 0x40e8e7
cmp esi, 0xb
je 0x40e8e7
cmp esi, 5
je 0x40e8e7
cmp esi, 0x17
je 0x40e87a
cmp esi, 0x18
je 0x40e87a
cmp esi, 0x19
je 0x40e87a
cmp esi, 0x16
jne 0x40e970
lea eax, [ebp + 8]
mov dword [ebp + 8], ebx
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e970
cmp esi, 0x18
mov dword [ebp - 8], 0x104
mov eax, str.Common_Programs
jne 0x40e8b7
mov eax, str.Common_Startup
jmp 0x40e8cd
cmp esi, 0x19
jne 0x40e8c3
mov eax, str.Common_Desktop
jmp 0x40e8cd
cmp esi, 0x16
jne 0x40e8cd
mov eax, str.Common_Start_Menu
lea ecx, [ebp - 8]
push ecx
push dword [ebp + 0xc]
push ebx
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 8]
mov edi, eax
jmp 0x40e966
lea eax, [ebp + 8]
mov dword [ebp + 8], ebx
push eax
push 0x20019
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40e970
cmp esi, 7
mov dword [ebp - 8], 0x104
mov eax, str.Programs
jne 0x40e920
mov eax, str.Startup
jmp 0x40e94e
cmp esi, 0x10
jne 0x40e92c
mov eax, str.Desktop
jmp 0x40e94e
cmp esi, 0x14
jne 0x40e938
mov eax, str.Fonts
jmp 0x40e94e
cmp esi, 0xb
jne 0x40e944
mov eax, str.Start_Menu
jmp 0x40e94e
cmp esi, 5
jne 0x40e94e
mov eax, str.Personal
lea ecx, [ebp - 8]
push ecx
push dword [ebp + 0xc]
push ebx
push ebx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp + 8]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, ebx
je 0x40e9ac
lea eax, [ebp - 4]
mov dword [ebp - 4], ebx
push eax
push esi
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40e9b0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], ebx
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x40e9ac
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov al, 1
jmp 0x40e9b2
xor al, al
pop edi
pop esi
pop ebx
leave
ret