joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404503
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push edi
push 1
push esi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x4046b9
cmp dword [esi + 0x24], 0xffffffff
je 0x4046b9
mov eax, dword [ebp + 0xc]
xor edi, edi
mov dword [esi + 8], edi
test al, 1
je 0x404584
cmp word [esi + 0x58], di
jne 0x404553
push ebx
mov eax, esi
call fcn.004028a6
pop ecx
cmp dword [esi + 8], edi
jne 0x4046ad
xor eax, eax
inc eax
mov word [esi + 0x58], ax
push dword [ebx + 0x20]
push dword [ebp + 8]
push esi
call fcn.00404337
add esp, 0xc
mov dword [ebx + 0x20], eax
cmp dword [esi + 8], edi
jne 0x404579
cmp dword [esi + 0x8c], edi
je 0x404579
push 5
jmp 0x4046bb
xor eax, eax
mov word [esi + 0x58], ax
jmp 0x4046ad
test byte [ebx + 4], 0x10
je 0x4045b0
test al, 2
je 0x4045a9
push 1
push dword [ebp + 8]
test eax, eax
jns 0x40459e
call fcn.00402e8e
jmp 0x4045a3
call fcn.00402dfb
pop ecx
pop ecx
cmp eax, edi
je 0x404607
xor eax, eax
jmp 0x4046bc
cmp eax, 4
jne 0x4045ba
mov eax, dword [ebp + 8]
jmp 0x4045ff
mov dword [ebp - 4], eax
and dword [ebp - 4], 0x80000000
push edi
push dword [ebp + 8]
je 0x4045d1
call fcn.00402e8e
jmp 0x4045d6
call fcn.00402dfb
pop ecx
pop ecx
cmp eax, edi
je 0x404607
push edi
push dword [ebx + 4]
push 2
push edi
push edi
push 0x40000000
push dword [ebp + 8]
cmp dword [ebp - 4], edi
je 0x4045f9
call dword [sym.imp.KERNEL32.dll_CreateFileW]
jmp 0x4045ff
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x404613
mov dword [esi + 8], 1
jmp 0x4046ad
push ebx
mov eax, esi
call fcn.004028a6
pop ecx
cmp dword [esi + 8], edi
jne 0x40469e
cmp dword [esi + 0x34], edi
jne 0x40467f
push 0x4000
push edi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x34], eax
cmp eax, edi
jne 0x40467f
mov dword [esi + 8], 2
jmp 0x40467f
push 0x4000
push dword [esi + 0x34]
push esi
call fcn.00404337
add esp, 0xc
mov dword [ebp - 8], eax
cmp eax, edi
je 0x404684
push edi
lea ecx, [ebp - 0xc]
push ecx
push eax
push dword [esi + 0x34]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x404678
mov eax, dword [ebp - 8]
cmp dword [ebp - 0xc], eax
je 0x40467f
mov dword [esi + 8], 3
cmp dword [esi + 8], edi
je 0x404642
cmp dword [esi + 8], edi
jne 0x40469e
lea eax, [ebx + 0x18]
push eax
lea eax, [ebx + 8]
push eax
add ebx, 0x10
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0xc], 4
je 0x4046ad
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, esi
call fcn.00402877
mov eax, dword [esi + 8]
jmp 0x4046bc
push 9
pop eax
pop edi
pop ebx
leave
ret
Function at 0x404755
Capabilities:
Get file size
Parse pe header
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push esi
mov esi, eax
lea eax, [ebp - 0x48]
push eax
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
test eax, eax
jne 0x404775
inc eax
jmp 0x4048f3
mov ecx, dword [ebp - 0x48]
xor eax, eax
push ebx
xor ebx, ebx
mov edx, ecx
inc eax
and edx, eax
mov dword [ebp - 8], ebx
je 0x40478a
mov dword [ebp - 8], eax
test cl, 2
je 0x404793
or dword [ebp - 8], 2
test cl, 4
je 0x40479c
or dword [ebp - 8], 4
mov eax, ecx
and eax, 0x10
je 0x4047a7
or dword [ebp - 8], 0x10
test cl, 0x20
je 0x4047b0
or dword [ebp - 8], 0x20
cmp eax, ebx
je 0x4047bd
or dword [ebp - 8], 0x40000000
jmp 0x4047c4
or dword [ebp - 8], 0x80000000
or dword [ebp - 8], 0x1000000
cmp edx, ebx
jne 0x4047d6
or dword [ebp - 8], 0x800000
push ebx
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x3c], eax
cmp eax, 0x28
jbe 0x404898
cmp dword [esi + 0x10], ebx
jne 0x404898
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
push ebx
push ebx
push dword [esi + 0x48]
call edi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [esi + 0x48]
call ebx
push 0
push 0
push 0x24
push dword [esi + 0x48]
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x48]
call ebx
mov eax, 0x54ad
cmp word [ebp - 4], ax
jne 0x40488d
mov eax, dword [ebp - 0x10]
lea ecx, [eax + 0x34]
cmp dword [esi + 0x3c], ecx
jbe 0x40488d
push 0
push 0
push eax
push dword [esi + 0x48]
call edi
push 0
lea eax, [ebp - 0xc]
push eax
push 4
lea eax, [ebp - 0x14]
push eax
push dword [esi + 0x48]
call ebx
mov eax, dword [ebp - 0x14]
cmp eax, 0x5a4d
je 0x404886
cmp eax, 0x454e
je 0x404886
cmp eax, 0x454c
je 0x404886
cmp eax, 0x4550
jne 0x40488d
or dword [ebp - 8], 0x400000
xor eax, eax
push eax
push eax
push eax
push dword [esi + 0x48]
call edi
pop edi
push dword [ebp - 0x38]
mov eax, dword [ebp - 8]
mov esi, dword [ebp + 8]
push dword [ebp - 0x3c]
mov dword [esi + 0x10], eax
call fcn.00404733
push dword [ebp - 0x30]
mov dword [esi], eax
push dword [ebp - 0x34]
call fcn.00404733
push dword [ebp - 0x40]
mov dword [esi + 4], eax
push dword [ebp - 0x44]
call fcn.00404733
mov dword [esi + 8], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call fcn.004046da
movzx eax, word [ebp - 4]
movzx ecx, word [ebp - 8]
shl eax, 0x10
or eax, ecx
add esp, 0x28
mov dword [esi + 0xc], eax
xor eax, eax
pop ebx
pop esi
leave
ret
Function at 0x404fa1
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push edi
mov edi, edx
test ecx, ecx
jne 0x404fac
xor eax, eax
pop edi
ret
push esi
not eax
mov edx, 0xff
cmp edi, 8
jb 0x40505e
mov esi, edi
shr esi, 3
push ebx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
movzx ebx, byte [ecx]
xor ebx, eax
and ebx, edx
shr eax, 8
xor eax, dword [ebx*4 + 0x537a08]
inc ecx
sub edi, 8
dec esi
jne 0x404fc3
pop ebx
test edi, edi
je 0x405077
movzx esi, byte [ecx]
xor esi, eax
and esi, edx
shr eax, 8
xor eax, dword [esi*4 + 0x537a08]
inc ecx
dec edi
jne 0x405062
pop esi
not eax
pop edi
ret

Function at 0x40507c
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [ecx]
movsx edx, dl
xor edx, eax
push esi
mov esi, 0xff
and edx, esi
mov edx, dword [edx*4 + 0x537a08]
shr eax, 8
xor edx, eax
mov eax, dword [ecx + 8]
mov dword [ecx], edx
movzx edx, dl
add edx, dword [ecx + 4]
imul edx, edx, 0x8088405
inc edx
mov dword [ecx + 4], edx
shr edx, 0x18
xor edx, eax
and edx, esi
shr eax, 8
xor eax, dword [edx*4 + 0x537a08]
pop esi
mov dword [ecx + 8], eax
ret

Function at 0x4050ec
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
cmp dword [esi + 0x14], 0
jne 0x40518a
mov ecx, eax
shr ecx, 8
test byte [esi], 0x10
mov byte [ebp - 0xc], al
mov byte [ebp - 0xb], cl
je 0x40512b
push edi
lea edi, [esi + 0x24]
push eax
mov ecx, edi
call fcn.004050c2
push dword [ebp - 0xb]
mov ecx, edi
mov byte [ebp - 0xc], al
call fcn.004050c2
pop ecx
pop ecx
mov byte [ebp - 0xb], al
pop edi
test byte [esi], 1
je 0x405155
mov eax, dword [esi + 0x1c]
lea ecx, [eax + 2]
cmp ecx, dword [esi + 0x20]
jb 0x405144
mov dword [esi + 0x14], 0xb
leave
ret
mov ecx, dword [esi + 4]
mov dx, word [ebp - 0xc]
mov word [eax + ecx], dx
add dword [esi + 0x1c], 2
jmp 0x40517b
push 0
lea eax, [ebp - 4]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405174
cmp dword [ebp - 4], 2
je 0x40517b
mov dword [esi + 0x14], 3
test dword [esi], 0x40000000
je 0x40518a
mov dword [esi + 0x14], 0x14
leave
ret
Function at 0x40518c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
cmp edi, ebx
je 0x40527b
cmp dword [esi + 0x14], ebx
jne 0x40527b
test byte [esi], 0x10
je 0x40521b
mov eax, dword [esi + 0x30]
cmp eax, ebx
je 0x4051bf
cmp dword [esi + 0x34], edi
jae 0x4051bf
push eax
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [esi + 0x30], ebx
cmp dword [esi + 0x30], ebx
jne 0x4051e5
lea eax, [edi + edi]
push eax
push ebx
mov dword [esi + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [esi + 0x30], eax
cmp eax, ebx
jne 0x4051e5
mov dword [esi + 0x14], 2
jmp 0x40526c
push edi
push dword [ebp + 8]
push dword [esi + 0x30]
call fcn.0050bdd0
add esp, 0xc
test edi, edi
jbe 0x405214
mov eax, dword [esi + 0x30]
movzx eax, byte [eax + ebx]
push eax
lea ecx, [esi + 0x24]
call fcn.004050c2
pop ecx
mov ecx, dword [esi + 0x30]
mov byte [ebx + ecx], al
inc ebx
cmp ebx, edi
jb 0x4051f8
mov ecx, dword [esi + 0x30]
xor ebx, ebx
jmp 0x40521e
mov ecx, dword [ebp + 8]
test byte [esi], 1
je 0x40524c
mov eax, dword [esi + 0x1c]
lea edx, [eax + edi]
cmp edx, dword [esi + 0x20]
jb 0x405237
mov dword [esi + 0x14], 0xb
jmp 0x40526c
push edi
push ecx
mov ecx, dword [esi + 4]
add ecx, eax
push ecx
call fcn.0050bdd0
add esp, 0xc
add dword [esi + 0x1c], edi
jmp 0x40526c
push ebx
lea eax, [ebp - 4]
push eax
push edi
push ecx
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405265
cmp dword [ebp - 4], edi
je 0x40526c
mov dword [esi + 0x14], 3
test dword [esi], 0x40000000
je 0x40527b
mov dword [esi + 0x14], 0x14
pop ebx
leave
ret

Function at 0x405300
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi]
push edi
test eax, 0x40000000
je 0x405317
mov dword [esi + 0x14], 0x14
jmp 0x40536c
test al, al
jns 0x40534c
mov eax, dword [esi + 0x50]
mov edi, dword [esi + 0x4c]
cmp eax, edi
jae 0x40536c
sub edi, eax
mov dword [ebp - 4], edi
cmp edi, dword [ebp + 0xc]
jbe 0x405335
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], edi
mov ecx, dword [esi + 0x48]
push edi
add ecx, eax
push ecx
push dword [ebp + 8]
call fcn.0050bdd0
add esp, 0xc
add dword [esi + 0x50], edi
jmp 0x405373
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x48]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x405370
mov dword [esi + 0x14], 7
xor eax, eax
jmp 0x405388
mov edi, dword [ebp - 4]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0x44]
add dword [esi + 0x40], edi
mov edx, edi
call fcn.00404fa1
mov dword [esi + 0x44], eax
mov eax, edi
pop edi
leave
ret
Function at 0x406521
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
push esi
push edi
mov edi, ecx
and dword [edi + 0x6af50], 0
push 0x1fffc
mov ebx, eax
lea eax, [edi + 0x4af54]
push 0
mov esi, 0x10000
push eax
mov byte [edi + 0x6af81], 1
mov dword [edi + 0x6af54], esi
call fcn.0050c7f0
mov eax, ebx
shl eax, 3
movzx ecx, word [eax + 0x5379ba]
mov dword [edi + 0x6af74], ecx
movzx ecx, word [eax + 0x5379b8]
mov dword [edi + 0x6af78], ecx
movzx ecx, word [eax + 0x5379bc]
mov dword [edi + 0x6af7c], ecx
movzx eax, word [eax + 0x5379be]
add esp, 0xc
mov dword [edi + 0x6af70], eax
cmp ebx, 2
ja 0x40659f
mov eax, dword [esp + 0x10]
or word [eax], 4
jmp 0x4065ac
cmp ebx, 8
jb 0x4065ac
mov eax, dword [esp + 0x10]
or word [eax], 2
push esi
mov esi, dword [edi]
lea ebx, [edi + 0x1af54]
push ebx
call fcn.00405300
xor esi, esi
pop ecx
pop ecx
mov dword [edi + 0x6af6c], eax
cmp eax, esi
je 0x406611
mov byte [edi + 0x6af80], 0
mov dword [edi + 0x6af58], esi
mov dword [edi + 0x6af64], esi
cmp eax, 0x106
jae 0x4065e8
call fcn.00405a09
mov dword [edi + 0x6af5c], esi
xor eax, eax
movzx ecx, byte [ebx + eax]
mov edx, dword [edi + 0x6af5c]
shl edx, 5
xor ecx, edx
and ecx, 0x7fff
inc eax
mov dword [edi + 0x6af5c], ecx
cmp eax, 2
jb 0x4065f0
pop edi
pop esi
pop ebx
ret

Function at 0x4071f8
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
lea eax, [edi + ebx]
push 0x537e3c
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [ebp + 0x18]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp + 0xc], eax
cmp eax, 0xffffffff
je 0x4072c7
lea eax, [edi + ebx + 1]
mov dword [ebp - 4], eax
lea eax, [esi + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 8], eax
lea eax, [esi + 0x2c]
push eax
push dword [ebp - 4]
mov byte [edi + ebx], 0x5c
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
test byte [esi], 0x10
je 0x40728b
cmp byte [esi + 0x2c], 0x2e
jne 0x407267
mov al, byte [esi + 0x2d]
test al, al
je 0x4072ac
cmp al, 0x2e
je 0x4072ac
mov eax, dword [ebp - 8]
push esi
push dword [ebp + 0x14]
lea eax, [eax + ebx + 1]
push eax
push edi
push dword [ebp + 8]
call fcn.004071f8
add esp, 0x14
mov dword [esi + 0x1c], eax
test eax, eax
je 0x4072ac
mov eax, dword [esi + 0x1c]
jmp 0x4072c9
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp + 8]
push 2
add eax, edi
push 0
push eax
mov ecx, edi
call fcn.00406c0e
add esp, 0xc
mov dword [esi + 0x1c], eax
test eax, eax
jne 0x407286
mov ebx, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x407233
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4076f0
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525ab1
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x57f82c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x228], ecx
mov ecx, dword [ebp - 0x228]
call fcn.0040f864
push 0x64
push 1
mov ecx, dword [ebp - 0x228]
add ecx, 0x74
call fcn.00407840
push 0
push 0x26
lea eax, [ebp - 0x214]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push 0x537f54
push 0x537f64
lea ecx, [ebp - 0x21c]
call fcn.00401020
mov dword [ebp - 0x22c], eax
mov ecx, dword [ebp - 0x22c]
mov dword [ebp - 0x230], ecx
mov dword [ebp - 4], 0
mov edx, dword [ebp - 0x230]
push edx
lea eax, [ebp - 0x214]
push eax
lea ecx, [ebp - 0x220]
push ecx
call fcn.00407950
add esp, 0xc
mov dword [ebp - 0x234], eax
mov edx, dword [ebp - 0x234]
mov dword [ebp - 0x238], edx
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x238]
push eax
lea ecx, [ebp - 0x218]
push ecx
call fcn.00407880
add esp, 0xc
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x220]
call fcn.004019f0
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x21c]
call fcn.004019f0
lea ecx, [ebp - 0x218]
call fcn.00401750
push eax
mov ecx, dword [ebp - 0x228]
add ecx, 0xc8
call fcn.004174a1
mov dword [ebp - 0x224], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x218]
call fcn.004019f0
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050c6c0
mov esp, ebp
pop ebp
ret
Function at 0x407d50
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x525b10
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x34
push ebx
push esi
push edi
mov eax, dword [0x57f82c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 0x10
mov dword [ebp - 4], 0
lea eax, [ebp - 0x14]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x407daf
xor eax, eax
jmp 0x407ec5
lea ecx, [ebp - 0x40]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x407ddb
cmp dword [ebp - 0x14], 0
je 0x407dd4
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x407ec5
mov dword [ebp - 0x38], 1
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], 0
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x24]
push eax
push 0x10
lea ecx, [ebp - 0x38]
push ecx
push 0
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x407e2a
cmp dword [ebp - 0x14], 0
je 0x407e23
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x407ec5
mov dword [ebp - 0x24], 1
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x18]
or eax, 2
mov dword [ebp - 0x18], eax
push 0
push 0
mov ecx, dword [ebp - 0x28]
push ecx
lea edx, [ebp - 0x24]
push edx
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x407e76
cmp dword [ebp - 0x14], 0
je 0x407e72
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x407ec5
jmp 0x407ea2
mov dword [ebp - 4], 0xffffffff
jmp 0x407eb0
cmp dword [ebp - 0x14], 0
je 0x407ec0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x407f70
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x14]
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], 4
mov dword [ebp - 8], 4
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x407fa5
mov eax, dword [ebp + 0x14]
jmp 0x407fe1
lea ecx, [ebp - 8]
push ecx
lea edx, [ebp - 4]
push edx
lea eax, [ebp - 0x10]
push eax
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x407fd4
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x14]
jmp 0x407fe1
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x407ff0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x5c
mov dword [ebp - 0xc], 1
mov dword [ebp - 4], 0x200
mov eax, dword [ebp - 4]
push eax
push 0
mov ecx, dword [ebp + 0x14]
push ecx
call fcn.0050c7f0
add esp, 0xc
lea edx, [ebp - 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x408034
or eax, 0xffffffff
jmp 0x408181
lea edx, [ebp - 4]
push edx
mov eax, dword [ebp + 0x14]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x408066
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or eax, 0xffffffff
jmp 0x408181
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x14], ecx
mov edx, dword [ebp - 0x10]
mov al, byte [edx]
mov byte [ebp - 0x15], al
add dword [ebp - 0x10], 1
cmp byte [ebp - 0x15], 0
jne 0x40807f
mov ecx, dword [ebp - 0x10]
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], ecx
cmp dword [ebp - 0x1c], 2
jbe 0x40817e
mov edx, dword [ebp + 0x14]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp - 0x20]
mov dl, byte [ecx]
mov byte [ebp - 0x25], dl
add dword [ebp - 0x20], 1
cmp byte [ebp - 0x25], 0
jne 0x4080b3
mov eax, dword [ebp - 0x20]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 0x14]
add ecx, dword [ebp - 0x2c]
movsx edx, byte [ecx - 1]
cmp edx, 0xa
jne 0x408111
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x30]
mov al, byte [edx]
mov byte [ebp - 0x35], al
add dword [ebp - 0x30], 1
cmp byte [ebp - 0x35], 0
jne 0x4080ec
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 0x3c]
mov byte [edx - 1], 0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
add ecx, 1
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x40]
mov al, byte [edx]
mov byte [ebp - 0x45], al
add dword [ebp - 0x40], 1
cmp byte [ebp - 0x45], 0
jne 0x408120
mov ecx, dword [ebp - 0x40]
sub ecx, dword [ebp - 0x44]
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp + 0x14]
add edx, dword [ebp - 0x4c]
movsx eax, byte [edx - 1]
cmp eax, 0xd
jne 0x40817e
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
add edx, 1
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x50]
mov cl, byte [eax]
mov byte [ebp - 0x55], cl
add dword [ebp - 0x50], 1
cmp byte [ebp - 0x55], 0
jne 0x408159
mov edx, dword [ebp - 0x50]
sub edx, dword [ebp - 0x54]
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp + 0x14]
add eax, dword [ebp - 0x5c]
mov byte [eax - 1], 0
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret