joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402a6c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x33c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_GetFileAttributesA
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402a94
xor eax, eax
jmp 0x402c53
push 0
lea edi, [ebp - 0x110]
push edi
push 0x104
push ebx
call sub.KERNEL32.dll_GetFullPathNameA
mov ebx, eax
test ebx, ebx
je 0x402c51
cmp ebx, 0x103
jbe 0x402acc
add esp, 0xfffffff4
push 0x6f
call sub.KERNEL32.dll_SetLastError
xor ebx, ebx
jmp 0x402c51
add esp, 0xfffffff4
lea eax, [ebp - 0x324]
push eax
call sub.SHELL32.DLL_SHGetDesktopFolder
mov edx, eax
add esp, 0xc
test edx, edx
jl 0x402c51
add esp, 0xfffffff8
push 0x104
lea esi, [ebp - 0x320]
push esi
push 0xffffffffffffffff
push edi
push 0
call sub.KERNEL32.dll_AreFileApisANSI
test eax, eax
sete al
movzx eax, al
push eax
call sub.KERNEL32.dll_MultiByteToWideChar
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x402b38
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x402c40
add esp, 0xfffffff4
push 0x6f
call sub.KERNEL32.dll_SetLastError
jmp 0x402c3d
add esp, 0xfffffffc
mov edx, dword [ebp - 0x324]
mov ecx, dword [edx]
push 0
lea eax, [ebp - 0x328]
push eax
lea eax, [ebp - 0x32c]
push eax
push esi
push 0
push 0
push edx
mov eax, dword [ecx + 0xc]
call eax
mov edx, eax
add esp, 4
test edx, edx
jge 0x402b94
sar eax, 0x10
and eax, 0x1fff
cmp eax, 7
jne 0x402b80
add esp, 0xfffffff4
movzx edx, dx
push edx
jmp 0x402b85
add esp, 0xfffffff4
push 0xd
call sub.KERNEL32.dll_SetLastError
add esp, 0xc
xor ebx, ebx
jmp 0x402c40
add esp, 0xfffffff8
push edi
push dword [ebp - 0x328]
call sub.SHELL32.DLL_SHGetPathFromIDListA
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x402bc4
cmp byte [ebp - 0x110], 0
je 0x402bc4
add esp, 0xfffffff4
push 0xd
call sub.KERNEL32.dll_SetLastError
add esp, 0xc
jmp 0x402bff
add esp, 0xfffffff4
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea esi, [ebx + 1]
add esp, 0xc
cmp esi, dword [ebp + 0x10]
jbe 0x402bec
add esp, 0xfffffff4
push 0x7a
call sub.KERNEL32.dll_SetLastError
mov ebx, esi
add esp, 0xc
jmp 0x402bff
add esp, 0xfffffffc
mov eax, dword [ebp + 0x10]
push eax
push edi
push dword [ebp + 0xc]
call sub.KERNEL32.dll_lstrcpynA
add esp, 4
add esp, 0xfffffff4
lea eax, [ebp - 0x330]
push eax
call sub.SHELL32.DLL_SHGetMalloc
add esp, 0xc
test eax, eax
jl 0x402c40
add esp, 0xfffffff8
mov eax, dword [ebp - 0x330]
mov edx, dword [eax]
push dword [ebp - 0x328]
push eax
mov eax, dword [edx + 0x14]
call eax
add esp, 0xfffffffc
mov eax, dword [ebp - 0x330]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
add esp, 0xc
add esp, 0xfffffff4
mov eax, dword [ebp - 0x324]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
mov eax, ebx
lea esp, [ebp - 0x348]
pop ebx
pop esi
pop edi
leave
ret 0xc
Function at 0x402d48
Capabilities:
Delete directory
Delete file
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x415c
call fcn.004161a4
push edi
push esi
push ebx
add esp, 0xfffffffc
push 1
push 0x402d01
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strncmp
add esp, 0x10
test eax, eax
je 0x402f1e
mov edi, dword [ebp + 8]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
cmp ecx, 0xfffffffe
je 0x402f1e
add esp, 0xfffffff8
mov eax, dword [ebp + 8]
push eax
push 0x402d03
call fcn.00407210
mov edi, dword [ebp + 8]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x10
cmp ecx, 0xfffffffe
je 0x402f1e
add esp, 0xfffffff8
mov eax, dword [ebp + 8]
push eax
lea ebx, [ebp - 0x2140]
push ebx
call sub.msvcrt.dll_strcpy
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add esp, 0x10
cmp byte [ebx + ecx - 1], 0x5c
je 0x402df2
add esp, 0xfffffff8
push 0x402d0f
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x10
add esp, 0xfffffff8
push 0x402d11
push ebx
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
lea eax, [ebp - 0x140]
mov dword [ebp - 0x4148], eax
push eax
push ebx
call sub.KERNEL32.dll_FindFirstFileA
mov dword [ebp - 0x4144], eax
add esp, 0x18
cmp eax, 0xffffffff
je 0x402f1e
lea eax, [ebp - 0x114]
mov dword [ebp - 0x414c], eax
mov esi, eax
mov edi, 0x402d01
mov ecx, 2
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
je 0x402eee
mov esi, eax
mov edi, 0x402d15
mov ecx, 3
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
je 0x402eee
add esp, 0xfffffff8
mov eax, dword [ebp + 8]
push eax
lea ebx, [ebp - 0x4140]
push ebx
call sub.msvcrt.dll_strcpy
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
add esp, 0x10
cmp byte [ebx + ecx - 1], 0x5c
je 0x402e9e
add esp, 0xfffffff8
push 0x402d0f
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x10
add esp, 0xfffffff8
mov eax, dword [ebp - 0x414c]
push eax
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x10
test byte [ebp - 0x140], 0x10
je 0x402ed4
add esp, 0xfffffff8
push ebx
push 0x402d18
call fcn.00407210
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_RemoveDirectoryA
jmp 0x402eeb
add esp, 0xfffffff8
push ebx
push 0x402d30
call fcn.00407210
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_DeleteFileA
add esp, 0x1c
add esp, 0xfffffff8
mov eax, dword [ebp - 0x4148]
push eax
mov eax, dword [ebp - 0x4144]
push eax
call sub.KERNEL32.dll_FindNextFileA
add esp, 8
test eax, eax
jne 0x402e28
add esp, 0xfffffff4
mov eax, dword [ebp - 0x4144]
push eax
call sub.KERNEL32.dll_FindClose
lea esp, [ebp - 0x4168]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4030b8
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push 8
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4030e2
cmp dword [ebp - 4], 7
ja 0x403102
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x403092
call fcn.00407210
add esp, 0xfffffff4
push 0x40309c
call fcn.0040298c
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
leave
ret
Function at 0x403130
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push 4
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x40315a
cmp dword [ebp - 4], 3
ja 0x40317d
add esp, 0xfffffffc
push dword [ebp - 4]
call sub.KERNEL32.dll_GetLastError
push eax
push 0x40310a
call fcn.00407210
add esp, 0xfffffff4
push 0x403117
call fcn.0040298c
mov eax, dword [ebp - 8]
leave
ret

