joyce8/EMBER2024-capa huggingface dataset:
Function at 0x30026509
Capabilities:
Get common file path
Query or enumerate registry value
Set environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x90]
sub esp, 0x110
mov eax, dword [section..cdata]
push ebx
push esi
push edi
mov dword [ebp + 0x8c], eax
push 0x104
lea eax, [ebp - 0x78]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
je 0x30026549
lea eax, [ebp - 0x78]
push eax
push 0x300037bc
call edi
push 0x300037ac
call fcn.300247af
xor ebx, ebx
cmp eax, ebx
mov dword [ebp - 0x7c], eax
je 0x300265e3
push 0x30003798
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
cmp esi, ebx
je 0x300265da
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 0x26
push ebx
call esi
test eax, eax
jne 0x3002658c
lea eax, [ebp - 0x78]
push eax
push 0x3000378c
call edi
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 0x2b
push ebx
call esi
test eax, eax
jne 0x300265a6
lea eax, [ebp - 0x78]
push eax
push 0x30003780
call edi
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 0x1a
push ebx
call esi
test eax, eax
jne 0x300265c0
lea eax, [ebp - 0x78]
push eax
push 0x30003778
call edi
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 5
push ebx
call esi
test eax, eax
jne 0x300265da
lea eax, [ebp - 0x78]
push eax
push 0x3000376c
call edi
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x80]
push eax
push 0x20019
push ebx
push 0x30003738
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x30026657
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x78]
push eax
push ebx
push ebx
push 0x30003730
push dword [ebp - 0x80]
mov dword [ebp - 0x7c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x3002664e
lea eax, [ebp - 0x78]
lea esi, [ebp - 0x78]
push eax
dec esi
call fcn.3004e915
cmp byte [eax + esi], 0x5c
jne 0x30026643
lea eax, [ebp - 0x78]
push eax
call fcn.3004e915
mov byte [eax + esi], bl
lea eax, [ebp - 0x78]
push eax
push 0x30003724
call edi
push dword [ebp - 0x80]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0x8c]
pop edi
pop esi
pop ebx
call fcn.30062f67
add ebp, 0x90
leave
ret
Function at 0x3002666d
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x3002667e
xor eax, eax
jmp 0x300266eb
cmp dword [ebp + 0x10], esi
push ebx
je 0x300266b7
push 0x106
push dword [ebp + 0x10]
call fcn.3005408c
mov ebx, eax
cmp ebx, esi
jne 0x3002669b
xor eax, eax
jmp 0x300266ea
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0xc]
mov eax, ecx
push edi
shr ecx, 2
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
pop edi
jmp 0x300266ba
mov ebx, dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
push esi
push ebx
push dword [ebp + 8]
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, esi
mov dword [ebp - 4], eax
jne 0x300266d8
push ebx
call dword [ebp + 8]
jmp 0x300266e7
lea eax, [ebp - 4]
push eax
push dword [0x3009782c]
call fcn.300559ab
mov eax, dword [ebp - 4]
pop ebx
pop esi
leave
ret 0xc
Function at 0x30028dc2
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
test eax, eax
je 0x30028e90
push esi
push edi
push eax
call fcn.3004e99c
mov esi, eax
inc esi
mov eax, esi
push 0x106
shl eax, 2
push eax
call fcn.3005408c
mov edi, eax
push esi
push edi
push dword [ebx]
mov dword [ebp - 8], edi
call fcn.3004fcc8
mov eax, edi
xor ecx, ecx
cmp eax, ecx
mov dword [ebp - 4], edi
mov edi, dword [ebx]
je 0x30028e80
jmp 0x30028e10
mov eax, dword [ebp + 8]
cmp word [eax], cx
je 0x30028e31
cmp word [eax], 0x7c
je 0x30028e22
inc eax
inc eax
cmp word [eax], cx
jne 0x30028e15
cmp word [eax], cx
je 0x30028e31
mov word [eax], cx
inc eax
inc eax
mov dword [ebp + 8], eax
jmp 0x30028e34
mov dword [ebp + 8], ecx
push dword [ebp - 4]
call sub.KERNEL32.dll_GetFileAttributesW
cmp eax, 0xffffffff
jne 0x30028e4c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x30028e74
cmp edi, dword [ebx]
je 0x30028e57
mov word [edi], 0x7c
inc edi
inc edi
mov eax, edi
sub eax, dword [ebx]
mov ecx, esi
sar eax, 1
sub ecx, eax
push ecx
push edi
push dword [ebp - 4]
call fcn.3004fcc8
push edi
call fcn.3004e99c
lea edi, [edi + eax*2]
mov eax, dword [ebp + 8]
xor ecx, ecx
test eax, eax
mov dword [ebp - 4], eax
jne 0x30028e0d
cmp edi, dword [ebx]
pop edi
pop esi
jne 0x30028e88
mov dword [ebx], ecx
push dword [ebp - 8]
call fcn.30053fa1
pop ebx
leave
ret 4
Function at 0x30028e95
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3f4]
sub esp, 0x474
mov eax, dword [section..cdata]
and dword [ebp - 0x6c], 0
push ebx
push esi
push edi
mov edi, dword [ebp + 0x3fc]
test edi, edi
mov dword [ebp + 0x3f0], eax
je 0x3002908c
mov eax, dword [edi]
test eax, eax
je 0x3002908c
push eax
call fcn.3004e99c
mov esi, eax
inc esi
mov eax, esi
push 0x106
shl eax, 2
push eax
mov dword [ebp + 0x3fc], esi
call fcn.3005408c
mov ebx, eax
test ebx, ebx
mov dword [ebp - 0x74], ebx
je 0x3002908f
push esi
push ebx
push dword [edi]
call fcn.3004fcc8
mov dword [ebp - 0x70], ebx
jmp 0x30028f0f
cmp word [ebx], 0x3b
je 0x30028f15
inc ebx
inc ebx
cmp word [ebx], 0
jne 0x30028f07
cmp word [ebx], 0
mov esi, ebx
je 0x30028f25
and word [ebx], 0
inc ebx
inc ebx
jmp 0x30028f27
xor ebx, ebx
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x80], eax
je 0x3002906b
and dword [ebp - 0x78], 0
jmp 0x30028f54
mov ax, word [esi]
test ax, ax
je 0x30028f6d
cmp ax, 0x5c
je 0x30028f5d
dec esi
dec esi
cmp esi, dword [ebp - 0x74]
jae 0x30028f46
jmp 0x30028f6d
push dword [ebp - 0x70]
and word [esi + 2], 0
call fcn.3004e99c
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x3fc]
lea eax, [eax*4 + 0x400]
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x3c]
push eax
call fcn.3004e99c
mov esi, eax
add esi, dword [ebp - 0x78]
mov eax, 0x104
cmp esi, eax
jae 0x3002904d
and word [ebp + 0x1e8], 0
cmp dword [ebp - 0x78], 0
je 0x30028fbb
push eax
lea eax, [ebp + 0x1e8]
push eax
push dword [ebp - 0x70]
call fcn.3004fcc8
mov eax, 0x104
push eax
lea eax, [ebp + 0x1e8]
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.3004fd0a
lea eax, [ebp + 0x1e8]
push eax
call fcn.30025ee9
test eax, eax
jne 0x3002904d
mov eax, dword [ebp - 0x6c]
lea ecx, [esi + eax + 1]
cmp ecx, dword [ebp + 0x3fc]
jle 0x30029013
push dword [ebp - 0x7c]
push dword [edi]
call fcn.300540bf
test eax, eax
je 0x30029084
add dword [ebp + 0x3fc], 0x100
add dword [ebp - 0x7c], 0x400
mov dword [edi], eax
mov eax, dword [ebp - 0x6c]
test eax, eax
je 0x30029023
mov ecx, dword [edi]
mov word [ecx + eax*2], 0x3b
inc eax
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp + 0x3fc]
sub ecx, eax
lea esi, [eax + eax]
mov eax, dword [edi]
push ecx
add eax, esi
push eax
lea eax, [ebp + 0x1e8]
push eax
call fcn.3004fcc8
mov eax, dword [edi]
add eax, esi
push eax
call fcn.3004e99c
add dword [ebp - 0x6c], eax
lea eax, [ebp - 0x68]
push eax
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x30028f7d
push dword [ebp - 0x80]
call dword [sym.imp.KERNEL32.dll_FindClose]
test ebx, ebx
mov dword [ebp - 0x70], ebx
jne 0x30028f0f
cmp dword [ebp - 0x6c], ebx
jne 0x30029084
push dword [edi]
call fcn.30053fa1
and dword [edi], ebx
push dword [ebp - 0x74]
call fcn.30053fa1
xor eax, eax
inc eax
mov ecx, dword [ebp + 0x3f0]
pop edi
pop esi
pop ebx
call fcn.30062f67
add ebp, 0x3f4
leave
ret 4
Function at 0x30029264
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
test eax, eax
je 0x30029281
xor eax, eax
inc eax
leave
ret
mov eax, dword [ebp - 4]
and al, 0x10
sub al, 0x10
neg al
sbb eax, eax
inc eax
leave
ret

Function at 0x300295fc
Capabilities:
Connect to http server

Disassembly:
push ebx
push esi
xor ebx, ebx
call fcn.30022c4c
test eax, eax
mov esi, 0x30097b1c
je 0x3002961b
push esi
push 0x30003ce4
call fcn.30022d69
pop ecx
pop ecx
mov eax, dword [0x30098524]
test eax, eax
je 0x30029629
mov ebx, 0x800000
push 1
push ebx
neg eax
push 3
sbb eax, eax
mov ecx, 0x30002850
push ecx
and eax, 0x16b
push ecx
add eax, 0x50
push eax
push esi
push dword [0x30097ae8]
call dword [sym.imp.WININET.dll_InternetConnectA]
and dword [0x30097af4], 0
test eax, eax
pop esi
mov dword [0x30097aec], eax
mov dword [0x3009a780], 1
pop ebx
jne 0x3002968e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x300296aa
call fcn.30022c4c
test eax, eax
je 0x3002968b
push 0x30003ccc
call fcn.30022ce6
xor eax, eax
ret
and dword [0x3009a780], 0
push 0
push 0
push 0x1427
push dword [0x300a2600]
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
inc eax
ret

Function at 0x30029842
Capabilities:
Send data

Disassembly:
mov eax, dword [0x30098534]
push edi
xor edi, edi
cmp eax, edi
jne 0x30029866
push edi
push edi
push 0x1427
push dword [0x300a2600]
call dword [sym.imp.USER32.dll_PostMessageA]
xor eax, eax
inc eax
pop edi
ret
mov ecx, dword [0x30098528]
push esi
push 0x30098530
push dword [0x3009852c]
add ecx, eax
push ecx
push dword [0x30097af0]
xor esi, esi
inc esi
mov dword [0x3009a780], esi
call dword [sym.imp.WININET.dll_InternetWriteFile]
test eax, eax
jne 0x300298be
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp edi, 0x3e5
je 0x300298e6
call fcn.30022c4c
test eax, eax
je 0x300298ba
push edi
push 0x30003d4c
call fcn.30022d69
pop ecx
pop ecx
xor eax, eax
jmp 0x300298e8
cmp dword [0x30097abc], 3
mov dword [0x3009a780], edi
jne 0x300298d3
mov dword [0x300a25f4], esi
push edi
push edi
push 0x1427
push dword [0x300a2600]
call dword [sym.imp.USER32.dll_PostMessageA]
mov eax, esi
pop esi
pop edi
ret
Function at 0x3002a6b0
Capabilities:
Check internet connectivity via wininet

Disassembly:
push ebp
mov ebp, esp
push ecx
call fcn.3002a578
test eax, eax
je 0x3002a711
push dword [0x3006662c]
call fcn.30025ee9
test eax, eax
jne 0x3002a70c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
call fcn.30022c4c
test eax, eax
je 0x3002a6f0
push dword [0x3006662c]
push 0x30003f34
call fcn.30022d69
pop ecx
pop ecx
call fcn.30022c4c
test eax, eax
je 0x3002a708
push dword [ebp - 4]
push 0x30003f10
call fcn.30022d69
pop ecx
pop ecx
xor eax, eax
jmp 0x3002a723
xor eax, eax
inc eax
jmp 0x3002a723
push 0
lea eax, [ebp - 4]
push eax
call dword [sym.imp.WININET.dll_InternetGetConnectedState]
neg eax
sbb eax, eax
neg eax
leave
ret 4
Function at 0x3002f244
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push 0x30004724
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x3002f26c
xor eax, eax
jmp 0x3002f2a0
push edi
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
mov dword [ebp - 8], 4
push 0
push 0
push 0x30004770
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
sete al
pop edi
leave
ret 4

Function at 0x3002f302
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
lea eax, [ebp - 4]
push eax
push 0x20019
xor esi, esi
push esi
push 0x300047e0
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], esi
mov dword [ebp - 8], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x3002f354
push edi
lea eax, [ebp - 8]
push eax
push esi
push esi
push esi
push 0x300047a8
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, esi
pop edi
je 0x3002f358
xor eax, eax
jmp 0x3002f361
xor eax, eax
cmp eax, dword [ebp - 8]
sbb eax, eax
neg eax
pop esi
leave
ret
Function at 0x3002f364
Capabilities:
Delete registry value
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
mov eax, dword [section..cdata]
mov dword [ebp - 4], eax
push esi
push edi
xor esi, esi
xor eax, eax
mov word [ebp - 0x61c], si
mov ecx, 0x103
lea edi, [ebp - 0x61a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x20c], si
mov ecx, 0x81
lea edi, [ebp - 0x20a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, dword [ebp + 8]
cmp edi, esi
mov dword [ebp - 0x620], esi
je 0x3002f4c2
call fcn.3002f302
test eax, eax
je 0x3002f3dc
cmp dword [ebp + 0xc], esi
je 0x3002f3dc
call fcn.30022c4c
test eax, eax
je 0x3002f4c2
push 0x30004a1c
jmp 0x3002f421
mov eax, dword [edi]
push esi
lea ecx, [ebp - 0x620]
push ecx
push esi
push 0x2001f
and eax, 0x10000000
push esi
neg eax
push esi
sbb eax, eax
push esi
neg eax
add eax, 0x80000001
push 0x300047e0
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x3002f42b
call fcn.30022c4c
test eax, eax
je 0x3002f4c2
push 0x300049fc
call fcn.30022ce6
jmp 0x3002f4c2
cmp dword [ebp + 0xc], esi
jne 0x3002f443
push 0x30004784
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x3002f4c2
push 0x104
lea eax, [ebp - 0x20c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, esi
je 0x3002f4c2
dec eax
cmp word [ebp + eax*2 - 0x20c], 0x5c
jne 0x3002f456
push 0x74
mov word [ebp + eax*2 - 0x20c], si
push 0x300049e0
lea eax, [ebp - 0x20c]
push eax
push 0x300049c8
lea eax, [ebp - 0x61c]
push 0x208
push eax
call dword [sym.imp.SHLWAPI.dll_wnsprintfW]
add esp, 0x18
lea eax, [ebp - 0x61c]
push eax
call fcn.3004e99c
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x61c]
push eax
push 1
push esi
push 0x30004784
push dword [ebp - 0x620]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.30062f67
leave
ret 8

Function at 0x30030db4
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push dword [ebp + 8]
call fcn.30031fc2
test eax, eax
je 0x30030dcc
xor eax, eax
inc eax
jmp 0x30030e52
push esi
push edi
xor esi, esi
push esi
push 0x80
push 2
push dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x30030e0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
call fcn.30022c4c
test eax, eax
je 0x30030e49
push dword [ebp - 4]
push 0x30004e9c
jmp 0x30030e42
push ebx
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, esi
pop ebx
jne 0x30030e4d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
call fcn.30022c4c
test eax, eax
je 0x30030e49
push dword [ebp - 4]
push 0x30004e7c
call fcn.30022d69
pop ecx
pop ecx
xor eax, eax
jmp 0x30030e50
xor eax, eax
inc eax
pop edi
pop esi
leave
ret 0xc
Function at 0x300310ab
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
lea ebp, [esp - 0xa80]
sub esp, 0xb00
mov eax, dword [section..cdata]
push ebx
push esi
mov esi, dword [ebp + 0xa88]
xor edx, edx
lea ebx, [esi + 0x21c]
cmp dword [ebx], edx
mov dword [ebp + 0xa7c], eax
mov dword [ebp - 0x80], edx
jne 0x30031108
push 0x106
push 5
push 5
push 0x44c
push ebx
call fcn.30055e68
test eax, eax
jne 0x30031129
call fcn.30022c4c
test eax, eax
je 0x30031133
push 0x30004f30
call fcn.30022ce6
jmp 0x30031133
mov eax, dword [ebx]
movzx ecx, word [eax]
push ecx
push edx
push eax
call fcn.30055b25
test eax, eax
jne 0x30031129
call fcn.30022c4c
test eax, eax
je 0x30031133
push 0x30004f08
jmp 0x30031101
push esi
call fcn.3002f0ca
test eax, eax
jne 0x3003113a
xor eax, eax
jmp 0x30031287
push edi
lea eax, [esi + 0xc]
mov esi, 0x104
push esi
lea ecx, [ebp + 0x1d8]
push ecx
push eax
call fcn.3004fcc8
push esi
lea eax, [ebp + 0x1d8]
push eax
push 0x30004ef8
call fcn.3004fd0a
lea eax, [ebp + 0x3e0]
push eax
lea eax, [ebp + 0x1d8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x7c], eax
je 0x3003125e
test dword [ebp + 0x3e0], 0xffffffef
je 0x30031233
xor eax, eax
mov ecx, 0x113
lea edi, [ebp + 0x630]
rep stosd dword es:[edi], eax
push esi
lea eax, [ebp + 0x630]
push eax
mov eax, dword [ebp + 0xa88]
add eax, 0xc
push eax
call fcn.3004fcc8
push esi
lea eax, [ebp + 0x630]
push eax
push 0x30002eb8
call fcn.3004fd0a
push esi
lea eax, [ebp + 0x630]
push eax
lea eax, [ebp + 0x40c]
push eax
call fcn.3004fd0a
push esi
lea eax, [ebp + 0x838]
push eax
lea eax, [ebp + 0x630]
push eax
call fcn.3003016c
test eax, eax
je 0x30031254
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp + 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x3003122c
test dword [ebp - 0x78], 0xffffffef
je 0x3003122c
mov eax, dword [ebx]
lea ecx, [ebp + 0x630]
push ecx
push eax
call fcn.300559ab
cmp eax, 0xffffffff
je 0x3003129e
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp + 0x3e0]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x30031254
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_FindClose]
or dword [ebp - 0x7c], 0xffffffff
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x30031183
mov dword [ebp - 0x80], 1
mov esi, dword [ebp + 0xa88]
push dword [esi + 0x214]
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
cmp dword [ebp - 0x80], 0
pop edi
jne 0x30031284
push esi
call fcn.30030f20
mov eax, dword [ebp - 0x80]
mov ecx, dword [ebp + 0xa7c]
pop esi
pop ebx
call fcn.30062f67
add ebp, 0xa80
leave
ret 4
call fcn.30022c4c
test eax, eax
je 0x30031265
push 0x30004ed0
call fcn.30022ce6
jmp 0x30031265
Function at 0x300312b3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
push ebx
push esi
mov esi, dword [ebp + 8]
test byte [esi + 3], 0x10
push edi
mov edi, 0x104
lea ebx, [esi + 0xc]
je 0x30031316
push edi
push ebx
mov dword [ebp + 8], reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
test eax, eax
mov dword [ebp - 8], eax
je 0x300312f1
cmp eax, edi
jbe 0x3003134a
call fcn.30022c4c
test eax, eax
je 0x3003148d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x30004fc8
call fcn.30022d69
pop ecx
pop ecx
jmp 0x3003148d
push 1
push 0x1c
push ebx
push 0
mov dword [ebp + 8], SysReAllocString
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
jne 0x3003134a
call fcn.30022c4c
test eax, eax
je 0x3003148d
push 0x30004fa0
call fcn.30022ce6
jmp 0x3003148d
push edi
push ebx
push 0x300054a8
call fcn.3004fd0a
lea ecx, [ebp - 8]
push ecx
lea eax, [esi + 8]
push eax
xor eax, eax
push eax
push 0x2001f
push eax
push eax
push eax
push 0x30004724
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x30031392
call fcn.30022c4c
test eax, eax
je 0x3003138e
push 0x30004f7c
call fcn.30022ce6
and dword [esi + 8], 0
mov eax, dword [esi]
and eax, 7
dec eax
je 0x3003144d
dec eax
je 0x30031409
dec eax
dec eax
je 0x300313c2
call fcn.30022c4c
test eax, eax
je 0x3003148d
mov eax, dword [esi]
and eax, 7
push eax
push 0x30004f54
jmp 0x3003130a
push edi
push ebx
push 0x300054f8
call fcn.3004fd0a
cmp dword [0x30066700], 0
je 0x300313e1
mov eax, dword [0x30066704]
mov dword [esi + 4], eax
jmp 0x300313e8
mov dword [esi + 4], 0x32
cmp dword [ebp - 4], 0
jne 0x300313fd
mov dword [esi + 0x218], 0x30004830
jmp 0x3003147d
mov dword [esi + 0x218], 0x30004854
jmp 0x3003147d
push edi
push ebx
push 0x300054e4
call fcn.3004fd0a
cmp dword [0x30066700], 0
je 0x30031428
mov eax, dword [0x30066704]
mov dword [esi + 4], eax
jmp 0x3003142f
mov dword [esi + 4], 0x32
cmp dword [ebp - 4], 0
jne 0x30031441
mov dword [esi + 0x218], 0x30004820
jmp 0x3003147d
mov dword [esi + 0x218], 0x30004840
jmp 0x3003147d
push edi
push ebx
push 0x300054d0
call fcn.3004fd0a
cmp dword [0x30066700], 0
je 0x3003146c
mov eax, dword [0x30066704]
mov dword [esi + 4], eax
jmp 0x30031473
mov dword [esi + 4], 0x32
mov dword [esi + 0x218], 0x30004810
cmp dword [ebp + 0xc], 0
je 0x30031491
push esi
call fcn.300310ab
test eax, eax
jne 0x30031491
xor eax, eax
jmp 0x30031494
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x30031973
Capabilities:
Delete registry value
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi]
xor eax, eax
and edi, 7
cmp dword [ebp + 0xc], eax
mov dword [ebp - 4], 4
jne 0x3003199f
push 0x30004754
push dword [esi + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x300319eb
push ebx
lea ecx, [ebp - 4]
push ecx
lea ecx, [ebp + 8]
push ecx
push eax
push eax
mov ebx, 0x30004754
push ebx
push dword [esi + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x300319d3
cmp eax, 2
jne 0x300319ea
mov eax, dword [esi]
and eax, 0x10000000
push eax
push edi
call fcn.300318b7
mov dword [ebp + 8], eax
or dword [ebp + 8], edi
push 4
lea eax, [ebp + 8]
push eax
push 4
push 0
push ebx
push dword [esi + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop ebx
pop edi
pop esi
leave
ret 8