joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10084d8
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes
Write file on windows

Disassembly:
push 0x124
push 0x1001a28
call fcn.010070d8
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov eax, dword [ebp + 0xc]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x10084f2
sub eax, ecx
cmp eax, 0x104
jae 0x1008586
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x120]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
cmp cl, bl
jne 0x1008511
lea eax, [ebp - 0x120]
push eax
call fcn.0100774e
mov edi, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [esi]
lea ecx, [eax + 1]
mov dword [esi], ecx
push eax
push 0x1001a10
push edi
call sub.ntdll.dll_sprintf
add esp, 0xc
push 0x80
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x100852c
lea eax, [ebp - 0x120]
push eax
push dword [ebp + 8]
call fcn.01003cd3
test eax, eax
jne 0x100858d
xor eax, eax
jmp 0x100868a
lea eax, [ebp - 0x124]
push eax
lea eax, [ebp - 0x128]
push eax
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.0100d3fe
cmp eax, ebx
je 0x100867a
push ebx
push 0x80000080
push 4
push ebx
push 3
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [ebp - 0x130], edi
cmp edi, 0xffffffff
je 0x1008669
push ebx
push ebx
push dword [ebp - 0x12c]
push edi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call esi
cmp eax, dword [ebp - 0x12c]
jne 0x1008662
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
je 0x1008662
push ebx
push ebx
push ebx
push edi
call esi
test eax, eax
jne 0x1008662
mov dword [ebp - 4], ebx
mov dword [ebp - 0x134], ebx
push ebx
lea eax, [ebp - 0x134]
push eax
push dword [ebp - 0x12c]
push dword [ebp - 0x124]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x100864b
mov eax, dword [ebp - 0x134]
cmp eax, dword [ebp - 0x12c]
jne 0x100864b
mov dword [ebp - 0x1c], 1
or dword [ebp - 4], 0xffffffff
jmp 0x1008662
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x124]
push dword [ebp - 0x128]
call fcn.0100832c
lea eax, [ebp - 0x120]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x1c]
call fcn.01007111
ret 0xc
Function at 0x10086f8
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push edi
push dword [ebp + 8]
and byte [ebp - 0xc], 0
and byte [ebp - 0xb], 0
and byte [ebp - 0xa], 0
and byte [ebp - 9], 0
and byte [ebp - 8], 0
xor edi, edi
push edi
push edi
push edi
push edi
push edi
push edi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0xc]
push eax
mov byte [ebp - 7], 5
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x1008750
lea eax, [ebp + 8]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x1008757
xor eax, eax
jmp 0x1008812
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
push esi
lea eax, [ebp - 4]
push eax
push 0xfffa
push 0x10339e0
push 4
push dword [ebp + 8]
call ebx
test eax, eax
jne 0x100877f
xor eax, eax
jmp 0x1008810
push dword [0x10339e0]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call sub.msvcrt.dll_malloc
cmp eax, edi
pop ecx
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
je 0x10087ec
mov ecx, esi
mov esi, dword [0x10339e0]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 4]
push eax
push 0xfffa
push 0x10339e0
and ecx, 3
push 1
rep movsb byte es:[edi], byte [esi]
push dword [ebp + 8]
call ebx
test eax, eax
je 0x1008778
push dword [0x10339e0]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, eax
push esi
call sub.msvcrt.dll_malloc
test eax, eax
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
jne 0x10087f5
push 8
call fcn.01003bbf
jmp 0x1008778
mov ecx, esi
mov esi, dword [0x10339e0]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
inc eax
pop esi
pop ebx
pop edi
leave
ret 0xc
Function at 0x1008817
Capabilities:
Extract resource via kernel32 functions
Get file version info