Function at 0x40319c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 6]
push eax
push dword [ebp + 8]
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4031c6
cmp dword [ebp - 4], 1
ja 0x4031e6
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x403092
call fcn.00407210
add esp, 0xfffffff4
push 0x403182
call fcn.0040298c
movsx eax, word [ebp - 6]
leave
ret

Function at 0x403208
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
mov ebx, dword [ebp + 8]
add esp, 0xfffffff4
push ebx
call fcn.00403130
mov esi, eax
add esp, 0xfffffff4
lea eax, [esi + 1]
push eax
call fcn.00415f94
mov edi, eax
mov byte [esi + edi], 0
add esp, 0x20
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
push ebx
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x403251
cmp dword [ebp - 4], esi
jae 0x40325e
add esp, 0xfffffff4
push 0x4031ec
call fcn.0040298c
mov eax, edi
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x403284
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push edi
push esi
push ebx
add esp, 0xfffffff4
mov eax, dword [ebp + 8]
push eax
call fcn.00403130
mov esi, eax
add esp, 0xfffffff4
shr eax, 0x1f
lea ebx, [eax + esi]
sar ebx, 1
lea eax, [ebx*2 + 2]
push eax
call fcn.00415f94
mov edi, eax
mov word [edi + ebx*2], 0
add esp, 0x20
add esp, 0xfffffff4
push 0
lea eax, [ebp - 4]
push eax
push esi
push edi
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.dll_ReadFile
add esp, 0xc
test eax, eax
je 0x4032de
cmp dword [ebp - 4], esi
jae 0x4032eb
add esp, 0xfffffff4
push 0x403268
call fcn.0040298c
mov eax, edi
lea esp, [ebp - 0x28]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4038d0
Capabilities:
Create directory
Delete directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.004161a4
push ebx
add esp, 0xfffffffc
push dword [ebp + 8]
push 0x4038bf
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__mkdir
add esp, 0x10
test eax, eax
jne 0x403939
add esp, 0xfffffff4
push ebx
call fcn.00403304
add esp, 0x10
test al, al
je 0x403930
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
mov al, 1
jmp 0x40393b
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__rmdir
mov al, 0
mov ebx, dword [ebp - 0x2018]
leave
ret
Function at 0x4039f4
Capabilities:
Create directory
Get common file path
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x400c
call fcn.004161a4
push edi
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff8
push esi
push 0x2000
call sub.KERNEL32.dll_GetTempPathA
mov ebx, eax
add esp, 0xfffffff4
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push ebx
push 0x403960
call fcn.00407210
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x28
cmp ecx, 0xfffffffe
jne 0x403a9c
add esp, 0xfffffffc
push 0x2000
push esi
push 0x403988
call sub.KERNEL32.dll_GetEnvironmentVariableA
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx + 0x1fff]
push eax
mov edi, esi
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [esi + ecx - 1]
push eax
push 0x403992
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 0xfffffffc
push esi
push 0x4039a0
call fcn.00407210
add esp, 0x10
jmp 0x403aba
test ebx, ebx
jle 0x403aba
add esp, 0xfffffff8
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll__mkdir
push eax
push 0x4039c3
call fcn.00407210
add esp, 0x20
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x2000]
push ebx
push esi
mov eax, dword [0x421020]
call eax
add esp, 0xfffffffc
push 0x3f
push ebx
call sub.msvcrt.dll_strchr
add esp, 0x10
test eax, eax
je 0x403bdc
add esp, 0xfffffff8
push 0x2000
lea ebx, [ebp - 0x4000]
push ebx
call sub.KERNEL32.dll_GetWindowsDirectoryA
add esp, 0xfffffff4
push ebx
push 0x4039d8
push esi
call sub.msvcrt.dll_sprintf
add esp, 0x20
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x10
test al, al
jne 0x403bdc
mov eax, dword [0x4039e0]
mov dword [esi], eax
mov eax, dword [0x4039e4]
mov dword [esi + 4], eax
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x10
test al, al
jne 0x403bdc
mov edi, 0x4039e8
mov eax, dword [0x4039e8]
mov dword [esi], eax
movzx eax, word [edi + 4]
mov word [esi + 4], ax
mov al, byte [edi + 6]
mov byte [esi + 6], al
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x10
test al, al
jne 0x403bdc
add esp, 0xfffffff8
push ebx
push esi
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x20
test al, al
jne 0x403bdc
mov eax, dword [0x4039ef]
mov dword [esi], eax
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x10
test al, al
je 0x403bcd
mov eax, dword [0x4039e8]
mov dword [esi], eax
movzx eax, word [edi + 4]
mov word [esi + 4], ax
mov al, byte [edi + 6]
mov byte [esi + 6], al
add esp, 0xfffffff4
push esi
call sub.msvcrt.dll__mkdir
add esp, 0xfffffff4
push esi
call fcn.004038d0
add esp, 0x20
test al, al
jne 0x403bdc
add esp, 0xfffffff8
push 0
push 0x3f7
call fcn.004029e0
lea esp, [ebp - 0x4018]
pop ebx
pop esi
pop edi
leave
ret
Function at 0x403c40
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.004161a4
push esi
push ebx
mov esi, dword [ebp + 8]
add esp, 0xfffffff4
lea ebx, [ebp - 0x2000]
push ebx
call fcn.004039f4
add esp, 0xfffffff8
push ebx
push 0x403be7
call fcn.00407210
add esp, 0x20
push esi
push 0
push 0x403bf6
push ebx
call sub.KERNEL32.dll_GetTempFileNameA
test eax, eax
jne 0x403cc2
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
push eax
push 0x403c00
call fcn.00407210
add esp, 0xfffffff4
add esp, 0xfffffff4
push 0
call sub.msvcrt.dll_time
push eax
call sub.msvcrt.dll_srand
add esp, 0x30
call sub.msvcrt.dll_rand
push eax
push ebx
push 0x403c27
push esi
call sub.msvcrt.dll_sprintf
add esp, 0x10
add esp, 0xfffffff8
push esi
push 0x403c2f
call fcn.00407210
lea esp, [ebp - 0x2018]
pop ebx
pop esi
leave
ret
Function at 0x40666c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push esi
push ebx
mov esi, 0x421030
mov edi, dword [0x421030]
jmp 0x4066dd
mov ebx, dword [esi]
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea edi, [ecx - 1]
add esp, 0xfffffff4
push ecx
call fcn.00415f94
xor edx, edx
add esp, 0x10
cmp edx, edi
jge 0x4066ba
lea esi, [esi]
mov cl, byte [edx + ebx]
xor cl, 0xbb
mov byte [edx + eax], cl
inc edx
cmp edx, edi
jl 0x4066ac
mov byte [edi + eax], 0
add esp, 0xfffffffc
push edi
push eax
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strncmp
add esp, 0x10
test eax, eax
jne 0x4066d8
mov al, 1
jmp 0x4066ee
add esi, 4
mov edi, dword [esi]
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
cmp ecx, 0xfffffffe
jne 0x406684
mov al, 0
lea esp, [ebp - 0x18]
pop ebx
pop esi
pop edi
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x406ef9
mov ecx, eax
mov eax, dword [esi]
mov dl, al
xor dl, byte [ebx]
movzx edx, dl
shr eax, 8
xor eax, dword [edx*4 + 0x42104c]
mov dword [esi], eax
inc ebx
dec ecx
jne 0x406ee0
pop ebx
pop esi
leave
ret
Function at 0x406ff4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x401c
call fcn.004161a4
push edi
push esi
push ebx
mov eax, dword [0x421854]
test eax, eax
je 0x40702c
cmp dword [0x421850], 0
jne 0x40702c
add esp, 0xfffffff8
push 0x406f9b
push eax
call sub.msvcrt.dll_fopen
mov dword [0x421850], eax
add esp, 0x10
cmp byte [0x42184c], 0
jne 0x40717c
mov byte [0x42184c], 1
mov al, byte [0x42187e]
mov byte [ebp - 0x4005], al
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x2000]
push ebx
push 0x406f9d
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 4
test eax, eax
je 0x407085
mov esi, ebx
mov edi, 0x406fa7
mov ecx, 4
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x407085
mov byte [ebp - 0x4005], 1
add esp, 0xfffffffc
push 0x2000
push ebx
push 0x406fab
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 4
test eax, eax
je 0x4070b9
mov esi, ebx
mov edi, 0x406fa7
mov ecx, 4
cld
test al, 0
repe cmpsb byte [esi], byte es:[edi]
jne 0x4070b9
mov byte [ebp - 0x4005], 1
cmp byte [ebp - 0x4005], 0
je 0x40717c
add esp, 0xfffffff8
push 0x406fb9
push 0x406fc3
call sub.msvcrt.dll__tempnam
mov dword [0x421854], eax
add esp, 0x10
test eax, eax
je 0x4070fa
add esp, 0xfffffff8
push 0x406fc7
push eax
call sub.msvcrt.dll_fopen
mov dword [0x421850], eax
add esp, 0x10
cmp dword [0x421850], 0
jne 0x40712b
mov dword [0x421854], 0x406fc9
add esp, 0xfffffff8
push 0x406fc7
push 0x406fc9
call sub.msvcrt.dll_fopen
mov dword [0x421850], eax
add esp, 0x10
test eax, eax
je 0x40717c
add esp, 0xfffffffc
push 0x2000
lea esi, [ebp - 0x4000]
push esi
push 0
call sub.KERNEL32.dll_GetModuleFileNameA
add esp, 0xfffffff8
lea ebx, [ebp - 0x4004]
push ebx
call sub.msvcrt.dll_time
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll_ctime
push eax
push esi
push 0x406fd5
push dword [0x421850]
call sub.msvcrt.dll_fprintf
add esp, 0x30
add esp, 0xfffffff4
push dword [0x421850]
call sub.msvcrt.dll_fflush
lea esp, [ebp - 0x4028]
pop ebx
pop esi
pop edi
leave
ret

