joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404840
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x45dedc]
sub esp, 0x108
test eax, eax
push ebp
push esi
push edi
mov esi, ecx
je 0x4048ae
mov edi, dword [esp + 0x118]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [esp + 0xc]
push 0
push eax
lea ecx, [esp + 0x18]
push 0x100
push ecx
push edi
call ebp
test eax, eax
je 0x404881
mov eax, dword [esp + 0xc]
test eax, eax
jne 0x404894
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x4048ae
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4048a5
mov edx, dword [esi]
mov byte [esp + eax + 0x10], 0
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call dword [edx + 8]
mov eax, dword [0x45dedc]
test eax, eax
jne 0x404861
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x108
ret 4

Function at 0x404920
Capabilities:
Write file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
mov edx, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [edx + 0x14]
not ecx
dec ecx
test eax, eax
je 0x404959
test ecx, ecx
jbe 0x404959
lea edx, [esp + 0xc]
push 0
push edx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404959
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
ret 4

Function at 0x411db1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x45fb28
cmp edx, dword [eax]
je 0x411dd3
add eax, 8
inc ecx
cmp eax, 0x45fbb8
jl 0x411dc4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x45fb28]
jne 0x411f01
mov eax, dword [0x462a08]
cmp eax, 1
je 0x411edb
test eax, eax
jne 0x411e04
cmp dword [0x45f64c], 1
je 0x411edb
cmp edx, 0xfc
je 0x411f01
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x411e3b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00410aa0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.004109a0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x411e7e
lea eax, [ebp - 0x1a4]
push eax
call fcn.004109a0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x44d27c
push edi
call fcn.00414710
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00410aa0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00410ab0
lea eax, [ebp - 0xa0]
push 0x44d25c
push eax
call fcn.00410ab0
push dword [esi + 0x45fb2c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00410ab0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00414da7
add esp, 0x2c
pop edi
jmp 0x411f01
lea eax, [ebp + 8]
lea esi, [esi + 0x45fb2c]
push 0
push eax
push dword [esi]
call fcn.004109a0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x41a4a0
Capabilities:
Get graphical window text

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov esi, dword [ebp + 0x10]
push 0xf00021
mov edx, dword [esi + 4]
mov ecx, dword [esi]
mov eax, dword [esi + 0xc]
sub eax, edx
push eax
mov eax, dword [esi + 8]
sub eax, ecx
push eax
push edx
push ecx
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.GDI32.dll_PatBlt]
mov edi, dword [ebp + 8]
push edi
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
mov ebx, eax
lea eax, [eax + 5]
add eax, 3
and eax, 0xfffffffc
call fcn.0040e530
mov dword [ebp - 4], esp
cmp dword [ebp - 4], 0
je 0x41a56b
add ebx, 2
mov eax, dword [ebp - 4]
push ebx
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowTextA]
test eax, eax
je 0x41a56b
mov bx, 0x140
mov edi, dword [ebp + 0x14]
mov eax, edi
and al, 0xf
cmp al, 0xc
je 0x41a51e
mov ebx, edi
and bx, 0xf
or bx, 0x150
test edi, 0x80
je 0x41a529
or bh, 8
and edi, 0x8000000
je 0x41a544
mov eax, dword [0x4641bc]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0xc]
movzx eax, bx
push eax
push esi
push 0xffffffffffffffff
push ecx
push edx
call dword [sym.imp.USER32.dll_DrawTextA]
test edi, edi
je 0x41a56b
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 0xc]
push eax
push ecx
call dword [sym.imp.GDI32.dll_SetTextColor]
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41a940
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 8]
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push ebp
push 2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x41a96b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x41a98f
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
push ebx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
jne 0x41a9aa
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
mov edi, ebp
mov ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x20]
xor ecx, ecx
mov cl, ah
mov edx, eax
mov dword [esp + 0x10], 0
shl ecx, 8
shr edx, 0x10
mov byte [esp + 0x10], dl
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x28]
or ecx, edx
mov edx, eax
shr edx, 0x10
mov dword [ebp + 0x28], ecx
mov dword [esp + 0x10], 0
xor ecx, ecx
mov byte [esp + 0x10], dl
mov cl, ah
xor edx, edx
shl ecx, 8
mov dl, al
shl edx, 0x10
or ecx, dword [esp + 0x10]
or ecx, edx
mov eax, dword [esp + 0x24]
mov edx, eax
mov dword [ebp + 0x44], ecx
shr edx, 0x10
xor ecx, ecx
mov dword [esp + 0x10], 0
mov cl, ah
mov byte [esp + 0x10], dl
shl ecx, 8
xor edx, edx
or ecx, dword [esp + 0x10]
mov dl, al
shl edx, 0x10
mov eax, dword [esp + 0x2c]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x48], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x30]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x64], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
mov eax, dword [esp + 0x34]
or ecx, edx
xor edx, edx
mov dl, al
mov dword [ebp + 0x54], ecx
shl edx, 0x10
xor ecx, ecx
mov cl, ah
shl ecx, 8
push 0
shr eax, 0x10
or ecx, edx
xor edx, edx
mov dl, al
or ecx, edx
mov dword [ebp + 0x50], ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0
push ebp
lea ecx, [ebp + 0x68]
push ecx
push 4
push ebp
push edi
call dword [sym.imp.GDI32.dll_CreateDIBitmap]
mov esi, eax
push edi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, esi
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 0x20
Function at 0x41d995
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x41d9b7
cmp dword [edi + 0x3c], 0
jne 0x41d9b7
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.00436617
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.0041d9e4
pop edi
pop esi
pop ebx
ret 8