Disassembly:
push 0x2c
push 0x1001a68
call fcn.010070d8
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov edi, dword [ebp + 0xc]
cmp edi, ebx
jne 0x100883c
xor eax, eax
jmp 0x10089c0
mov dword [edi], ebx
push ebx
push ebx
push 3
push ebx
push 1
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x1008981
push ebx
push ebx
push ebx
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0x1c], eax
cmp eax, ebx
je 0x1008981
push ebx
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFileEx]
mov dword [ebp - 0x20], eax
cmp eax, ebx
je 0x1008981
mov esi, eax
or esi, 1
mov dword [ebp - 4], ebx
push 0x10
push 1
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov dword [ebp - 0x2c], eax
cmp eax, ebx
jne 0x10088f3
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
mov dword [ebp - 0x34], esi
cmp esi, ebx
jne 0x10088d5
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1008937
push 0x714
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x1008937
push esi
call sub.msvcrt.dll_malloc
pop ecx
mov dword [edi], eax
cmp eax, ebx
je 0x1008937
push eax
push esi
push ebx
push dword [ebp + 8]
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x1008937
jmp 0x1008930
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
mov dword [ebp - 0x38], esi
cmp esi, ebx
je 0x1008937
movzx eax, word [esi]
mov ecx, eax
shr ecx, 1
add ecx, eax
push ecx
call sub.msvcrt.dll_malloc
pop ecx
mov dword [edi], eax
cmp eax, ebx
je 0x1008937
movzx ecx, word [esi]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x24], 1
or dword [ebp - 4], 0xffffffff
jmp 0x1008981
cmp dword [ebp - 0x28], ebx
je 0x100898f
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1c], ebx
je 0x100899d
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x20], ebx
je 0x10089ab
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edi, dword [edi]
cmp edi, ebx
je 0x10089bd
cmp dword [ebp - 0x24], ebx
jne 0x10089bd
push edi
call sub.msvcrt.dll_free
pop ecx
mov eax, dword [ebp - 0x24]
call fcn.01007111
ret 8
Function at 0x10089c8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
push edi
push 0xa
pop ecx
mov esi, 0x1001a80
lea edi, [ebp - 0x48]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x1001a74
lea edi, [ebp - 0x1c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
movsw word es:[edi], word [esi]
lea eax, [ebp - 0x48]
push eax
push 0x80000002
movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x1008a43
push 4
pop esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 4]
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
jne 0x1008a43
cmp dword [ebp - 0xc], esi
jne 0x1008a43
mov eax, dword [ebp - 0x10]
jmp 0x1008a45
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x1008a49
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
lea eax, [ebp - 4]
push eax
push 0x20019
xor edi, edi
push edi
push dword [ebp + 8]
xor ebx, ebx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1008a74
xor eax, eax
jmp 0x1008ad7
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp + 8]
push eax
push edi
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
mov dword [ebp + 8], edi
push dword [ebp - 4]
call esi
cmp eax, edi
je 0x1008a9b
cmp eax, 0xea
jne 0x1008ac9
push dword [ebp + 8]
call sub.msvcrt.dll_malloc
mov ebx, eax
cmp ebx, edi
pop ecx
je 0x1008acb
lea eax, [ebp + 8]
push eax
push ebx
lea eax, [ebp - 8]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp - 4]
call esi
test eax, eax
je 0x1008ac9
push ebx
call sub.msvcrt.dll_free
pop ecx
jmp 0x1008acb
mov edi, ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop esi
pop edi
pop ebx
leave
ret 8
Function at 0x10091de
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
push esi
mov esi, dword [ebp + 8]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x10091f0
sub eax, edx
cmp eax, 0x103
jbe 0x1009204
xor eax, eax
jmp 0x1009267
test esi, esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
je 0x100925e
push edi
push 0x100200c
push esi
call sub.ntdll.dll_strstr
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x1009256
mov esi, dword [ebp + 8]
push dword [ebp + 0xc]
sub eax, esi
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [ebp - 0x108]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
and byte [ebp + eax - 0x108], 0
lea eax, [ebp - 0x108]
push eax
call ebx
inc dword [ebp - 4]
mov esi, dword [ebp - 4]
test esi, esi
jne 0x1009210
pop edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call ebx
pop ebx
pop esi
leave
ret 8

