joyce8/EMBER2024-capa huggingface dataset:
Function at 0x12f59060
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
sub esp, 8
lea eax, [esp + 0xc]
lea ecx, [esp]
push ebx
push ebp
push esi
push edi
push 0
push 0
mov ebx, dword [esp + 0x24]
push 0
push 0
push 0
push 0
push eax
push ecx
push 0
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x12f591d8
mov eax, dword [esp + 0x10]
test eax, eax
je 0x12f591b7
mov eax, dword [esp + 0x1c]
cmp eax, 0x104
jae 0x12f590b6
mov eax, 0x104
mov dword [esp + 0x1c], eax
inc eax
push eax
call fcn.12f5c05b
mov esi, eax
add esp, 4
test esi, esi
je 0x12f591d8
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x12f591cf
mov ebp, dword [esp + 0x20]
mov eax, ebp
or eax, 0x2001f
mov dword [esp + 0x14], eax
lea ecx, [esp + 0x20]
push ecx
push eax
push 0
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x12f591cf
mov edi, dword [esp + 0x20]
test edi, edi
je 0x12f591cf
push ebp
push edi
call fcn.12f59060
add esp, 8
test eax, eax
je 0x12f591c4
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x131c88e0]
test eax, eax
je 0x12f59161
test ebp, ebp
je 0x12f59161
push 0
push ebp
push esi
push ebx
call eax
test eax, eax
jne 0x12f591cf
jmp 0x12f5916d
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x12f591cf
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
je 0x12f591ae
mov edx, dword [esp + 0x1c]
xor eax, eax
mov edi, esi
lea ecx, [edx + 1]
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x1c]
inc eax
push eax
push esi
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
jne 0x12f591cf
mov eax, dword [esp + 0x14]
jmp 0x12f5910a
push esi
call fcn.12f5c050
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 8
ret
test edi, edi
je 0x12f591cf
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.12f5c050
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret

Function at 0x12f591f0
Capabilities:
Delete registry key
Delete registry value

Disassembly:
push esi
mov esi, dword [ecx]
push edi
mov edi, dword [ecx + 4]
test esi, esi
je 0x12f59259
mov eax, dword [esp + 0xc]
test eax, eax
je 0x12f59219
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne 0x12f59259
pop edi
mov eax, 1
pop esi
ret 4
push edi
push esi
call fcn.12f59060
add esp, 8
test eax, eax
je 0x12f59259
mov eax, dword [0x131c88e0]
test eax, eax
je 0x12f59246
test edi, edi
je 0x12f59246
push 0
push edi
push 0
push esi
call eax
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
ret 4
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
neg eax
sbb eax, eax
pop edi
inc eax
pop esi
ret 4
pop edi
xor eax, eax
pop esi
ret 4
Function at 0x12f593d0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edx, dword [esp + 4]
push ebx
test edx, edx
push esi
mov ebx, ecx
je 0x12f59406
mov eax, dword [ebx + 4]
mov ecx, dword [ebx]
lea esi, [esp + 0xc]
or eax, 0x20019
push esi
push eax
push 0
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov esi, eax
mov eax, dword [esp + 0xc]
neg esi
sbb esi, esi
not esi
and esi, eax
jmp 0x12f59408
mov esi, dword [ebx]
test esi, esi
je 0x12f59493
mov edx, dword [esp + 0x10]
push edi
lea eax, [esp + 0x14]
xor edi, edi
push eax
lea ecx, [esp + 0x14]
push edi
push ecx
push edi
push edx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne case.0x12f59438.2
mov eax, dword [esp + 0x18]
cmp eax, 4
ja case.0x12f59438.2
jmp dword [eax*4 + 0x12f5949c]
mov edi, 1
jmp case.0x12f59438.2
mov ecx, dword [esp + 0x10]
xor eax, eax
cmp ecx, 4
sete al
mov edi, eax
jmp case.0x12f59438.2
mov eax, dword [esp + 0x10]
cmp eax, 1
je case.0x12f59438.0
cmp eax, 2
je case.0x12f59438.0
cmp eax, 6
je case.0x12f59438.0
cmp eax, 7
je case.0x12f59438.0
xor edi, edi
jmp case.0x12f59438.2
mov eax, dword [esp + 0x10]
xor ecx, ecx
cmp eax, 3
sete cl
mov edi, ecx
cmp esi, dword [ebx]
je 0x12f5948b
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
pop esi
xor eax, eax
pop ebx
ret 0xc

Function at 0x12f59680
Capabilities:
Create thread
Resume thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
jne 0x12f59715
push ebx
push edi
mov edi, dword [esi + 0x20]
mov ebx, 4
test edi, edi
je 0x12f596cf
call fcn.12f9c640
test eax, eax
je 0x12f596cf
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x12f596bc
mov ecx, dword [eax + 0x3c]
add ecx, eax
je 0x12f596bc
mov ebx, dword [ecx + 0x64]
lea eax, [edi - 0x2000]
cmp ebx, eax
jbe 0x12f596c8
add edi, ebx
mov ebx, 0x10004
jmp 0x12f596d1
xor edi, edi
lea ecx, [esi + 4]
push ecx
push ebx
push esi
push 0x12f598d0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop edi
mov dword [esi + 8], eax
test eax, eax
pop ebx
je 0x12f59715
mov ecx, dword [esi + 0x24]
mov dword [esi + 0xc], 1
test ecx, ecx
je 0x12f59704
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov edx, dword [esi + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 1
pop esi
ret
xor eax, eax
pop esi
ret
Function at 0x12f59740
Capabilities:
Terminate thread

Disassembly:
sub esp, 8
push esi
mov esi, ecx
mov eax, dword [esi + 8]
test eax, eax
jne 0x12f59754
xor eax, eax
pop esi
add esp, 8
ret
mov eax, dword [esi + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 8]
mov dword [esp + 4], ecx
push eax
lea ecx, [esp + 8]
push 0
push ecx
push 2
mov dword [esp + 0x18], edx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x12f597a0
mov ecx, dword [esi + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov edx, dword [esi + 0x10]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_ResetEvent]
push edx
call edi
mov eax, dword [esi + 0x14]
push eax
call edi
mov dword [esi + 0xc], 0
pop edi
mov eax, 1
pop esi
add esp, 8
ret
Function at 0x12f731b0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1307e2b0
push 0x12f5e1cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov ecx, dword [ebp + 8]
xor edx, edx
cmp ecx, edx
je 0x12f73242
mov dword [ebp - 4], edx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], ecx
cmp word [ecx], 0x5a4d
jne 0x12f7323b
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x20], eax
cmp dword [eax], 0x4550
jne 0x12f7323b
cmp word [eax + 0x14], dx
je 0x12f7323b
cmp dword [ebp + 0xc], edx
je 0x12f73215
cmp word [eax + 4], 0x14c
jne 0x12f7323b
mov dword [ebp - 4], 0xffffffff
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x12f73330
Capabilities:
Enumerate pe sections

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
test ebx, ebx
push edi
je 0x12f7337d
mov edi, dword [esp + 0x18]
test edi, edi
je 0x12f7337d
mov eax, dword [ebx + 0x3c]
xor ecx, ecx
add eax, ebx
xor edx, edx
mov cx, word [eax + 0x14]
mov dx, word [eax + 6]
lea esi, [ecx + eax + 0x18]
xor ecx, ecx
test edx, edx
mov dword [esp + 0x14], esi
jbe 0x12f7337d
lea eax, [esi + 0x10]
mov esi, dword [eax - 4]
cmp edi, esi
jb 0x12f73375
mov ebp, dword [eax]
add ebp, esi
cmp edi, ebp
jb 0x12f73384
inc ecx
add eax, 0x28
cmp ecx, edx
jb 0x12f73366
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [esp + 0x14]
lea edx, [ecx + ecx*4]
mov esi, dword [eax + edx*8 + 0xc]
lea ecx, [eax + edx*8]
mov eax, dword [eax + edx*8 + 0x14]
sub eax, esi
add eax, ebx
add eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x12f73c50
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1307e2c0
push 0x12f5e1cc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
xor ebx, ebx
mov dword [ebp - 0x20], ebx
lea eax, [ebp - 0x20]
push eax
mov edi, dword [ebp + 0x14]
push edi
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.12f733d0
add esp, 0x10
mov esi, eax
cmp esi, ebx
je 0x12f73d03
mov eax, dword [esi]
push eax
mov eax, dword [ebp - 0x20]
push eax
call edi
add esp, 8
mov dword [ebp - 0x24], eax
mov edi, dword [ebp + 0x10]
sub edi, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x30], ebx
lea ecx, [ebp - 0x30]
push ecx
push 0x40
push 4
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualProtect]
call ebx
test eax, eax
je 0x12f73cfc
mov dword [esi], edi
lea edx, [ebp - 0x30]
push edx
mov eax, dword [ebp - 0x30]
push eax
push 4
push esi
call ebx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x12f74490
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x1306ecfc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [0x1307d248]
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
lea edi, [esi + 8]
mov dword [edi], eax
mov ecx, dword [0x1307d248]
lea ebp, [esi + 0x18]
xor ebx, ebx
mov dword [esp + 0x1c], ebx
mov dword [ebp], ecx
mov edx, dword [0x1307d248]
mov dword [esi + 0x20], edx
lea ecx, [esi + 0x28]
mov byte [esp + 0x1c], 2
call fcn.12f55360
mov eax, dword [esp + 0x24]
mov ecx, edi
push eax
mov byte [esp + 0x20], 3
mov dword [esi], 0x1307e2dc
mov dword [esi + 4], ebx
mov dword [esi + 0xc], ebx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
mov dword [esi + 0x1c], ebx
mov word [esi + 0x24], 0xffff
call fcn.12f421d0
mov eax, dword [esp + 0x28]
mov cx, word [esp + 0x30]
test eax, 0xffff0000
mov word [esi + 0x24], cx
mov dword [esi + 0x14], eax
je 0x12f74533
push eax
mov ecx, ebp
call fcn.12f421d0
mov edx, dword [ebp]
mov dword [esi + 0x14], edx
mov eax, dword [esp + 0x2c]
test eax, 0xffff0000
mov dword [esi + 0x1c], eax
je 0x12f74551
lea edi, [esi + 0x20]
push eax
mov ecx, edi
call fcn.12f421d0
mov eax, dword [edi]
mov dword [esi + 0x1c], eax
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10
Function at 0x12f7a370
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 6]
mov word [esp + 4], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ax, word [esp + 4]
pop edi
add esp, 0x208
ret

