Function at 0x4031d0
Capabilities:
Terminate process

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 0x403220
mov dword [esp], 0x69
mov ebx, 1
call sym._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 sym._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 sym._parse_registry_key
test eax, eax
je 0x403410
cmp dword [ebp + 8], 4
je 0x40341f
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, 0xfffd
cmp eax, 0x2d
jne 0x4031e2
mov eax, 0x79
mov dword [esp + 4], eax
movzx eax, word [ebx + 2]
mov dword [esp], eax
call sym._is_char
test eax, eax
je 0x403398
cmp word [ebx + 4], 0
jne 0x403398
mov dword [ebp - 0x30], 1
inc edi
cmp dword [ebp + 8], edi
jne 0x40325e
cmp dword [ebp - 0x2c], 0x300
je 0x4031e2
mov edx, dword [ebp - 0x2c]
or edx, 0x20019
mov dword [esp + 0xc], edx
lea eax, [ebp - 0x24]
xor edi, edi
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._RegOpenKeyExW_20
sub esp, 0x14
test eax, eax
jne 0x403437
mov eax, dword [ebp - 0x20]
mov ebx, 0x40000000
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sym._get_long_key
mov edi, dword [esi + 0xc]
xor edx, edx
mov dword [esp + 4], ebx
xor ecx, ecx
mov ebx, dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ecx
mov dword [esp], edi
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [esp + 0x18], eax
mov eax, pe_nt_image_headers32
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x30]
inc eax
mov dword [esp + 0x10], eax
call ebx
sub esp, 0x1c
cmp eax, 0xffffffff
mov esi, eax
je 0x40344d
mov edx, str.Windows_Registry_Editor_Version_5.00_r_n
mov eax, esi
call sym._write_file
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, esi
call sym._export_registry_data
mov edx, 0x409156
mov ebx, eax
mov eax, esi
call sym._write_file
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [ebp - 0x24]
sub esp, 4
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
jmp 0x40320f
add ebx, 2
mov eax, 0x40915c
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_lstrcmpiW]
sub esp, 8
test eax, eax
jne 0x4033d0
mov eax, dword [ebp - 0x2c]
test ah, 2
jne 0x4031e2
or eax, 0x200
mov dword [ebp - 0x2c], eax
jmp 0x4032a1
mov dword [esp], ebx
mov eax, 0x40916a
mov dword [esp + 4], eax
call dword [sym.imp.kernel32.dll_lstrcmpiW]
mov ecx, dword [ebp - 0x2c]
mov edx, ecx
and edx, 0x100
sub esp, 8
or edx, eax
jne 0x4031e2
or ecx, 0x100
mov dword [ebp - 0x2c], ecx
jmp 0x4032a1
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 0x4032bd
mov dword [esp], 0x6e
mov ebx, 1
call sym._output_message
jmp 0x40320f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
cmp eax, 0x50
jne 0x4034c4
mov dword [esp + 4], edi
mov dword [esp], 0x15e
call sym._ask_confirm
test eax, eax
jne 0x403488
mov dword [esp], 0x6d
call sym._output_message
mov dword [esp], 0
call dword [sym.imp.ucrtbase.dll_exit]
xor eax, eax
xor edx, edx
mov dword [esp + 0xc], eax
xor eax, eax
mov ecx, pe_nt_image_headers32
mov dword [esp + 8], eax
mov esi, 2
mov eax, 0x40000000
mov dword [esp + 0x10], esi
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], ecx
mov dword [esp + 4], eax
mov dword [esp], edi
call ebx
sub esp, 0x1c
mov esi, eax
jmp 0x403348
mov dword [esp + 0x18], 0
lea edx, [ebp - 0x1c]
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]
mov eax, edx
sub esp, 0x1c
jmp 0x403509
add eax, 2
cmp word [eax], 0
jne 0x403506
mov dword [esp], edx
sub eax, 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
nop
nop
nop