Function at 0x100926c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
and dword [ebp - 4], 0
push esi
push dword [ebp + 8]
mov esi, 0x10339e0
push dword [ebp + 0xc]
push 0x100202c
push esi
call sub.ntdll.dll_sprintf
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x10092a4
xor eax, eax
inc eax
jmp 0x1009311
push edi
push 0x104
lea eax, [ebp - 0x220]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
lea edi, [ebp - 0x18]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
lea eax, [ebp - 0x220]
push 0x1002010
mov esi, 0x10239e0
push esi
mov dword [ebp - 0x18], 0x14
mov dword [ebp - 0x14], 4
mov dword [ebp - 8], eax
call sub.ntdll.dll_sprintf
add esp, 0xc
push esi
call fcn.01008343
mov eax, dword [0x1021624]
test eax, eax
pop edi
je 0x100930f
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp - 0x18]
push ecx
call eax
jmp 0x1009311
xor eax, eax
pop esi
leave
ret 8
Function at 0x1009445
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x14
push 0x1002060
call fcn.010070d8
xor esi, esi
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp + 0xc]
cmp eax, esi
je 0x100945f
mov dword [eax], esi
mov eax, dword [ebp + 8]
cmp eax, esi
je 0x1009468
mov dword [eax], esi
lea eax, [ebp - 0x20]
push eax
push 1
push esi
push 0x10019d0
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov dword [ebp - 0x24], eax
cmp eax, esi
jne 0x100951c
mov dword [ebp - 4], esi
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
push esi
mov ebx, 0x1002040
push ebx
push dword [ebp - 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
call edi
mov dword [ebp - 0x24], eax
cmp eax, esi
jne 0x10094f4
push dword [ebp - 0x1c]
call sub.msvcrt.dll_malloc
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
cmp eax, esi
jne 0x10094c7
mov dword [ebp - 0x24], 8
jmp 0x1009513
lea ecx, [ebp - 0x1c]
push ecx
push eax
push esi
push esi
push ebx
push dword [ebp - 0x20]
call edi
mov dword [ebp - 0x24], eax
cmp eax, esi
je 0x10094ea
mov edi, dword [ebp + 8]
push dword [edi]
call sub.msvcrt.dll_free
pop ecx
mov dword [edi], esi
jmp 0x1009513
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp + 0xc]
mov dword [ecx], eax
jmp 0x1009513
cmp eax, 2
je 0x10094fe
cmp eax, 3
jne 0x1009513
push 1
call sub.msvcrt.dll_malloc
pop ecx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov eax, dword [ebp + 0xc]
mov dword [eax], esi
mov dword [ebp - 0x24], esi
or dword [ebp - 4], 0xffffffff
call fcn.01009536
push dword [ebp - 0x24]
call fcn.01003bbf
xor eax, eax
cmp dword [ebp - 0x24], esi
sete al
call fcn.01007111
ret 8
Function at 0x10098cc
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Query environment variable

Disassembly:
sub esp, 0x158
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x18]
push eax
push 0
push dword [esp + 0x178]
mov dword [esp + 0x1c], 1
push dword [esp + 0x178]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
mov ebx, 0x10239e0
mov esi, 0x10339e0
mov ebp, 0x10229c0
test eax, eax
je 0x1009aba
mov edi, dword [sym.imp.SETUPAPI.dll_SetupGetStringFieldA]
push 0
push 0x104
push ebx
push 1
lea eax, [esp + 0x28]
push eax
call edi
test eax, eax
je 0x1009a7a
push 0
push 0x104
push esi
push 2
lea eax, [esp + 0x28]
push eax
call edi
test eax, eax
je 0x1009a7a
push 0x1002154
push ebx
call sub.ntdll.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x1009968
push 0x1000
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
jmp 0x10099b1
push 0x1002140
push ebx
call sub.ntdll.dll__strcmpi
test eax, eax
pop ecx
pop ecx
jne 0x1009991
push eax
push 0x1000
push ebp
push esi
push eax
push dword [esp + 0x180]
call dword [sym.imp.SETUPAPI.dll_SetupGetTargetPathA]
jmp 0x10099b1
and dword [esp + 0x10], 0
and byte [0x10229c0], 0
push 0x1002124
call fcn.01008343
push 0x4c7
call fcn.01003bbf
cmp dword [esp + 0x10], 1
jne 0x1009a7a
xor eax, eax
mov ecx, 0x3ffe
mov edi, esi
push ebp
rep stosd dword es:[edi], eax
push 0x100211c
push 0xfff9
push esi
stosw word es:[edi], ax
call sub.ntdll.dll__snprintf
add esp, 0x10
lea eax, [esp + 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x14], eax
je 0x1009a43
test byte [esp + 0x28], 0x10
jne 0x1009a26
xor eax, eax
mov ecx, 0x3ffe
mov edi, esi
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x54]
push eax
push ebp
push 0x1002114
push 0xfffa
push esi
call sub.ntdll.dll__snprintf
add esp, 0x14
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea eax, [esp + 0x28]
push eax
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x10099f2
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1009a7a
mov ecx, 0x3ffe
mov edi, ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebp
push 0x10020fc
push 0xfff9
push ebx
call sub.ntdll.dll__snprintf
add esp, 0x14
push ebx
call fcn.01008343
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
xor edi, edi
test eax, eax
je 0x1009aae
push edi
push 0x104
push esi
push edi
push edi
push edi
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
test eax, eax
je 0x1009aae
xor eax, eax
inc eax
jmp 0x1009ab0
xor eax, eax
cmp dword [esp + 0x10], edi
jne 0x1009908
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x158
ret 8
Function at 0x1009acb
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34c
push ebx
push esi
push edi
mov edi, 0x104
push edi
lea eax, [ebp - 0x34c]
push eax
push 0x1002160
push dword [ebp + 8]
xor esi, esi
inc esi
call fcn.0100777d
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x34c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x1009c06
and dword [ebp - 4], 0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcmpA]
push 0x1001a08
lea eax, [ebp - 0x21c]
push eax
call esi
test eax, eax
je 0x1009be6
push 0x1001a04
lea eax, [ebp - 0x21c]
push eax
call esi
test eax, eax
je 0x1009be6
push edi
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x21c]
push eax
push dword [ebp + 8]
call fcn.0100777d
test byte [ebp - 0x248], 0x10
lea eax, [ebp - 0x108]
je 0x1009b87
push dword [ebp + 0xc]
push eax
call fcn.01009acb
cmp dword [ebp - 4], 0
jl 0x1009be6
test eax, eax
jge 0x1009be6
mov dword [ebp - 4], eax
jmp 0x1009be6
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x1009be6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x1009bcd
cmp esi, 3
je 0x1009bcd
cmp dword [ebp + 0xc], 1
jne 0x1009bcd
push 4
push 0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
cmp dword [ebp - 4], 0
jl 0x1009be6
test esi, esi
jle 0x1009be3
and esi, 0xffff
or esi, 0x80070000
mov dword [ebp - 4], esi
lea eax, [ebp - 0x248]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x1009b17
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [ebp - 4]
push 0x80
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x1009c45
test esi, esi
jl 0x1009c45
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x1009c68
cmp eax, 2
je 0x1009c68
test eax, eax
jle 0x1009c6a
and eax, 0xffff
or eax, 0x80070000
jmp 0x1009c6a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
je 0x1009c68
cmp eax, 2
je 0x1009c68
cmp dword [ebp + 0xc], 0
je 0x1009c68
push 4
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x1009c71
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push edi
lea eax, [ebp - 4]
push eax
push 0xf003f
xor edi, edi
push edi
push 0x1002198
xor ebx, ebx
push 0x80000002
inc ebx
mov dword [ebp - 4], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x1009ca3
xor eax, eax
jmp 0x1009d05
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
push 0x1002190
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1009ce5
push dword [ebp - 8]
lea eax, [ebp - 0xc]
push eax
push 4
push edi
push 0x1002180
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x1009ce7
xor ebx, ebx
cmp dword [ebp - 4], edi
je 0x1009cf5
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, edi
jne 0x1009d03
push 0x1002168
call fcn.01008343
mov eax, ebx
pop edi
pop ebx
leave
ret