Function at 0x12f7a3b0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x12f7a483
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.12f5e700
add esp, 8
test eax, eax
je 0x12f7a3fc
mov byte [eax], 0
mov ebx, dword [esp + 0x114]
test ebx, ebx
je 0x12f7a47c
mov esi, dword [esp + 0x118]
test esi, esi
je 0x12f7a47c
lea edx, [esp + 0xc]
test edx, edx
je 0x12f7a47c
mov eax, dword [esp + 0x11c]
mov edx, 0x7a
test eax, eax
je 0x12f7a445
push eax
lea eax, [esp + 0x10]
push eax
push 0x130c4bec
push esi
push ebx
call fcn.12f5d93f
add esp, 0x14
xor edx, edx
mov esi, edx
jmp 0x12f7a48b
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jbe 0x12f7a478
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov esi, edx
jmp 0x12f7a48b
mov esi, 0x57
jmp 0x12f7a48b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x131c8d28], esi
je 0x12f7a49c
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x104
ret
Function at 0x12f7a4b0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x12f7a583
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.12f5e700
add esp, 8
test eax, eax
je 0x12f7a4fc
mov byte [eax], 0
mov ebx, dword [esp + 0x114]
test ebx, ebx
je 0x12f7a57c
mov esi, dword [esp + 0x118]
test esi, esi
je 0x12f7a57c
lea edx, [esp + 0xc]
test edx, edx
je 0x12f7a57c
mov eax, dword [esp + 0x11c]
mov edx, 0x7a
test eax, eax
je 0x12f7a545
push eax
lea eax, [esp + 0x10]
push eax
push 0x130c4bec
push esi
push ebx
call fcn.12f5d93f
add esp, 0x14
xor edx, edx
mov esi, edx
jmp 0x12f7a58b
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jbe 0x12f7a578
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov esi, edx
jmp 0x12f7a58b
mov esi, 0x57
jmp 0x12f7a58b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x131c8d28], esi
je 0x12f7a59c
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x104
ret