Function at 0x4072fc
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2024
call fcn.004161a4
push ebx
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.004034b8
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00403860
add esp, 0xfffffff4
push 0
lea eax, [ebp - 0x2004]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x4072d4
push 0x80000001
call sub.ADVAPI32.DLL_RegCreateKeyExA
add esp, 0x1c
test eax, eax
jne 0x407389
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [ebp - 0x2008], eax
add esp, 0xfffffff8
push 4
lea eax, [ebp - 0x2008]
push eax
push 4
push 0
push ebx
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegSetValueExA
add esp, 0xfffffffc
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegCloseKey
mov ebx, dword [ebp - 0x2028]
leave
ret
Function at 0x407394
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2020
call fcn.004161a4
push esi
push ebx
add esp, 0xfffffffc
add esp, 0xfffffffe
push 0
call fcn.004034b8
push eax
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00403860
xor esi, esi
add esp, 0xfffffff4
lea eax, [ebp - 0x2004]
push eax
push 0x20019
push 0
push 0x4072d4
push 0x80000001
call sub.ADVAPI32.DLL_RegOpenKeyExA
add esp, 0x1c
test eax, eax
jne 0x40743b
mov dword [ebp - 0x2008], 4
add esp, 0xfffffff8
lea eax, [ebp - 0x2008]
push eax
lea eax, [ebp - 0x200c]
push eax
lea eax, [ebp - 0x2010]
push eax
push 0
push ebx
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegQueryValueExA
add esp, 8
test eax, eax
jne 0x40742d
cmp dword [ebp - 0x2008], 4
jne 0x40742d
mov esi, dword [ebp - 0x200c]
add esp, 0xfffffff4
push dword [ebp - 0x2004]
call sub.ADVAPI32.DLL_RegCloseKey
mov eax, esi
lea esp, [ebp - 0x2028]
pop ebx
pop esi
leave
ret
Function at 0x407e60
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2010
call fcn.004161a4
push esi
push ebx
add esp, 0xfffffff4
push 0x278b
call fcn.004019cc
add esp, 0x10
test eax, eax
je 0x407fba
cmp dword [ebp + 8], 0
jne 0x407ea8
cmp byte [0x421864], 0
je 0x407fba
mov eax, dword [0x42d158]
call eax
jmp 0x407fba
cmp byte [0x421864], 0
jne 0x407fba
add esp, 0xfffffffc
call fcn.004040ec
push eax
push 0x407d21
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff8
push ebx
push 0x407d54
call fcn.00407210
add esp, 0x20
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_LoadLibraryA
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x407f04
add esp, 0xfffffff4
push 0x407d94
call fcn.004071a4
jmp 0x407fba
add esp, 0xfffffff8
push 0x407db4
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42d158], eax
push 0x407dc0
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42d148], eax
push 0x407dcb
push ebx
call sub.KERNEL32.dll_GetProcAddress
mov dword [0x42d138], eax
add esp, 8
cmp dword [0x42d158], 0
je 0x407f51
mov edx, dword [0x42d148]
test edx, edx
je 0x407f51
test eax, eax
jne 0x407f60
add esp, 0xfffffff4
push 0x407df4
call fcn.004071a4
jmp 0x407fba
call edx
add esp, 0xfffffffc
push 0xa
push 0x2710
push 0
call sub.KERNEL32.dll_FindResourceA
mov ebx, eax
add esp, 0xfffffff8
add esp, 0xfffffffc
push ebx
push 0
call sub.KERNEL32.dll_LoadResource
push eax
call sub.KERNEL32.dll_LockResource
mov esi, eax
add esp, 0xfffffff8
push ebx
push 0
call sub.KERNEL32.dll_SizeofResource
add esp, 0xfffffffc
push eax
push esi
push ebx
push eax
push esi
mov eax, dword [0x42d138]
call eax
add esp, 8
push eax
push 0x407e34
call fcn.00407210
mov byte [0x421864], 1
lea esp, [ebp - 0x2018]
pop ebx
pop esi
leave
ret