Function at 0x41da32
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
call fcn.00436617
mov esi, dword [eax + 0xc]
push 5
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x41da63
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push esi
mov ecx, ebx
push dword [esp + 0x18]
push edi
call fcn.0041da76
pop edi
pop esi
pop ebx
ret 8

Function at 0x41f02f
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x41f067
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.004223fa
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004223d2
jmp 0x41f073
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x420c65
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x420ca7
call fcn.00436617
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x420ca7
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x420c9e
xor eax, eax
jmp 0x420caf
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00420cb5
pop edi
pop esi
pop ebx
ret 4

Function at 0x437e72
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x437ea0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x437ebe
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00437dd8
jmp 0x437ebe
mov eax, dword [esi + 0x14]
test eax, eax
je 0x437ebe
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00437dd8
test edi, edi
mov eax, edi
jne 0x437ea8
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x403420
Capabilities:
Set file attributes

Disassembly:
push 0x80
call fcn.00402f30
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
ret

Function at 0x403440
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop ebp
ret 8

Function at 0x403460
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push 7
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
pop ebp
ret 4

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [ebp + 8]
push 0x105
push eax
lea ecx, [ebp - 0x20c]
push ecx
call dword [sym.imp.MSVCR80.dll_wcsncpy]
lea eax, [ebp - 0x20c]
add esp, 0xc
mov word [ebp - 4], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403c11
sub eax, edx
sar eax, 1
cmp word [ebp + eax*2 - 0x20e], 0x5c
je 0x403c4a
push edi
lea edi, [ebp - 0x20c]
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x403c35
mov edx, dword [0x41f1f0]
mov dword [edi], edx
pop edi
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403c53
mov ecx, dword [ebp + 0xc]
sub eax, edx
sar eax, 1
test ecx, ecx
je 0x403c82
mov edx, 0x105
sub edx, eax
push edx
push ecx
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.MSVCR80.dll_wcsncat]
add esp, 0xc
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea ecx, [ebp - 0x20c]
push ecx
mov word [ebp - 4], 0
call esi
cmp eax, 0xffffffff
jne 0x403cd7
lea edx, [ebp - 0x20c]
push 0x41f698
push edx
call dword [sym.imp.MSVCR80.dll__wfopen]
add esp, 8
test eax, eax
jne 0x403cbf
xor al, al
pop esi
mov esp, ebp
pop ebp
ret 8
push eax
call dword [sym.imp.MSVCR80.dll_fclose]
add esp, 4
lea eax, [ebp - 0x20c]
push eax
call esi
cmp eax, 0xffffffff
je 0x403cdb
test al, 1
jne 0x403cb6
mov al, 1
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x404380
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa20
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, edi
mov esi, ecx
lea edx, [eax + 2]
xor ebx, ebx
jmp 0x4043a0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4043a0
sub eax, edx
sar eax, 1
cmp word [edi + eax*2 - 2], 0x5c
jne 0x4043e2
mov eax, dword [esi + 0x42c]
push eax
push edi
mov ecx, esi
call fcn.00403be0
lea ecx, [esi + 0xc]
test al, al
mov eax, dword [ecx]
je 0x404490
mov edx, dword [eax + 0x18]
push edi
call edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4043f2
test al, 0x10
jne 0x4043b7
lea eax, [ebp - 0x620]
push eax
lea ecx, [ebp - 0xa20]
push ecx
lea edx, [ebp - 0x820]
push edx
lea eax, [ebp - 8]
push eax
push edi
mov word [ebp - 0x620], bx
mov word [ebp - 0xa20], bx
mov word [ebp - 0x820], bx
mov word [ebp - 8], bx
mov word [ebp - 0x214], bx
mov word [ebp - 0x420], bx
call dword [sym.imp.MSVCR80.dll__wsplitpath]
mov edi, dword [sym.imp.MSVCR80.dll__wmakepath]
push ebx
push ebx
lea ecx, [ebp - 0x820]
push ecx
lea edx, [ebp - 8]
push edx
lea eax, [ebp - 0x420]
push eax
call edi
lea ecx, [ebp - 0x620]
push ecx
lea edx, [ebp - 0xa20]
push edx
push ebx
lea eax, [ebp - 0x214]
push ebx
push eax
call edi
add esp, 0x3c
lea ecx, [ebp - 0x214]
push ecx
lea edx, [ebp - 0x420]
push edx
mov ecx, esi
call fcn.00403be0
test al, al
jne 0x4044a0
mov eax, dword [esi + 0xc]
lea ecx, [esi + 0xc]
mov edx, dword [eax + 0x20]
push 1
call edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp word [ebp - 0x420], bx
je 0x4044bb
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x18]
lea ecx, [esi + 0xc]
lea edx, [ebp - 0x420]
push edx
call eax
cmp word [ebp - 0x214], bx
je 0x4044d6
mov edx, dword [esi + 0xc]
mov edx, dword [edx + 0x1c]
lea ecx, [esi + 0xc]
lea eax, [ebp - 0x214]
push eax
call edx
mov ecx, esi
call fcn.00403e80
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x404760
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov ecx, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
lea eax, [ebp - 4]
push eax
push 0
push 0
push 0
push esi
push ecx
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
je 0x4047d0
cmp ebx, 0xa1
je 0x4047c1
cmp ebx, 2
je 0x4047c1
call fcn.004044f0
mov edi, dword [eax]
mov dword [ebp - 8], eax
add edi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 8]
push eax
mov eax, dword [edi]
push ebx
push esi
push str.Unable_to_get_reqd_size_for_value__tag__s___returned__d__GLE__d_
push edx
call eax
add esp, 0x14
mov eax, 0xffff3cad
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
add eax, 2
call fcn.0041b450
mov edi, esp
test edi, edi
jne 0x40480c
call fcn.004044f0
mov edx, dword [ebp - 4]
mov ecx, dword [eax]
add edx, 2
push edx
push str.Unable_to_allocate__d_bytes_getting_registry_value
push eax
mov eax, dword [ecx + 0x28]
call eax
add esp, 0xc
mov eax, 0x8000
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 4]
push ecx
push edi
push 0
push 0
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
jne 0x404845
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
shr eax, 1
push edi
mov word [edi + eax*2], bx
call dword [sym.imp.MSVCP80.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::assign_wchar_t_const__]
xor eax, eax
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.004044f0
mov edi, dword [eax]
mov dword [ebp - 8], eax
add edi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 8]
mov edx, dword [edi]
push eax
push ebx
push esi
push str.Failure_getting_value_for_tag__s_returned__d__GLE__d_
push ecx
call edx
add esp, 0x14
mov eax, 0x8000
lea esp, [ebp - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4048f0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0x14]
lea edx, [ebp + 0xc]
push edx
push 0
push 0
push 0
push edi
lea ecx, [eax + eax]
push ebx
mov dword [ebp - 4], ecx
mov dword [ebp + 0xc], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
je 0x404976
cmp esi, 0xa1
je 0x40495a
cmp esi, 2
je 0x40495a
call fcn.004044f0
mov ebx, dword [eax]
mov dword [ebp - 8], eax
add ebx, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebx]
push eax
mov eax, dword [ebp - 8]
push esi
push edi
push str.Unable_to_get_reqd_size_for_value__tag__s___returned__d__GLE__d_
push eax
call ecx
add esp, 0x14
mov eax, esi
sub eax, 0xa1
neg eax
sbb eax, eax
pop edi
and eax, 0x14353
pop esi
add eax, 0xffff3cad
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0xc]
cmp edx, dword [ebp - 4]
jbe 0x4049a8
call fcn.004044f0
mov edx, dword [ebp + 0xc]
mov ecx, dword [eax]
push edx
mov edx, dword [ebp - 4]
push edx
push edi
push str.Insufficient_space_getting_value__s_from_key__d____d
push eax
mov eax, dword [ecx + 0x28]
call eax
add esp, 0x14
pop edi
pop esi
mov eax, 0xffffff57
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 8]
lea ecx, [ebp - 4]
push ecx
push edx
push 0
push 0
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test ebx, ebx
je 0x4049f4
call fcn.004044f0
mov esi, dword [eax]
mov dword [ebp - 8], eax
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [ebp - 8]
push ebx
push edi
push str.Unable_to_get_value__s_from_key_returned__d__GLE__d_
push eax
call ecx
add esp, 0x14
pop edi
pop esi
mov eax, 0x8000
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404a00
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push 0
push 0
mov dword [eax], 0
mov eax, dword [ebp + 0xc]
push edx
push eax
mov dword [ebp - 4], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test edi, edi
je 0x404a75
push ebx
push esi
call fcn.004044f0
mov ebx, eax
mov esi, dword [ebx]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi]
push eax
push edi
push ecx
push str.Unable_to_get_value__s_from_key_returned__d__GLE__d_
push ebx
call edx
add esp, 0x14
mov eax, edi
sub eax, 0xa1
neg eax
sbb eax, eax
pop esi
and eax, 0x14353
pop ebx
add eax, 0xffff3cad
pop edi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret
Function at 0x404a80
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
call fcn.004044f0
mov esi, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x40]
push esi
push edi
push str.Setting__s___s
push eax
call edx
mov eax, esi
add esp, 0x10
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404aa7
mov ecx, dword [ebp + 8]
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push esi
push 1
push 0
push edi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
je 0x404b01
push ebx
call fcn.004044f0
mov ebx, eax
mov edi, dword [ebx]
add edi, 0x30
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 0xc]
push eax
mov eax, dword [edi]
push esi
push edx
push str.Failure_updating__s_returned__d__GLE__d_
push ebx
call eax
add esp, 0x14
pop ebx
pop edi
mov eax, 0x8000
pop esi
pop ebp
ret
pop edi
xor eax, eax
pop esi
pop ebp
ret