Function at 0x1009d66
Capabilities:
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push edi
xor edi, edi
push 0x2000
mov dword [ebp - 4], edi
call sub.msvcrt.dll_malloc
mov ebx, eax
cmp ebx, edi
pop ecx
jne 0x1009d8d
push 8
call fcn.01003bbf
jmp 0x1009db2
push esi
lea eax, [ebp - 0x18]
push eax
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.SETUPAPI.dll_SetupFindFirstLineA]
test eax, eax
jne 0x1009dbd
mov dword [ebp - 4], 1
push ebx
call sub.msvcrt.dll_free
pop ecx
pop esi
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret 0xc
xor edi, edi
push edi
mov esi, 0x1000
push esi
push ebx
push edi
push edi
push edi
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupGetLineTextA]
test eax, eax
je 0x1009daa
lea eax, [ebp + 0xc]
push eax
push ebx
lea edi, [ebx + 0x1000]
push edi
mov dword [ebp + 0xc], esi
call fcn.01009d09
test eax, eax
je 0x1009e4f
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x1009e4f
cmp eax, esi
ja 0x1009e4f
mov eax, ebx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1009e04
sub eax, esi
push 0
lea edi, [eax + ebx]
lea ecx, [ebp - 8]
push ecx
add eax, 2
push eax
mov esi, 0x1001430
movsw word es:[edi], word [esi]
push ebx
push dword [ebp + 0x10]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1009daa
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.SETUPAPI.dll_SetupFindNextLine]
test eax, eax
jne 0x1009dbb
jmp 0x1009da3
push 0x7a
call fcn.01003bbf
jmp 0x1009daa
Function at 0x100a10e
Capabilities:
Delete registry key

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push edi
lea eax, [ebp - 4]
push eax
push 0x2001f
push 0
push 0x1002230
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test edi, edi
jne 0x100a14c
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push edi
push dword [ebp + 8]
mov esi, 0x10339e0
push 0x1002200
push esi
call sub.ntdll.dll_sprintf
add esp, 0x10
push esi
call fcn.01008343
xor eax, eax
test edi, edi
pop edi
sete al
pop esi
leave
ret 4