Function at 0x409064
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4010
call fcn.004161a4
push esi
push ebx
cmp dword [0x421878], 1
jne 0x409107
mov dword [0x421878], 0
add esp, 0xfffffff4
push 0x6b
call fcn.004019cc
add esp, 0x10
cmp eax, 1
je 0x409107
add esp, 0xfffffff8
push 0x2000
lea esi, [ebp - 0x4000]
push esi
call sub.KERNEL32.dll_GetConsoleTitleA
add esp, 8
test eax, eax
je 0x409107
call sub.KERNEL32.dll_GetCurrentProcessId
push eax
call sub.KERNEL32.dll_GetTickCount
push eax
push 0x40905e
lea ebx, [ebp - 0x2000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.KERNEL32.dll_SetConsoleTitleA
add esp, 0x1c
test eax, eax
je 0x409107
add esp, 0xfffffff4
push 0x28
call sub.KERNEL32.dll_Sleep
add esp, 0xfffffff4
push ebx
push 0
call sub.USER32.dll_FindWindowA
mov dword [0x421878], eax
add esp, 0xfffffffc
push esi
call sub.KERNEL32.dll_SetConsoleTitleA
lea esp, [ebp - 0x4018]
pop ebx
pop esi
leave
ret

Function at 0x409114
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov edx, dword [ebp + 8]
movzx eax, byte [ebp + 0xc]
mov dword [0x42d178], edx
add esp, 0xfffffff8
push eax
push 0x409220
call sub.USER32.dll_EnumWindows
leave
ret
Function at 0x409460
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2014
call fcn.004161a4
push ebx
add esp, 0xfffffff4
lea ebx, [ebp - 0x2000]
push ebx
call fcn.00403c40
add esp, 0xfffffff8
push ebx
push 0x42d190
call sub.msvcrt.dll_strcpy
add esp, 0x20
add esp, 0xfffffff8
push 0x40944c
push 0x42d190
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push 0x42d190
push 0x409451
call fcn.00407210
add esp, 0x20
add esp, 0xfffffff8
push 0
push 0x42d190
call sub.KERNEL32.dll_CreateDirectoryA
add esp, 8
test eax, eax
jne 0x4094dd
add esp, 0xfffffff8
push 0x40945e
push 0x3f1
call fcn.004029e0
mov ebx, dword [ebp - 0x2018]
leave
ret

Function at 0x40954c
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
add esp, 0xfffffff4
push 0x1388
call sub.KERNEL32.dll_Sleep
add esp, 0xfffffffc
call fcn.00409adc
add esp, 0x10
test al, al
je 0x4095d1
add esp, 0xfffffffc
lea eax, [ebp - 0x14]
push eax
push 0x28
call sub.KERNEL32.dll_GetCurrentProcess
push eax
call sub.ADVAPI32.DLL_OpenProcessToken
add esp, 4
test eax, eax
je 0x4095dd
add esp, 0xfffffffc
lea ebx, [ebp - 0x10]
lea eax, [ebp - 0xc]
push eax
push 0x409538
push 0
call sub.ADVAPI32.DLL_LookupPrivilegeValueA
mov dword [ebp - 0x10], 1
mov dword [ebp - 4], 2
add esp, 0xfffffffc
push 0
push 0
push 0
push ebx
push 0
push dword [ebp - 0x14]
call sub.ADVAPI32.DLL_AdjustTokenPrivileges
add esp, 0xfffffff8
call sub.KERNEL32.dll_GetLastError
add esp, 0x10
test eax, eax
jne 0x4095dd
add esp, 0xfffffff8
push 0
push 2
call sub.USER32.dll_ExitWindowsEx
mov ebx, dword [ebp - 0x38]
leave
ret
Function at 0x409670
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8010
call fcn.004161a4
push edi
push ebx
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x6000]
push ebx
push 0x2714
call fcn.00401aa8
add esp, 0xfffffff8
push ebx
push 0x4095e2
call fcn.00407210
add esp, 0x20
add esp, 0xfffffff4
push ebx
call fcn.00405b40
add esp, 0xfffffff8
push ebx
lea ebx, [ebp - 0x4000]
push ebx
call fcn.00402fdc
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
add esp, 0x20
cmp ecx, 0xfffffffe
je 0x4096fa
mov edi, ebx
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp byte [ebx + ecx - 2], 0x3b
je 0x4096fa
add esp, 0xfffffff8
push 0x4095f7
push ebx
call sub.msvcrt.dll_strcat
add esp, 0x10
add esp, 0xfffffffc
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov eax, 0x4001
sub eax, ecx
push eax
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ebx + ecx - 1]
push eax
push 0x4095f9
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 0xfffffffc
push ebx
push 0x4095f9
call sub.KERNEL32.dll_SetEnvironmentVariableA
add esp, 8
test eax, eax
je 0x409750
add esp, 0xfffffff8
push ebx
push 0x4095fe
jmp 0x40975f
add esp, 0xfffffffc
call sub.KERNEL32.dll_GetLastError
push eax
push ebx
push 0x409634
call fcn.00407210
add esp, 0x10
add esp, 0xfffffffc
push ebx
push 0x409667
lea ebx, [ebp - 0x8000]
push ebx
call sub.msvcrt.dll_sprintf
add esp, 0xfffffff4
push ebx
call sub.msvcrt.dll__putenv
lea esp, [ebp - 0x8018]
pop ebx
pop edi
leave
ret