Function at 0x405f60
Capabilities:
Read file on windows
Terminate process
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
cmp dword [ebp + 8], 3
mov ebx, dword [ebp + 0xc]
jg 0x405fb0
mov dword [esp], 0x69
call sym._output_message
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp], 0x6a
mov dword [esp + 4], eax
call sym._output_message
mov edx, 1
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym._parse_registry_key
test eax, eax
je 0x406220
cmp dword [ebp + 8], 4
je 0x40622f
mov dword [ebp - 0x2c], 0
mov esi, 4
mov dword [ebp - 0x30], 0
mov edi, dword [ebx + esi*4]
movzx eax, word [edi]
and eax, 0xfffffffd
cmp ax, 0x2d
jne 0x405f72
mov dword [esp + 4], 0x79
movzx eax, word [edi + 2]
mov dword [esp], eax
call sym._is_char
test eax, eax
je 0x4061b0
cmp word [edi + 4], 0
jne 0x4061b0
mov dword [ebp - 0x30], 1
inc esi
cmp dword [ebp + 8], esi
jne 0x405fee
cmp dword [ebp - 0x2c], 0x300
je 0x405f72
mov edx, dword [ebp - 0x2c]
or edx, 0x20019
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], 0
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegOpenKeyExW]
sub esp, 0x14
test eax, eax
jne 0x406247
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._get_long_key
mov esi, dword [ebx + 0xc]
mov edi, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0x18], 0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], pe_nt_image_headers32
inc eax
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], esi
call edi
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x40625d
mov edx, 0x57
mov eax, str.Windows_Registry_Editor_Version_5.00_r_n
jmp 0x4060f4
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x4060f0
sub eax, str.Windows_Registry_Editor_Version_5.00_r_n
lea edi, [ebp - 0x1c]
mov dword [esp], ebx
mov esi, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], str.Windows_Registry_Editor_Version_5.00_r_n
call esi
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
sub esp, 0x14
mov edx, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, ebx
call sym._export_registry_data
mov ecx, 0xa
mov edx, eax
mov eax, 0x409140
jmp 0x406154
movzx ecx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x406150
sub eax, 0x409140
mov dword [ebp - 0x2c], edx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 0x409140
mov dword [esp], ebx
call esi
sub esp, 0x14
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call dword [sym.imp.advapi32.dll_RegCloseKey]
mov edx, dword [ebp - 0x2c]
sub esp, 4
jmp 0x405f9f
add edi, 2
mov dword [esp + 4], 0x4091a0
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4061e8
mov eax, dword [ebp - 0x2c]
test ah, 2
jne 0x405f72
or ah, 2
mov dword [ebp - 0x2c], eax
jmp 0x40602f
mov dword [esp + 4], 0x4091ae
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_lstrcmpiW]
mov ecx, dword [ebp - 0x2c]
sub esp, 8
mov edx, ecx
and edx, 0x100
or edx, eax
jne 0x405f72
or ch, 1
mov dword [ebp - 0x2c], ecx
jmp 0x40602f
lea esp, [ebp - 0xc]
mov edx, 1
pop ebx
mov eax, edx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], 0
mov edx, 0x20019
mov dword [ebp - 0x2c], 0
jmp 0x40604b
mov dword [esp], 0x6e
call sym._output_message
mov edx, 1
jmp 0x405f9f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 0x50
jne 0x4062d7
mov dword [esp + 4], esi
mov dword [esp], 0x15e
call sym._ask_confirm
test eax, eax
jne 0x406298
mov dword [esp], 0x6d
call sym._output_message
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x40000000
mov dword [esp], esi
call edi
sub esp, 0x1c
mov ebx, eax
jmp 0x4060dd
lea edx, [ebp - 0x1c]
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1300
call dword [sym.imp.kernel32.dll_FormatMessageW]
mov edx, dword [ebp - 0x1c]
sub esp, 0x1c
mov eax, edx
jmp 0x40631c
add eax, 2
cmp word [eax], 0
jne 0x406319
sub eax, edx
mov dword [esp], edx
sar eax, 1
mov dword [esp + 4], eax
call sym._output_writeconsole
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_LocalFree]
push eax
mov dword [esp], 1
call dword [sym.imp.ucrtbase.dll_exit]
nop
nop
nop
nop