joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41581a
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 2
push 0
xor eax, eax
mov dword [ebp - 4], ecx
push 0
push dword [ebp + 0x10]
xor bl, bl
cmp dword [ebp + 0xc], eax
sete al
push eax
push edx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindFirstFileExW]
mov esi, dword [ebp + 0x14]
mov edi, eax
mov dword [esi], edi
cmp edi, 0xffffffff
jne 0x415861
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov dword [0x435798], eax
mov al, bl
pop edi
pop esi
pop ebx
leave
ret 0x10
push dword [ebp + 8]
mov eax, dword [ebp - 4]
push dword [ebp + 0x10]
cmp eax, fcn.00415950
jne 0x415920
call fcn.00415950
test eax, eax
je 0x41590b
and dword [0x435798], 0
mov bl, 1
cmp edi, 0xffffffff
je 0x4158ba
mov ecx, dword [0x4357a8]
test ecx, ecx
je 0x4158c0
mov edx, dword [0x4357ac]
cmp edx, dword [0x4357b0]
jge 0x4158e1
test ecx, ecx
je 0x4158b8
mov eax, dword [esi]
mov dword [ecx + edx*4], eax
inc edx
mov dword [0x4357ac], edx
mov bl, 1
test bl, bl
jne 0x415858
jmp 0x41584d
push 0x14
push 0
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov ecx, eax
mov edx, dword [0x4357ac]
mov dword [0x4357a8], ecx
jmp 0x4158a8
lea eax, [edx*4 + 4]
push eax
push ecx
push 0
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapReAlloc]
mov ecx, eax
test ecx, ecx
je 0x4214d5
inc dword [0x4357b0]
jmp 0x4158d3
push dword [ebp + 0x10]
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindNextFileW]
test eax, eax
je 0x415934
mov edi, dword [esi]
jmp 0x415848
mov ecx, eax
call dword [0x4494c4]
mov ecx, dword [ebp - 4]
call ecx
mov edi, dword [esi]
jmp 0x41587a
push dword [esi]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
or dword [esi], 0xffffffff
or edi, 0xffffffff
jmp 0x41588b
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push dword [esi]
mov dword [0x435798], eax
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_FindClose]
or dword [esi], 0xffffffff
xor al, al
jmp 0x41585a
Function at 0x416240
Capabilities:
Set console window title

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
lea edx, [ebp - 0x21c]
push esi
xor eax, eax
mov dword [ebp - 0x224], ebx
push edi
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x218], eax
call fcn.004163ba
test eax, eax
js 0x421dbd
mov eax, dword [ebp - 0x21c]
cmp eax, 3
jae 0x421e1b
test eax, eax
jne 0x421dcb
inc eax
mov edi, eax
mov dword [ebp - 0x220], eax
push 0x40002748
mov dword [ebp - 0x22c], edi
call fcn.0041638a
mov dword [ebp - 0x218], eax
pop ecx
test eax, eax
je 0x421e0a
mov ebx, eax
xor edx, edx
lea ecx, [ebx + 2]
mov ax, word [ebx]
add ebx, 2
cmp ax, dx
jne 0x4162c8
sub ebx, ecx
sar ebx, 1
cmp ebx, 0x104
jae 0x416358
mov ecx, 0x208
call fcn.0040dc10
mov esi, eax
mov dword [ebp - 0x228], esi
test esi, esi
je 0x416358
push dword [ebp - 0x218]
mov edx, 0x104
mov ecx, esi
call fcn.0040f2e0
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x421e23
cmp dword [eax + 0x3c], 0
je 0x416384
push dword [eax + 0x3c]
mov edx, 0x104
mov ecx, esi
call fcn.0040fb80
test eax, eax
jne 0x41634d
xor ebx, ebx
test esi, esi
je 0x416341
push esi
call dword [sym.imp.api_ms_win_core_console_l2_2_0.dll_SetConsoleTitleW]
mov byte [0x43574c], bl
xor eax, eax
mov edi, eax
cmp dword [ebp - 0x220], eax
je 0x416358
test esi, esi
je 0x416358
mov ecx, esi
call fcn.0040dba0
mov eax, dword [ebp - 0x218]
test eax, eax
je 0x416369
push eax
call dword [sym.imp.api_ms_win_core_heap_l2_1_0.dll_LocalFree]
test edi, edi
jne 0x421e0a
mov ecx, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret 4
xor ecx, ecx
mov edi, ecx
jmp 0x41634d
push eax
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
push eax
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
test ebx, ebx
je 0x421eab
mov ecx, dword [ebx + 0x3c]
call fcn.0040aa9f
mov esi, eax
test esi, esi
je 0x416341
mov ecx, esi
xor ebx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x421dec
sub ecx, edx
sar ecx, 1
cmp ecx, 0x104
jb 0x416330
xor edi, edi
inc edi
xor eax, eax
push eax
push 8
call fcn.00407834
pop ecx
pop ecx
jmp 0x416371
add eax, 0xfffffff0
jmp 0x416291
lea eax, [ebp - 0x214]
push 0x104
push eax
mov dword [ebp - 0x21c], eax
call dword [sym.imp.api_ms_win_core_console_l2_2_0.dll_GetConsoleTitleW]
test eax, eax
je 0x41634d
push dword [ebp - 0x218]
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
je 0x421e8c
mov edi, dword [ebp - 0x218]
lea esi, [ebp - 0x214]
add ebx, ebx
add esi, ebx
push edi
push esi
call dword [sym.imp.msvcrt.dll_wcsstr]
pop ecx
pop ecx
test eax, eax
jne 0x421e6a
mov edi, dword [ebp - 0x22c]
mov dword [ebp - 0x21c], esi
mov esi, dword [ebp - 0x228]
push dword [ebp - 0x21c]
mov edx, 0x104
mov ecx, esi
call fcn.0040fb80
test eax, eax
jne 0x41634d
jmp 0x41632e
xor ebx, ebx
mov esi, ebx
jmp 0x416330
Function at 0x416e74
Capabilities:
Parse pe header

Disassembly:
push 0xc
push 0x42c940
call fcn.00417138
xor ecx, ecx
mov eax, dword [ebp + 8]
test eax, eax
je 0x416ed4
cmp eax, 0xffffffff
je 0x416ed4
mov dword [ebp - 4], ecx
mov edx, 0x5a4d
cmp word [eax], dx
jne 0x416ecd
mov edx, dword [eax + 0x3c]
test edx, edx
js 0x416ecd
cmp edx, 0x10000000
jae 0x416ecd
add eax, edx
mov dword [ebp - 0x1c], eax
mov ecx, dword [eax]
sub ecx, 0x4550
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
jmp 0x416eca
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 0xfffffffe
mov eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x416f40
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor edx, edx
push ebx
push esi
push edi
mov ecx, dword [eax + 0x3c]
add ecx, eax
movzx eax, word [ecx + 0x14]
movzx ebx, word [ecx + 6]
add eax, 0x18
add eax, ecx
test ebx, ebx
je 0x416f7e
mov edi, dword [ebp + 0xc]
mov esi, dword [eax + 0xc]
cmp edi, esi
jb 0x416f76
mov ecx, dword [eax + 8]
add ecx, esi
cmp edi, ecx
jb 0x416f80
inc edx
add eax, 0x28
cmp edx, ebx
jb 0x416f66
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x417050
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov ecx, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x417081
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x417081
mov ecx, 0x10b
cmp word [eax + 0x18], cx
jne 0x417081
mov eax, 1
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x422cb5
Capabilities:
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [ebp + 0x28]
xor eax, eax
push esi
push edi
mov edi, dword [ebp + 0x1c]
mov word [ebx], ax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 8], edx
mov dword [ebp - 0xc], ecx
mov byte [eax], 0
xor eax, eax
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
sub eax, 0
je 0x422d2a
sub eax, 1
je 0x422d21
sub eax, 1
je 0x422cfb
sub eax, 1
jne 0x422d34
push edi
call fcn.00416730
jmp 0x422d31
test edi, edi
js 0x422d18
mov edi, 0x8007029c
push edi
push 2
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004232a9
mov ecx, edi
call fcn.00423031
jmp 0x422d31
mov ecx, edi
call fcn.00423044
jmp 0x422d31
mov ecx, edi
call fcn.0042301e
mov dword [ebp - 4], eax
mov esi, dword [ebp + 0x38]
mov eax, dword [ebp + 0x18]
mov dword [esi], eax
xor eax, eax
mov dword [esi + 4], edi
inc eax
lock xadd dword [0x4397c8], eax
inc eax
mov dword [esi + 8], eax
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x422d5c
xor ecx, ecx
cmp word [eax], cx
jne 0x422d5e
xor eax, eax
mov dword [esi + 0xc], eax
call dword [sym.imp.api_ms_win_core_processthreads_l1_1_0.dll_GetCurrentThreadId]
mov dword [esi + 0x10], eax
lea edi, [esi + 0x2c]
mov eax, dword [ebp + 8]
xor edx, edx
mov dword [esi + 0x1c], eax
mov eax, dword [ebp - 8]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 4]
mov dword [esi + 0x24], eax
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x18], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x48], eax
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x4c], eax
xor eax, eax
push 6
pop ecx
mov dword [esi + 0x28], edx
rep stosd dword es:[edi], eax
mov edi, dword [0x448030]
test edi, edi
je 0x422db7
mov ecx, edi
call dword [0x4494c4]
call edi
mov edi, dword [0x42d54c]
mov dword [esi + 0x44], eax
test edi, edi
je 0x422dd7
push 0x400
push dword [ebp + 0x30]
mov ecx, edi
push esi
call dword [0x4494c4]
call edi
mov edi, dword [0x448068]
test edi, edi
je 0x422dec
push esi
mov ecx, edi
call dword [0x4494c4]
call edi
mov edi, dword [0x448070]
test edi, edi
je 0x422e01
push esi
mov ecx, edi
call dword [0x4494c4]
call edi
xor eax, eax
cmp dword [esi + 4], eax
jl 0x422e1a
cmp dword [ebp + 0x18], 3
je 0x422e13
call fcn.004237f7
mov dword [esi + 4], 0x8000ffff
call fcn.00422c78
mov edi, dword [0x44805c]
test al, al
jne 0x422e46
test edi, edi
je 0x422e7f
cmp byte [0x448061], al
jne 0x422e7f
xor eax, eax
mov ecx, edi
push eax
push eax
push esi
call dword [0x4494c4]
call edi
jmp 0x422e7f
test edi, edi
je 0x422e64
cmp byte [0x448061], 0
jne 0x422e64
push 0x800
push ebx
push esi
mov ecx, edi
call dword [0x4494c4]
call edi
xor eax, eax
cmp word [ebx], ax
jne 0x422e78
push esi
mov edx, 0x800
mov ecx, ebx
call fcn.004226a9
push ebx
call dword [sym.imp.api_ms_win_core_debug_l1_1_0.dll_OutputDebugStringW]
cmp byte [0x448060], 0
je 0x422e9c
mov esi, dword [0x448028]
test esi, esi
je 0x422e9c
mov ecx, esi
call dword [0x4494c4]
call esi
pop edi
pop esi
pop ebx
leave
ret 0x34
Function at 0x4235c3
Capabilities:
Check if file exists

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x218], eax
push ecx
mov esi, 0x104
mov dword [eax], edi
mov edx, esi
mov dword [eax + 4], edi
lea ecx, [ebp - 0x20c]
call fcn.0040f2e0
mov edx, esi
lea eax, [ebp - 0x20c]
cmp word [eax], di
je 0x423612
add eax, 2
sub edx, 1
jne 0x423605
mov eax, esi
mov ecx, edx
sub eax, edx
neg ecx
push ebx
sbb ecx, ecx
and ecx, eax
test edx, edx
je 0x423661
lea eax, [ebp - 0x20c]
lea eax, [eax + ecx*2]
sub esi, ecx
je 0x423659
mov edx, 0x403760
mov ecx, 0x7ffffffe
sub edx, eax
test ecx, ecx
je 0x423655
movzx ebx, word [edx + eax]
test bx, bx
je 0x423655
mov word [eax], bx
add eax, 2
dec ecx
sub esi, 1
jne 0x42363c
test esi, esi
jne 0x42365c
sub eax, 2
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push eax
push edi
push 0x1f0003
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_OpenSemaphoreW]
mov esi, eax
mov dword [ebp - 0x210], esi
test esi, esi
jne 0x42369d
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
cmp eax, 2
je 0x4236e5
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0xc0
call fcn.0042330a
mov edi, eax
jmp 0x4236cb
lea edx, [ebp - 0x214]
mov dword [ebp - 0x214], edi
mov ecx, esi
call fcn.00422b60
mov ebx, eax
test ebx, ebx
jns 0x4236d3
mov ecx, dword [ebp + 4]
mov edx, 0xc6
push ebx
push 0x40375c
call fcn.0042331f
mov edi, ebx
mov esi, dword [ebp - 0x210]
jmp 0x4236e5
mov ecx, dword [ebp - 0x218]
mov eax, dword [ebp - 0x214]
cdq
mov dword [ecx], eax
mov dword [ecx + 4], edx
pop ebx
test esi, esi
je 0x423703
push esi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test eax, eax
jne 0x423703
push ecx
mov ecx, dword [ebp + 4]
mov edx, 0x8f0
call fcn.004237fd
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
xor ecx, ebp
pop esi
call fcn.00416ad0
leave
ret 8
Function at 0x424423
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 1
push 0
mov edi, ecx
mov dword [ebp - 0x14], edx
push 0
push edi
mov dword [ebp - 0xc], edi
mov ebx, 0x4397e0
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
mov esi, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, 0x1fff
cmp esi, eax
jb 0x42445c
mov dword [ebp + 8], eax
mov esi, eax
push 0x447df4
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
mov eax, dword [ebp + 0xc]
push 0
push eax
push esi
push ebx
push edi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
push 0x447df4
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
test esi, esi
je 0x4245b5
mov esi, dword [ebp + 0xc]
mov edi, dword [esi]
test edi, edi
je 0x4245b5
cmp dword [0x431590], 0xfde9
mov ecx, edi
mov dword [ebp - 4], edi
jne 0x4244e1
cmp dword [ebp - 8], 0
jne 0x4244e1
cmp dword [ebp + 8], 3
jbe 0x4244e1
push 3
push 0x40343c
push ebx
call sub.msvcrt.dll_memcmp
add esp, 0xc
mov ecx, edi
test eax, eax
jne 0x4244e1
add edi, 0xfffffffd
mov dword [ebp - 8], 3
mov ebx, 0x4397e3
mov dword [esi], edi
mov dword [ebp - 4], edi
mov ecx, edi
mov edx, ebx
mov dword [ebp - 0x10], edx
test edi, edi
jle 0x42452b
cmp ecx, 3
jl 0x424505
mov al, byte [ebx]
cmp al, 0xa
jne 0x4244fb
cmp byte [ebx + 1], 0xd
je 0x424550
cmp al, 0xd
jne 0x424505
cmp byte [ebx + 1], 0xa
je 0x424550
movzx eax, byte [ebx]
cmp byte [eax + 0x447ae0], 0
je 0x42451e
cmp ecx, 1
je 0x424572
push 2
add ecx, 0xfffffffe
pop eax
jmp 0x424522
xor eax, eax
dec ecx
inc eax
add ebx, eax
mov dword [ebp - 4], ecx
test ecx, ecx
jg 0x4244ea
push dword [ebp + 8]
mov ecx, dword [0x431590]
push dword [ebp - 0x14]
push edi
push edx
call fcn.0040e188
neg eax
sbb eax, eax
neg eax
push eax
push ecx
call dword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov dword [esi], eax
jmp 0x4245b7
xor eax, eax
mov edi, ebx
push eax
push eax
mov byte [ebx + 2], al
sub edi, edx
mov eax, dword [ebp - 8]
add edi, 2
add eax, edi
push eax
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
mov edx, dword [ebp - 0x10]
jmp 0x42452b
push 0x447df4
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_AcquireSRWLockShared]
push 0
lea eax, [ebp - 4]
push eax
push 1
lea eax, [ebx + 1]
push eax
push dword [ebp - 0xc]
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
push 0x447df4
mov esi, eax
call dword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_ReleaseSRWLockShared]
test esi, esi
je 0x4245af
cmp dword [ebp - 4], 0
je 0x4245af
mov esi, dword [ebp + 0xc]
inc edi
jmp 0x42456d
mov eax, dword [ebp + 0xc]
and dword [eax], 0
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x424ef8
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebx
mov ebx, 0x40220c
push esi
mov ecx, ebx
call fcn.00411d10
mov esi, eax
test esi, esi
jne 0x424f1c
pop esi
mov ecx, ebx
mov edx, 0x402634
pop ebx
jmp fcn.0040a891
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x424f21
sub ecx, edx
sar ecx, 1
push edi
lea ebx, [ecx + 4]
lea ecx, [ebx + ebx]
call fcn.0040dc10
mov edi, eax
test edi, edi
jne 0x424f45
inc eax
jmp 0x424f82
push esi
mov edx, ebx
mov ecx, edi
call fcn.0040f2e0
push 0x40233c
mov edx, ebx
mov ecx, edi
call fcn.0040fb80
push 0x402634
mov edx, ebx
mov ecx, edi
call fcn.0040fb80
mov edx, edi
mov ecx, 0x40220c
call fcn.0040a891
mov ecx, edi
mov esi, eax
call fcn.0040dba0
mov eax, esi
pop edi
pop esi
pop ebx
ret

Function at 0x425123
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov esi, edx
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x42513f
call fcn.0040aa9f
movzx eax, word [eax]
jmp 0x425141
mov eax, ebx
test ax, ax
je 0x42514c
cmp ax, 0xa
jne 0x425176
mov ecx, dword [edi + 0x3c]
push 0x3b
pop edx
call fcn.0040a574
test eax, eax
je 0x425176
mov ecx, 0x4024f0
test esi, esi
jne 0x425169
mov ecx, 0x4035b4
mov edx, 0x4020a8
pop edi
pop esi
pop ebx
jmp fcn.0040a891
mov ecx, dword [edi + 0x3c]
mov edx, 0x40241c
push 5
call fcn.0040bb40
cmp word [eax], bx
je 0x42519c
mov ecx, 0x4024f0
test esi, esi
jne 0x425198
mov ecx, 0x4035b4
mov edx, eax
jmp 0x42516e
mov edi, 0x4024f0
mov eax, 0x4035b4
mov ecx, edi
test esi, esi
jne 0x4251b0
mov ecx, eax
mov edi, eax
call fcn.0040eb6e
push eax
push edi
push 0x403aac
call fcn.00409890
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
ret
Function at 0x4255c8
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x210], esi
push edi
test edx, edx
jne 0x4256cf
xor edi, edi
mov ebx, edi
mov dword [ebp - 0x214], edi
push edi
push edi
push edi
push edi
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
push ebx
push esi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegEnumKeyExW]
mov esi, eax
test esi, esi
jne 0x4256bc
cmp word [ebp - 0x20c], 0x2e
jne 0x425683
mov ecx, dword [ebp - 0x210]
lea edx, [ebp - 0x20c]
call fcn.004260d3
mov ebx, eax
test ebx, ebx
je 0x4256a5
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x42564e
sub ecx, edx
sar ecx, 1
je 0x425676
push ebx
lea eax, [ebp - 0x20c]
push eax
push 0x403aac
call fcn.00409890
add esp, 0xc
mov esi, eax
mov ecx, ebx
call fcn.0040dba0
mov ebx, dword [ebp - 0x214]
cmp dword [0x43158c], edi
jne 0x4256b4
inc ebx
mov dword [ebp - 0x214], ebx
test esi, esi
jne 0x425757
mov esi, dword [ebp - 0x210]
jmp 0x4255fa
push edi
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
push eax
call fcn.00407834
pop ecx
pop ecx
xor eax, eax
inc eax
jmp 0x425759
cmp esi, 0x103
jne 0x425757
mov esi, edi
jmp 0x425757
mov ecx, edx
call fcn.0040aa9f
mov ecx, eax
call fcn.0040abd0
mov ebx, eax
test ebx, ebx
je 0x4256b4
push 0x20
pop edx
mov ecx, ebx
call fcn.00410145
test eax, eax
je 0x4256f6
xor ecx, ecx
mov word [eax], cx
mov edx, ebx
mov ecx, esi
call fcn.004260d3
mov edx, eax
mov dword [ebp - 0x210], edx
test edx, edx
je 0x425733
mov ecx, edx
xor edi, edi
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x425712
sub ecx, esi
sar ecx, 1
je 0x425733
push edx
push ebx
push 0x403aac
call fcn.00409890
mov esi, eax
jmp 0x425742
xor esi, esi
push ebx
inc esi
push esi
push 0x400023a3
call fcn.00407834
mov ecx, dword [ebp - 0x210]
add esp, 0xc
call fcn.0040dba0
mov ecx, ebx
call fcn.0040dba0
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret
Function at 0x425fc2
Capabilities:
Parse pe header

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x42d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor edi, edi
mov ebx, edi
test ecx, ecx
jne 0x425fe6
xor eax, eax
jmp 0x4260c4
push edi
push 0x80
push 3
push edi
push 1
push 0x80000000
push ecx
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4260c1
push 0x40
lea edx, [ebp - 0x48]
mov ecx, esi
call fcn.004261e3
test eax, eax
je 0x4260ba
mov eax, 0x5a4d
cmp ax, word [ebp - 0x48]
jne 0x4260ba
push edi
push edi
push dword [ebp - 0xc]
push esi
call dword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4260ba
push 4
lea edx, [ebp - 0x60]
mov ecx, esi
call fcn.004261e3
test eax, eax
je 0x4260ba
cmp dword [ebp - 0x60], 0x4550
jne 0x4260ba
push 0x14
lea edx, [ebp - 0x5c]
mov ecx, esi
call fcn.004261e3
test eax, eax
je 0x4260ba
mov ax, word [ebp - 0x4c]
test ax, ax
je 0x4260ba
movzx eax, ax
push eax
push 8
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x4260ba
movzx eax, word [ebp - 0x4c]
mov edx, edi
push eax
mov ecx, esi
call fcn.004261e3
test eax, eax
je 0x4260aa
mov ecx, dword [ebp - 0x5c]
mov edx, edi
call fcn.004261b6
test eax, eax
je 0x4260aa
movzx ebx, word [eax]
push edi
push 0
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
push eax
call dword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
push esi
call dword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov ax, bx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00416ad0
leave
ret
Function at 0x4260d3
Capabilities:
Query or enumerate registry value

Disassembly:
push 0x1c
push 0x42cb30
call fcn.00417138
mov edi, ecx
mov dword [ebp - 0x2c], edi
xor ebx, ebx
mov esi, ebx
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 4], ebx
test edx, edx
je 0x426113
cmp word [edx], bx
je 0x426113
lea eax, [ebp - 0x1c]
push eax
push 1
push ebx
push edx
push edi
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
test eax, eax
je 0x426113
push eax
jmp 0x42617d
lea eax, [ebp - 0x24]
push eax
push ebx
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
cmp eax, 2
jne 0x42613d
mov ecx, 0x4020a8
call fcn.0040abd0
mov esi, eax
mov dword [ebp - 0x20], esi
jmp 0x426183
test eax, eax
jne 0x426110
mov ecx, dword [ebp - 0x24]
call fcn.0040dc10
mov esi, eax
mov dword [ebp - 0x20], esi
test esi, esi
je 0x42617b
lea eax, [ebp - 0x24]
push eax
push esi
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push dword [ebp - 0x1c]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
je 0x426183
mov ecx, esi
call fcn.0040dba0
xor esi, esi
mov dword [ebp - 0x20], esi
push ebx
jmp 0x42617d
push 8
call dword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov dword [ebp - 4], 0xfffffffe
call fcn.004261a7
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4262fb
Capabilities:
Delete registry key
Delete registry value
Set registry value

Disassembly:
push 0x18
push 0x42cb10
call fcn.00417138
mov ebx, edx
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp + 8]
xor edi, edi
test eax, eax
je 0x4263ac
cmp word [eax], di
je 0x4263ac
push edi
lea eax, [ebp - 0x20]
push eax
push edi
push 2
push edi
push edi
push edi
push ebx
push ecx
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCreateKeyExW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
jne 0x426393
mov edx, dword [ebp + 8]
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x426346
sub ecx, esi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push edi
push edi
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegSetValueExW]
mov esi, eax
mov dword [ebp - 0x1c], esi
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test esi, esi
jne 0x426393
push dword [ebp + 8]
push ebx
push 0x403aac
call fcn.00409890
add esp, 0xc
jmp 0x426415
push edi
push esi
call fcn.00407834
push ebx
push 1
push 0x235d
call fcn.00407834
add esp, 0x14
jmp 0x426415
push edi
push edi
push ebx
push ecx
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteKeyExW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x426419
lea eax, [ebp - 0x24]
push eax
push 0x2000000
push edi
push ebx
push dword [ebp - 0x20]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegOpenKeyExW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x4263ec
cmp esi, 2
je 0x426415
push edi
push esi
call fcn.00407834
pop ecx
pop ecx
jmp 0x426415
push 0x4020a8
push dword [ebp - 0x24]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegDeleteValueW]
mov esi, eax
mov dword [ebp - 0x1c], esi
test esi, esi
je 0x42640c
push edi
push esi
call fcn.00407834
pop ecx
pop ecx
push dword [ebp - 0x24]
call dword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegCloseKey]
test esi, esi
jne 0x42645c
mov dword [ebp - 4], edi
call fcn.0041727f
test al, al
je 0x426433
push edi
push edi
push edi
push 0x8000000
call dword [sym.imp.ext_ms_win_cmd_util_l1_1_0.dll_DoSHChangeNotify]
mov dword [ebp - 4], 0xfffffffe
jmp 0x42645c
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4