Function at 0x12f7a5b0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebx
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x12f7a670
lea ecx, [esp + 0xc]
push 0x5c
push ecx
call fcn.12f5c984
add esp, 8
test eax, eax
je 0x12f7a5ff
mov word [eax], 0
mov edi, dword [esp + 0x218]
test edi, edi
je 0x12f7a669
mov ebx, dword [esp + 0x21c]
test ebx, ebx
je 0x12f7a669
lea edx, [esp + 0xc]
test edx, edx
je 0x12f7a669
mov eax, dword [esp + 0x220]
mov esi, 0x7a
test eax, eax
je 0x12f7a646
push eax
lea eax, [esp + 0x10]
push eax
push 0x130c4e18
push ebx
push edi
call fcn.12f5d990
add esp, 0x14
xor esi, esi
jmp 0x12f7a678
lea ecx, [esp + 0xc]
push ecx
call fcn.12f5c51d
add esp, 4
cmp ebx, eax
jbe 0x12f7a678
lea edx, [esp + 0xc]
push edx
push edi
call fcn.12f5c95f
add esp, 8
xor esi, esi
jmp 0x12f7a678
mov esi, 0x57
jmp 0x12f7a678
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x131c8d28], esi
je 0x12f7a689
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x208
ret
Function at 0x12f7a8f0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0xd]
mov byte [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jbe 0x12f7a9ad
mov ebx, dword [esp + 0x114]
test ebx, ebx
je 0x12f7a9a6
mov esi, dword [esp + 0x118]
test esi, esi
je 0x12f7a9a6
lea ecx, [esp + 0xc]
test ecx, ecx
je 0x12f7a9a6
mov eax, dword [esp + 0x11c]
mov edx, 0x7a
test eax, eax
je 0x12f7a96f
lea edx, [esp + 0xc]
push eax
push edx
push 0x130c4bec
push esi
push ebx
call fcn.12f5d93f
add esp, 0x14
xor edx, edx
mov esi, edx
jmp 0x12f7a9b5
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp esi, ecx
jbe 0x12f7a9a2
lea edi, [esp + 0xc]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor edx, edx
rep movsb byte es:[edi], byte [esi]
mov esi, edx
jmp 0x12f7a9b5
mov esi, 0x57
jmp 0x12f7a9b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x131c8d28], esi
je 0x12f7a9c6
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x104
ret

Function at 0x12f7aad0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x208
push ebx
push esi
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0xe]
mov word [esp + 0xc], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x12f7ab74
mov edi, dword [esp + 0x218]
test edi, edi
je 0x12f7ab6d
mov ebx, dword [esp + 0x21c]
test ebx, ebx
je 0x12f7ab6d
lea ecx, [esp + 0xc]
test ecx, ecx
je 0x12f7ab6d
mov eax, dword [esp + 0x220]
mov esi, 0x7a
test eax, eax
je 0x12f7ab4a
lea edx, [esp + 0xc]
push eax
push edx
push 0x130c4e18
push ebx
push edi
call fcn.12f5d990
add esp, 0x14
xor esi, esi
jmp 0x12f7ab7c
lea eax, [esp + 0xc]
push eax
call fcn.12f5c51d
add esp, 4
cmp ebx, eax
jbe 0x12f7ab7c
lea ecx, [esp + 0xc]
push ecx
push edi
call fcn.12f5c95f
add esp, 8
xor esi, esi
jmp 0x12f7ab7c
mov esi, 0x57
jmp 0x12f7ab7c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
mov dword [0x131c8d28], esi
je 0x12f7ab8d
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
test esi, esi
pop esi
pop ebx
sete al
add esp, 0x208
ret
Function at 0x12f7ca20
Capabilities:
Get common file path
Query or enumerate registry value

Disassembly:
sub esp, 0x41c
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x1a]
mov word [esp + 0x18], bp
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 0xc]
mov dword [esp + 0x14], 0x208
push eax
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x18], ebp
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
cmp eax, ebp
jne 0x12f7ca99
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push edx
push eax
push ebp
push str.CommonFilesDir
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0xc]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, ebp
je 0x12f7caf4
mov ecx, 0x82
xor eax, eax
lea edi, [esp + 0x18]
push str.c:program_filescommom_files
rep stosd dword es:[edi], eax
lea eax, [esp + 0x1c]
push eax
call fcn.12f5c95f
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x22a]
mov word [esp + 0x228], bp
rep stosd dword es:[edi], eax
add esp, 8
lea ecx, [esp + 0x220]
stosw word es:[edi], ax
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov dx, word [esp + 0x220]
mov word [esp + 0x18], dx
jmp 0x12f7cb19
lea eax, [esp + 0x18]
mov word [esp + 0x21e], bp
push eax
call fcn.12f5c51d
add esp, 4
dec eax
cmp word [esp + eax*2 + 0x18], 0x5c
lea eax, [esp + eax*2 + 0x18]
jne 0x12f7cb19
mov word [eax], bp
mov edi, dword [esp + 0x42c]
push ebx
cmp edi, ebp
je 0x12f7cb84
mov ebx, dword [esp + 0x434]
cmp ebx, ebp
je 0x12f7cb84
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x12f7cb84
mov eax, dword [esp + 0x438]
mov esi, 0x7a
cmp eax, ebp
je 0x12f7cb61
lea edx, [esp + 0x1c]
push eax
push edx
push 0x130c4e18
push ebx
push edi
call fcn.12f5d990
add esp, 0x14
xor esi, esi
jmp 0x12f7cb89
lea eax, [esp + 0x1c]
push eax
call fcn.12f5c51d
add esp, 4
cmp ebx, eax
jbe 0x12f7cb89
lea ecx, [esp + 0x1c]
push ecx
push edi
call fcn.12f5c95f
add esp, 8
xor esi, esi
jmp 0x12f7cb89
mov esi, 0x57
cmp esi, ebp
mov dword [0x131c8d28], esi
pop ebx
je 0x12f7cb9b
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
cmp esi, ebp
pop edi
pop esi
sete al
pop ebp
add esp, 0x41c
ret
Function at 0x12f7f670
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x618
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 6]
mov word [esp + 4], 0
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 8]
push eax
push 0x1317c528
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jbe 0x12f7f7aa
cmp eax, 0x104
jae 0x12f7f7aa
lea ecx, [esp + 4]
push esi
push ecx
call fcn.12f796e0
add esp, 4
test eax, eax
je 0x12f7f731
mov ecx, 0x103
xor eax, eax
lea edi, [esp + 0x212]
mov word [esp + 0x210], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea edx, [esp + 0x210]
push 0x208
lea eax, [esp + 0xc]
push edx
push eax
call fcn.12f793a0
lea ecx, [esp + 0x21c]
push ecx
call fcn.12f5c51d
mov esi, eax
add esp, 0x10
cmp esi, 0x208
jge 0x12f7f731
lea edx, [esp + 0x210]
push esi
lea eax, [esp + 0xc]
push edx
push eax
call fcn.12f5c57b
add esp, 0xc
mov word [esp + esi*2 + 8], 0
mov edi, dword [esp + 0x624]
test edi, edi
je 0x12f7f79c
mov esi, dword [esp + 0x628]
test esi, esi
je 0x12f7f79c
lea ecx, [esp + 8]
test ecx, ecx
je 0x12f7f79c
mov eax, dword [esp + 0x62c]
test eax, eax
je 0x12f7f77d
lea edx, [esp + 8]
push eax
push edx
push 0x130c4e18
push esi
push edi
call fcn.12f5d990
add esp, 0x14
mov eax, 1
pop esi
pop edi
add esp, 0x618
ret
lea eax, [esp + 8]
push eax
call fcn.12f5c51d
add esp, 4
cmp esi, eax
jbe 0x12f7f79c
lea ecx, [esp + 8]
push ecx
push edi
call fcn.12f5c95f
add esp, 8
pop esi
mov eax, 1
pop edi
add esp, 0x618
ret
xor eax, eax
pop edi
add esp, 0x618
ret

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

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
push edi
jne 0x12f80791
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
ret
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push esi
call edi
test eax, eax
jne 0x12f807c2
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x12f807c2
test al, 0x10
jne 0x12f807c2
test al, 1
je 0x12f8078c
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push esi
call edi
pop edi
pop esi
ret
pop edi
mov eax, 1
pop esi
ret

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

Disassembly:
push esi
mov esi, dword [esp + 8]
test esi, esi
push edi
jne 0x12f80851
push 0x57
mov dword [0x131c8d28], 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
xor eax, eax
pop esi
ret
mov edi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call edi
test eax, eax
jne 0x12f80882
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x12f80882
test al, 0x10
jne 0x12f80882
test al, 1
je 0x12f8084c
and al, 0xfe
push eax
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push esi
call edi
pop edi
pop esi
ret
pop edi
mov eax, 1
pop esi
ret