joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4044f0
Capabilities:
Check os version

Disassembly:
sub esp, 0xc
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x24]
push esi
mov dword [esp + 0xc], ecx
push edi
mov edi, dword [esp + 0x24]
mov esi, edx
mov ecx, ebx
mov dword [esp + 0x14], eax
call fcn.004058f0
test al, al
jne 0x40455c
mov edx, dword [edi + 4]
test edx, edx
jne 0x404531
mov edx, dword [edi + 8]
mov ecx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x14]
push 0x1f
call fcn.00406870
add esp, 8
mov eax, 0x57
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040850f
add esp, 0xc
ret
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp esi, 0x190
jne 0x4045bc
call fcn.004031c0
test al, al
je 0x4045bc
call fcn.00406dc0
movzx eax, ax
cmp ax, 6
je 0x40459e
cmp ax, 9
je 0x40459e
test ax, ax
jne 0x4045bc
mov edx, dword [esp + 0x14]
push str.wic_x86_enu.exe
push str.http:__download.microsoft.com_download_f_f_1_ff178bb1_da91_48ed_89e5_478a99387d4f_
push edi
push edx
jmp 0x4045ae
mov eax, dword [esp + 0x14]
push str.wic_x64_enu.exe
push str.http:__download.microsoft.com_download_6_4_5_645fed5f_a6e7_44d9_9d10_fe83348796b0_
push edi
push eax
mov ecx, dword [esp + 0x20]
mov edx, ebp
call fcn.00403260
add esp, 0x10
mov ecx, ebx
call fcn.00404650
mov ebp, eax
sub eax, 0
je 0x404630
sub eax, 2
je 0x40460d
sub eax, 0xbc0
je 0x404630
mov eax, dword [edi + 4]
test eax, eax
je 0x4045e1
mov edi, eax
jmp 0x4045e4
mov edi, dword [edi + 8]
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
push 0x26
mov ecx, edi
call fcn.004065e0
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 8]
xor ecx, esp
call fcn.0040850f
add esp, 0xc
ret
mov eax, dword [edi + 4]
test eax, eax
je 0x404618
mov edi, eax
jmp 0x40461b
mov edi, dword [edi + 8]
mov ecx, dword [esp + 0x14]
push ebx
mov ebx, dword [esp + 0x14]
push 0x1c
mov edx, edi
call fcn.00406870
add esp, 8
mov ecx, dword [esp + 0x18]
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
xor ecx, esp
call fcn.0040850f
add esp, 0xc
ret
Function at 0x405080
Capabilities:
Get common file path

Disassembly:
sub esp, 0x210
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x21c]
push edi
xor ebx, ebx
push 0x103
lea eax, [esp + 0x15]
push ebx
push eax
mov byte [esp + 0x1c], bl
call fcn.00409070
push 0x103
lea ecx, [esp + 0x125]
push ebx
push ecx
mov byte [esp + 0x12c], bl
call fcn.00409070
add esp, 0x18
push 0x104
lea edx, [esp + 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
je 0x40522a
cmp eax, 0x104
ja 0x40522a
lea eax, [esp + 0x10]
lea edx, [esp + 0x114]
mov ecx, eax
push esi
xor edi, edi
mov esi, 0x104
sub edx, ecx
mov edi, edi
mov cl, byte [edx + eax]
cmp cl, bl
je 0x405123
mov byte [eax], cl
add eax, 1
sub esi, 1
jne 0x405110
jmp 0x405127
cmp esi, ebx
jne 0x40512f
sub eax, 1
mov edi, 0x8007007a
cmp edi, ebx
mov byte [eax], bl
pop esi
jl 0x40514c
mov ecx, 0x104
lea eax, [esp + 0x10]
nop
cmp byte [eax], bl
je 0x405160
add eax, 1
sub ecx, 1
jne 0x405140
push ebx
push ebx
push str._Info__Cant_obtain_msi.dll_path__assuming_upgrade_is_necessary
call fcn.004070f0
add esp, 0xc
jmp 0x40525d
cmp ecx, ebx
je 0x40514c
mov eax, 0x104
sub eax, ecx
mov ecx, 0x104
sub ecx, eax
lea edx, [esp + eax + 0x10]
mov eax, str.MSI.DLL
call fcn.004013f0
cmp eax, ebx
jl 0x40514c
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
jne 0x4051a7
push ebx
push ebx
push str._Info__Cant_load_msi.dll__assuming_upgrade_is_necessary
call fcn.004070f0
add esp, 0xc
jmp 0x40525d
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esp + 0xc]
push eax
lea ebx, [esp + 0x14]
call fcn.00406bd0
add esp, 4
test eax, eax
je 0x4051d9
push 0
push 0
push str._Info__Cant_obtain_version_information__assuming_upgrade_is_necessary
call fcn.004070f0
add esp, 0xc
jmp 0x40525d
mov ecx, dword [esp + 0xc]
mov eax, ecx
shr eax, 0x10
imul eax, eax, 0x64
movzx ecx, cx
add eax, ecx
cmp eax, ebp
jae 0x4051ff
push ebp
push eax
mov ebx, str._Info__Windows_Installer_upgrade_is_required.__System_Version___d__Minimum_Version___d._n
call fcn.00407080
add esp, 8
jmp 0x40525d
push 0
push 0
push str._Info__No_MSI_upgrade_is_necessary.__System_version_meets_minimum_requirements_n
call fcn.004070f0
add esp, 0xc
pop edi
pop ebp
xor al, al
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0040850f
add esp, 0x210
ret
cmp dword [0x417fb0], 0xffffffff
jne 0x405238
call fcn.00406fb0
cmp dword [0x418b34], ebx
jne 0x405248
cmp dword [0x417fb0], ebx
je 0x40525d
push str._Info__Cant_obtain_system_directory__assuming_upgrade_is_necessary
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, str._Info__Cant_obtain_system_directory__assuming_upgrade_is_necessary
call fcn.00407260
mov ecx, dword [esp + 0x218]
pop edi
pop ebp
pop ebx
xor ecx, esp
mov al, 1
call fcn.0040850f
add esp, 0x210
ret
Function at 0x405a90
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x64
push esi
push edi
push 0
push ebx
push str._Info__Running_update_package_from______s_n
call fcn.004070f0
xor eax, eax
push 0x44
push eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x24], 0
call fcn.00409070
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0x18
push str.__quiet__norestart
mov dword [esp + 0x24], 0x44
mov dword [esp + 0x50], 1
mov word [esp + 0x54], 5
call esi
push ebx
mov edi, eax
call esi
lea esi, [edi + eax + 3]
push esi
call fcn.0040885b
mov edi, eax
add esp, 4
test edi, edi
jne 0x405b15
mov dword [esp + 0xc], 0xe
jmp 0x405c04
cmp esi, 0x7fffffff
ja 0x405bf3
mov eax, 0x414148
mov ecx, esi
mov edx, edi
call fcn.004013f0
test eax, eax
jl 0x405bf3
xor edx, edx
test esi, esi
mov ecx, esi
mov eax, edi
je 0x405b53
cmp byte [eax], dl
je 0x405b4f
add eax, 1
sub ecx, 1
jne 0x405b41
jmp 0x405b53
test ecx, ecx
jne 0x405bc6
mov edx, 0x80070057
xor eax, eax
test edx, edx
jl 0x405bf3
mov ecx, esi
sub ecx, eax
lea edx, [eax + edi]
mov eax, ebx
call fcn.004013f0
test eax, eax
jl 0x405bf3
push 0x414148
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405bf3
push str.__quiet__norestart
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405bf3
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x405bcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0xc], eax
jmp 0x405bfb
mov eax, esi
sub eax, ecx
jmp 0x405b5a
mov eax, dword [esp + 0x10]
push eax
call fcn.00405e10
add esp, 4
test eax, eax
mov dword [esp + 0xc], eax
jne 0x405bfb
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x405bfb
mov dword [esp + 0xc], 0x643
push edi
call fcn.00407d45
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x405c15
push eax
call esi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x405c20
push eax
call esi
mov eax, dword [esp + 0xc]
pop edi
pop esi
add esp, 0x64
ret
Function at 0x405c30
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x60
push ebx
push ebp
mov ebp, dword [esp + 0x6c]
push esi
push edi
mov ebx, eax
xor eax, eax
push 0x44
push eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x30]
push eax
call fcn.00409070
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
add esp, 0xc
push ebx
mov dword [esp + 0x2c], 0x44
mov dword [esp + 0x58], 1
mov word [esp + 0x5c], 5
call esi
push ebp
mov edi, eax
call esi
lea esi, [edi + eax + 0xa]
push esi
call fcn.0040885b
mov edi, eax
add esp, 4
test edi, edi
jne 0x405ca8
mov dword [esp + 0x14], 0xe
jmp 0x405dd5
cmp esi, 0x7fffffff
ja 0x405dc4
mov eax, 0x414148
mov ecx, esi
mov edx, edi
call fcn.004013f0
test eax, eax
jl 0x405dc4
xor edx, edx
test esi, esi
mov ecx, esi
mov eax, edi
je 0x405cea
cmp byte [eax], dl
je 0x405ce2
add eax, 1
sub ecx, 1
jne 0x405cd4
jmp 0x405cea
test ecx, ecx
jne 0x405d94
mov edx, 0x80070057
xor eax, eax
test edx, edx
jl 0x405dc4
mov ecx, esi
sub ecx, eax
lea edx, [eax + edi]
mov eax, ebx
call fcn.004013f0
test eax, eax
jl 0x405dc4
push 0x414148
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405dc4
cmp dword [0x418b34], 0
mov eax, str.__vq__
jne 0x405d36
mov eax, str.__v__
push eax
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405dc4
push ebp
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405dc4
push 0x414148
mov ecx, esi
call fcn.00401340
test eax, eax
jl 0x405dc4
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x2c]
push edx
push 0
push 0
push 0x4000000
push 0
push 0
push 0
push edi
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x405d9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
jmp 0x405dcc
mov eax, esi
sub eax, ecx
jmp 0x405cf1
mov eax, dword [esp + 0x18]
push eax
call fcn.00405e10
add esp, 4
test eax, eax
mov dword [esp + 0x14], eax
jne 0x405dcc
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x14]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
jmp 0x405dcc
mov dword [esp + 0x14], 0x643
push edi
call fcn.00407d45
add esp, 4
mov eax, dword [esp + 0x18]
test eax, eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x405de6
push eax
call esi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x405df1
push eax
call esi
mov eax, dword [esp + 0x14]
push eax
mov ebx, str._Info__Verification_of_Update_returned__d_n
call fcn.00407010
mov eax, dword [esp + 0x18]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x60
ret
Function at 0x4062e0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, dword [esp + 0x10]
push esi
push edi
mov edi, dword [esp + 0x10]
push 0x28
mov esi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4063a2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4063a2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406374
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
mov edi, eax
mov eax, dword [ebp]
cmp edi, eax
jbe 0x40634a
mov dword [ebp], edi
pop ebx
pop edi
pop esi
mov eax, 0xea
pop ebp
ret
push 0
push 0
push eax
mov eax, dword [esp + 0x24]
push eax
push 0xffffffffffffffff
push esi
push 0
push 0
call ebx
test eax, eax
jne 0x40636b
pop ebx
pop edi
pop esi
mov eax, 0x65b
pop ebp
ret
mov dword [ebp], edi
mov edi, dword [esp + 0x14]
jmp 0x406388
cmp dword [ebp], 1
mov dword [ebp], 1
jb 0x406340
mov ecx, dword [esp + 0x18]
mov byte [ecx], 0
mov edx, dword [esp + 0x18]
push edx
push edi
push str._Resource__lpName___s__lpBuf___s_n
call fcn.004070f0
add esp, 0xc
pop ebx
pop edi
pop esi
xor eax, eax
pop ebp
ret
push 0
push edi
push str._Resource__lpName___s_NOT_FOUND_n
call fcn.004070f0
add esp, 0xc
pop edi
pop esi
mov eax, 0x716
pop ebp
ret

Function at 0x406bd0
Capabilities:
Get file version info

Disassembly:
sub esp, 0x10
push ebp
push esi
lea eax, [esp + 0x10]
push eax
xor ebp, ebp
push ebx
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], 0xffffffff
call sub.VERSION.dll_GetFileVersionInfoSizeA
mov esi, eax
cmp esi, ebp
je 0x406c70
push edi
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
jne 0x406c29
lea ebp, [eax + 8]
test edi, edi
je 0x406c12
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x406c21
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
pop esi
mov eax, ebp
pop ebp
add esp, 0x10
ret
mov ecx, dword [esp + 0x14]
push edi
push esi
push ecx
push ebx
call sub.VERSION.dll_GetFileVersionInfoA
test eax, eax
je 0x406c66
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x10]
push eax
push 0x414834
push edi
call sub.VERSION.dll_VerQueryValueA
test eax, eax
je 0x406c07
cmp dword [esp + 0x18], ebp
je 0x406c07
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 8]
mov dword [esp + 0x10], edx
jmp 0x406c07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x406c07
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
jmp 0x406c13
Function at 0x406d20
Capabilities:
Check os version

Disassembly:
sub esp, 0xa4
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0xa0], eax
push 0x94
lea eax, [esp + 8]
push 0
push eax
call fcn.00409070
add esp, 0xc
lea ecx, [esp + 4]
push ecx
mov dword [esp + 8], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 8], 5
jae 0x406d79
xor al, al
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.0040850f
add esp, 0xa4
ret
push 0
push 2
call fcn.00406c80
add esp, 8
test al, al
jne 0x406da9
push 0
push 1
call fcn.00406c80
add esp, 8
test al, al
jne 0x406da9
push 3
push 0
call fcn.00406c80
add esp, 8
test al, al
je 0x406d62
mov ecx, dword [esp + 0xa0]
xor ecx, esp
mov al, 1
call fcn.0040850f
add esp, 0xa4
ret

Function at 0x406dc0
Capabilities:
Get system information on windows

Disassembly:
sub esp, 0x24
push esi
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x406dee
push str.GetNativeSystemInfo
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x406dee
lea ecx, [esp + 4]
push ecx
call eax
jmp 0x406df9
lea edx, [esp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
test esi, esi
je 0x406e04
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ax, word [esp + 4]
pop esi
add esp, 0x24
ret

Function at 0x406fb0
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x44
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x40], eax
xor eax, eax
push 0x3f
push eax
mov dword [0x417fb0], eax
mov byte [esp + 8], al
lea eax, [esp + 9]
push eax
call fcn.00409070
add esp, 0xc
push 0x40
lea ecx, [esp + 4]
push ecx
push str._MSI_WEB_BOOTSTRAP_DEBUG
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x406fff
cmp byte [esp], 0x31
jne 0x406fff
mov dword [0x417fb0], 1
mov ecx, dword [esp + 0x40]
xor ecx, esp
call fcn.0040850f
add esp, 0x44
ret

Function at 0x4071c0
Capabilities:
Delete file
Query environment variable

Disassembly:
sub esp, 0x10c
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x108], eax
push 0x105
lea eax, [esp + 4]
push 0
push eax
call fcn.00409070
add esp, 0xc
push 0x105
lea ecx, [esp + 4]
push ecx
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ecx, 0x105
lea eax, [esp]
cmp byte [eax], 0
je 0x407214
add eax, 1
sub ecx, 1
jne 0x407205
jmp 0x407233
test ecx, ecx
je 0x407233
mov eax, 0x105
sub eax, ecx
mov ecx, 0x105
sub ecx, eax
lea edx, [esp + eax]
mov eax, str.TempPtBSSetup.log
call fcn.004013f0
lea edx, [esp]
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x108]
xor ecx, esp
call fcn.0040850f
add esp, 0x10c
ret
Function at 0x407260
Capabilities:
Print debug messages
Query environment variable
Write file on windows

Disassembly:
sub esp, 0x114
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x110], eax
test edi, edi
je 0x40738c
cmp byte [edi], 0
je 0x40738c
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push 0x105
lea eax, [esp + 0xc]
push 0
push eax
mov word [esp + 0xc], 0xa
call fcn.00409070
add esp, 0xc
push 0x105
lea ecx, [esp + 0xc]
push ecx
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov ecx, 0x105
lea eax, [esp + 8]
cmp byte [eax], 0
je 0x4072d4
add eax, 1
sub ecx, 1
jne 0x4072c5
jmp 0x4072f4
test ecx, ecx
je 0x4072f4
mov eax, 0x105
sub eax, ecx
mov ecx, 0x105
sub ecx, eax
lea edx, [esp + eax + 8]
mov eax, str.TempPtBSSetup.log
call fcn.004013f0
push ebp
push 0
push 0x80
push 4
push 0
push 7
push 0x40000000
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x40738b
push 2
push 0
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, edi
lea edx, [eax + 1]
jmp 0x407330
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407330
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
sub eax, edx
push 0
mov esi, eax
lea eax, [esp + 0x14]
push eax
push esi
push edi
push ebp
mov dword [esp + 0x24], 0
call ebx
cmp byte [edi + esi - 1], 0xa
je 0x407382
lea eax, [esp + 0xc]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x407367
push 0
lea ecx, [esp + 0x14]
push ecx
sub eax, edx
push eax
lea edx, [esp + 0x18]
push edx
push ebp
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop ebx
pop ebp
mov ecx, dword [esp + 0x110]
xor ecx, esp
call fcn.0040850f
add esp, 0x114
ret

Function at 0x4073b0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
push ebp
or ebp, 0xffffffff
test esi, esi
mov dword [esp + 4], 0
je 0x4073c9
mov dword [esi], 0
lea eax, [esp + 4]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40743b
mov ecx, dword [esp + 4]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0xc]
push edx
push eax
lea eax, [esp + 0x18]
push eax
push 0
push ebx
push ecx
call edi
test eax, eax
jne 0x40742f
test esi, esi
mov eax, dword [esp + 0xc]
mov ebp, eax
je 0x40742f
push eax
call fcn.0040885b
mov ecx, dword [esp + 0xc]
add esp, 4
lea edx, [esp + 0xc]
push edx
push eax
mov dword [esi], eax
lea eax, [esp + 0x18]
push eax
push 0
push ebx
push ecx
call edi
mov edx, dword [esp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, ebp
pop ebp
add esp, 0xc
ret
Function at 0x407450
Capabilities:
Get common file path

Disassembly:
sub esp, 0x210
mov eax, dword [0x417034]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
push ebp
mov ebp, dword [esp + 0x21c]
push edi
xor ebx, ebx
push 0x103
lea eax, [esp + 0x15]
push ebx
push eax
mov byte [esp + 0x1c], bl
call fcn.00409070
push 0x103
lea ecx, [esp + 0x125]
push ebx
push ecx
mov byte [esp + 0x12c], bl
call fcn.00409070
add esp, 0x18
push 0x104
lea edx, [esp + 0x118]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
cmp eax, ebx
je 0x407622
cmp eax, 0x104
ja 0x407622
lea eax, [esp + 0x10]
lea edx, [esp + 0x114]
mov ecx, eax
push esi
xor edi, edi
mov esi, 0x104
sub edx, ecx
mov edi, edi
mov cl, byte [edx + eax]
cmp cl, bl
je 0x4074f3
mov byte [eax], cl
add eax, 1
sub esi, 1
jne 0x4074e0
jmp 0x4074f7
cmp esi, ebx
jne 0x4074ff
sub eax, 1
mov edi, 0x8007007a
cmp edi, ebx
mov byte [eax], bl
pop esi
jl 0x40751c
mov ecx, 0x104
lea eax, [esp + 0x10]
nop
cmp byte [eax], bl
je 0x407530
add eax, 1
sub ecx, 1
jne 0x407510
push ebx
push ebx
push str._Info__Cant_obtain_system_module_path
call fcn.004070f0
add esp, 0xc
jmp 0x407655
cmp ecx, ebx
je 0x40751c
mov eax, 0x104
sub eax, ecx
mov ecx, 0x104
sub ecx, eax
lea edx, [esp + eax + 0x10]
mov eax, 0x414834
call fcn.004013f0
cmp eax, ebx
jl 0x40751c
mov ecx, 0x104
lea eax, [esp + 0x10]
lea ecx, [ecx]
cmp byte [eax], bl
je 0x407580
add eax, 1
sub ecx, 1
jne 0x407560
push ebx
push ebx
push str._Info__Cant_obtain_system_module_path
call fcn.004070f0
add esp, 0xc
jmp 0x407655
cmp ecx, ebx
je 0x40751c
mov eax, 0x104
sub eax, ecx
mov ecx, 0x104
sub ecx, eax
lea edx, [esp + eax + 0x10]
mov eax, ebp
call fcn.004013f0
cmp eax, ebx
jl 0x40751c
lea edx, [esp + 0xc]
push edx
lea ebx, [esp + 0x14]
call fcn.00406bd0
add esp, 4
test eax, eax
je 0x4075d0
push 0
push 0
push str._Info__Cant_obtain_version_information
call fcn.004070f0
add esp, 0xc
jmp 0x407655
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
jne 0x4075f0
push eax
push eax
push str._Info__Cant_load_module_
call fcn.004070f0
add esp, 0xc
jmp 0x407655
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0
push 0
push str._Info__system_module_exist._n
call fcn.004070f0
add esp, 0xc
pop edi
pop ebp
mov al, 1
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0040850f
add esp, 0x210
ret
cmp dword [0x417fb0], 0xffffffff
jne 0x407630
call fcn.00406fb0
cmp dword [0x418b34], ebx
jne 0x407640
cmp dword [0x417fb0], ebx
je 0x407655
push str._Info__Cant_obtain_system_directory
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, str._Info__Cant_obtain_system_directory
call fcn.00407260
mov ecx, dword [esp + 0x218]
pop edi
pop ebp
pop ebx
xor ecx, esp
xor al, al
call fcn.0040850f
add esp, 0x210
ret
Function at 0x40850f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x417034]
jne 0x408519
repz ret
jmp fcn.0040bd5b

Function at 0x40bb55
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x417918]
je 0x40bb70
inc edi
cmp edi, 0x17
jb 0x40bb61
cmp edi, 0x17
jae 0x40bcf0
push ebp
push 3
call fcn.0040f095
cmp eax, 1
pop ecx
je 0x40bcbc
push 3
call fcn.0040f095
test eax, eax
pop ecx
jne 0x40bba4
cmp dword [0x417030], 1
je 0x40bcbc
cmp ebx, 0xfc
je 0x40bcef
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x418288
push ebp
call fcn.004084aa
add esp, 0xc
test eax, eax
je 0x40bbda
push esi
push esi
push esi
push esi
push esi
call fcn.00407d54
add esp, 0x14
push 0x104
mov esi, 0x4182a1
push esi
push 0
mov byte [0x4183a5], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40bc1e
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.004084aa
add esp, 0xc
test eax, eax
je 0x40bc1e
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00407d54
add esp, 0x14
push esi
call fcn.00408f80
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x40bc63
push esi
call fcn.00408f80
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x41859c
push 0x4119b4
sub ecx, eax
push ecx
push eax
call fcn.0040e496
add esp, 0x14
test eax, eax
je 0x40bc63
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00407d54
add esp, 0x14
jmp 0x40bc65
xor esi, esi
push 0x4119b0
push ebx
push ebp
call fcn.0040e3df
add esp, 0xc
test eax, eax
je 0x40bc85
push esi
push esi
push esi
push esi
push esi
call fcn.00407d54
add esp, 0x14
push dword [edi*8 + 0x41791c]
push ebx
push ebp
call fcn.0040e3df
add esp, 0xc
test eax, eax
je 0x40bca7
push esi
push esi
push esi
push esi
push esi
call fcn.00407d54
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.0040eed8
add esp, 0xc
jmp 0x40bcef
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x40bcef
cmp ebp, 0xffffffff
je 0x40bcef
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x41791c]
push dword [esi]
call fcn.00408f80
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret