Function at 0x403420
Capabilities:
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 esi, dword [ebp + 0xc]
jg 0x403470
mov dword [esp], 0x69
mov ebx, 1
call dbg.output_message
mov eax, dword [esi + 4]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__wcsupr]
mov dword [esp], 0x6a
mov dword [esp + 4], eax
call dbg.output_message
lea esp, [ebp - 0xc]
mov eax, ebx
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 [esi + 8]
mov dword [esp], eax
call dbg.parse_registry_key
test eax, eax
je 0x4036d8
cmp dword [ebp + 8], 4
je 0x4036e7
mov dword [ebp - 0x2c], 0
mov edi, 4
mov dword [ebp - 0x30], 0
mov ebx, dword [esi + edi*4]
movzx eax, word [ebx]
and eax, 0xfffffffd
cmp ax, 0x2d
jne 0x403432
mov dword [esp + 4], 0x79
movzx eax, word [ebx + 2]
mov dword [esp], eax
call sym._is_char
test eax, eax
je 0x403668
cmp word [ebx + 4], 0
jne 0x403668
mov dword [ebp - 0x30], 1
add edi, 1
cmp dword [ebp + 8], edi
jne 0x4034ae
cmp dword [ebp - 0x2c], 0x300
je 0x403432
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 0x4036ff
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dbg.get_long_key
mov edi, dword [esi + 0xc]
mov dword [esp + 0x18], 0
mov ebx, eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0xc], 0
add eax, 1
mov dword [esp + 8], 0
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 4], 0x40000000
mov dword [esp], edi
mov dword [ebp - 0x30], eax
call eax
sub esp, 0x1c
mov esi, eax
cmp eax, 0xffffffff
je 0x403715
mov edx, 0x57
mov eax, str.Windows_Registry_Editor_Version_5.00_r_n
jmp 0x4035b4
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x4035b0
sub eax, str.Windows_Registry_Editor_Version_5.00_r_n
lea edi, [ebp - 0x1c]
mov dword [esp], esi
mov dword [esp + 8], eax
mov eax, dword [sym.imp.kernel32.dll_WriteFile]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 4], str.Windows_Registry_Editor_Version_5.00_r_n
mov dword [ebp - 0x30], eax
call eax
mov eax, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x24]
mov ecx, ebx
sub esp, 0x14
mov dword [esp], eax
mov eax, esi
call dbg.export_registry_data
mov edx, 0xa
mov ebx, eax
mov eax, 0x40915c
jmp 0x403614
movzx edx, word [eax + 2]
add eax, 2
test dx, dx
jne 0x403610
sub eax, 0x40915c
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [esp + 0xc], edi
mov dword [esp + 4], 0x40915c
mov dword [esp], esi
call eax
sub esp, 0x14
mov dword [esp], esi
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]
sub esp, 4
jmp 0x40345f
add ebx, 2
mov dword [esp + 4], 0x4091bc
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4036a0
mov eax, dword [ebp - 0x2c]
test ah, 2
jne 0x403432
or ah, 2
mov dword [ebp - 0x2c], eax
jmp 0x4034ef
mov dword [esp + 4], 0x4091ca
mov dword [esp], ebx
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 0x403432
or ch, 1
mov dword [ebp - 0x2c], ecx
jmp 0x4034ef
lea esp, [ebp - 0xc]
mov ebx, 1
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x30], 0
mov edx, 0x20019
mov dword [ebp - 0x2c], 0
jmp 0x40350d
mov dword [esp], 0x6e
mov ebx, 1
call dbg.output_message
jmp 0x40345f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 0x50
jne 0x403792
mov dword [esp + 4], edi
mov dword [esp], 0x15e
call dbg.ask_confirm
test eax, eax
jne 0x403750
mov dword [esp], 0x6d
call dbg.output_message
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll_exit]
mov dword [esp + 0x18], 0
mov eax, dword [ebp - 0x30]
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], edi
call eax
sub esp, 0x1c
mov esi, eax
jmp 0x4035a2
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 0x4037d7
add eax, 2
cmp word [eax], 0
jne 0x4037d4
sub eax, edx
mov dword [esp], edx
sar eax, 1
mov dword [esp + 4], eax
call dbg.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
nop
nop
nop
nop
nop