Function at 0x404b10
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
call fcn.004044f0
mov edx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov ecx, dword [eax]
push edx
push edi
push str.Setting__s___d
push eax
mov eax, dword [ecx + 0x40]
call eax
mov edx, dword [ebp + 8]
add esp, 0x10
push 4
lea ecx, [ebp + 0x10]
push ecx
push 4
push 0
push edi
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
test ebx, ebx
je 0x404b81
push esi
call fcn.004044f0
mov esi, dword [eax]
mov dword [ebp - 4], eax
add esi, 0x30
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [ebp - 4]
push ebx
push edi
push str.Failure_updating__s_returned__d__GLE__d_
push eax
call ecx
add esp, 0x14
pop esi
pop edi
mov eax, 0x8000
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404b90
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x814
mov ecx, dword [0x42ece0]
mov edx, dword [ebp + 0xc]
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
or ecx, 0xf003f
push ecx
push 0
push edx
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
test ebx, ebx
je 0x404bf8
call fcn.004044f0
mov edi, eax
mov esi, dword [edi]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0xc]
mov edx, dword [esi]
push eax
push ebx
push ecx
push str.DeleteKeyRecursive:_Unable_to_open_registry_key__s_returned__d__GLE__d_
push edi
call edx
add esp, 0x14
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 4]
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0
push 0
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x404ca0
mov esi, dword [ebp - 0xc]
add esi, 0xffffffff
mov dword [ebp - 8], esi
js 0x404ca0
nop
mov edx, dword [ebp - 4]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x814]
push ecx
push esi
push edx
mov dword [ebp - 0x10], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
mov ebx, eax
test ebx, ebx
je 0x404c81
call fcn.004044f0
mov edi, eax
mov esi, dword [edi]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov eax, dword [esi]
push ebx
push str.DeleteKeyRecursive:_Unable_to_enumerate_registry_keys_returned__d__GLE__d_
push edi
call eax
mov esi, dword [ebp - 8]
add esp, 0x10
jmp 0x404c98
mov edx, dword [ebp - 4]
lea ecx, [ebp - 0x814]
push ecx
push edx
call fcn.00404b90
add esp, 8
test eax, eax
jne 0x404ce5
sub esi, 1
mov dword [ebp - 8], esi
jns 0x404c30
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov edi, eax
test edi, edi
je 0x404ce3
call fcn.004044f0
mov ebx, eax
mov esi, dword [ebx]
add esi, 0x40
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esi]
push eax
mov eax, dword [ebp + 0xc]
push edi
push eax
push str.DeleteKeyRecursive:_Unable_to_delete_key__s_returned__d__GLE__d_
push ebx
call ecx
add esp, 0x14
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret