Function at 0x406988
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x22c
mov eax, dword [0x496980]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push edi
push 0x104
xor esi, esi
push esi
push eax
call fcn.00440bf0
xor eax, eax
mov dword [ebp - 0x220], esi
lea edi, [ebp - 0x21c]
mov dword [ebp - 0x224], esi
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
push 0
stosd dword es:[edi], eax
stosd dword es:[edi], eax
lea eax, [ebp - 0x21c]
push eax
xor edi, edi
push 0
inc edi
push 0x30
mov esi, edi
call dword [sym.imp.USER32.dll_SystemParametersInfoA]
test eax, eax
jne 0x406a04
push str._GetLastError_
push str.:7:SetConsoleFont___FAILED:_The_default_font_height_15_will_be_used:_SystemParametersInfo___FAILED:__s
call fcn.0040d324
pop ecx
pop ecx
push 0xf
jmp 0x406ac8
mov edx, dword [ebp - 0x214]
sub edx, dword [ebp - 0x21c]
mov eax, dword [ebp - 0x210]
cmove edx, edi
movss xmm0, dword [0x466e94]
sub eax, dword [ebp - 0x218]
push 7
cmove eax, edi
movd xmm3, edx
cmp edx, eax
cvtdq2ps xmm3, xmm3
pop ecx
push 0xe
pop edi
cmovle ecx, edi
movd xmm2, eax
cvtdq2ps xmm2, xmm2
push 1
pop eax
movaps xmm1, xmm2
divss xmm1, xmm3
divss xmm3, xmm2
comiss xmm0, xmm1
movaps xmm0, xmm2
movss xmm2, dword [0x466e9c]
mulss xmm0, dword [0x466e90]
subss xmm2, xmm3
cmova ecx, eax
addss xmm0, dword [0x466e98]
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
mulss xmm2, xmm1
subss xmm0, xmm2
call fcn.0043f860
cmp eax, edi
push 9
pop edi
lea ecx, [eax + 1]
cmovae ecx, eax
cmp ecx, edi
jb 0x406ac9
mov edi, ecx
cmp ecx, 0x1c
jbe 0x406ac9
push dword [ebp - 0x214]
push dword [ebp - 0x210]
push dword [ebp - 0x21c]
push dword [ebp - 0x218]
push ecx
push str.:8:SetConsoleFont___encountered_a_problem:_the_calculated_font_height_is__ld_based_on_the_screen_rect___d__d__d__d_.__The_size_will_be_clipped_to_28.
call fcn.0040d324
add esp, 0x18
push 0x1c
pop edi
push ebx
call fcn.0042dd5b
pop ecx
test eax, eax
je 0x406b4b
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
lea eax, [ebp - 0x220]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf003f
push ecx
push ecx
push ecx
push str..DEFAULTConsole
push reloc.WSOCK32.dll_closesocket
call ebx
test eax, eax
je 0x406b17
push eax
push str._GetLastError_
push str.:8:SetConsoleFont_NULL__FAILED_to_set_the_default_console:_RegCreateKeyEx___FAILED:__s_ld
call fcn.0040d324
add esp, 0xc
xor eax, eax
jmp 0x406f21
xor ecx, ecx
lea eax, [ebp - 0x224]
push ecx
push eax
push ecx
push 0xf003f
push ecx
push ecx
push ecx
push str.Console
push connect
call ebx
test eax, eax
je 0x406be2
xor ecx, ecx
mov dword [ebp - 0x224], ecx
jmp 0x406be8
push 0x104
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00440bf0
push 0x104
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.0042f204
push 0x5f
lea eax, [ebp - 0x108]
push 0x5c
push eax
call fcn.0042e721
lea eax, [ebp - 0x108]
push eax
push str.Console_s
lea eax, [ebp - 0x20c]
push 0x104
push eax
call fcn.0042ef5e
add esp, 0x34
lea eax, [ebp - 0x220]
xor ecx, ecx
push ecx
push eax
push ecx
push 0xf003f
push ecx
push ecx
push ecx
lea eax, [ebp - 0x20c]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x406be2
push eax
push str._GetLastError_
push ebx
push str.:8:SetConsoleFont__s__FAILED:_RegCreateKeyEx___FAILED:__s_ld
call fcn.0040d324
add esp, 0x10
jmp 0x406b10
mov ecx, dword [ebp - 0x224]
mov eax, dword [ebp - 0x220]
test eax, eax
je 0x406f14
mov ebx, edi
shl ebx, 0x10
push 0
push str.ColorTable00
push eax
call fcn.00407415
push 0x800000
push str.ColorTable01
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0x8000
push str.ColorTable02
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0x808000
push str.ColorTable03
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0x80
push str.ColorTable04
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0x800080
push str.ColorTable05
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
add esp, 0x48
or esi, eax
push 0x8080
push str.ColorTable06
push dword [ebp - 0x220]
call fcn.00407415
push 0xc0c0c0
push str.ColorTable07
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0x808080
push str.ColorTable08
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xff0000
push str.ColorTable09
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xff00
push str.ColorTable10
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xffff00
push str.ColorTable11
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
add esp, 0x48
or esi, eax
push 0xff
push str.ColorTable12
push dword [ebp - 0x220]
call fcn.00407415
push 0xff00ff
push str.ColorTable13
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xffff
push str.ColorTable14
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xffffff
push str.ColorTable15
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
or esi, eax
lea eax, [ebp - 0x108]
push 0x465c94
push eax
call fcn.0044a360
lea eax, [ebp - 0x108]
push eax
call fcn.0044a680
add esp, 0x3c
inc eax
push eax
lea eax, [ebp - 0x108]
push eax
xor eax, eax
inc eax
push eax
push 0
push str.FaceName
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x406dc0
push eax
push str._GetLastError_
push str.:4:SetConsoleFont___FAILED:_RegSetValueEx__FaceName___FAILED:__s_ld
call fcn.0040d324
add esp, 0xc
push 0x19
push str.CursorSize
push dword [ebp - 0x220]
call fcn.00407415
push 0x36
push str.FontFamily
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push ebx
push str.FontSize
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
or eax, esi
add esp, 0x24
mov dword [ebp - 0x22c], eax
cmp edi, 0x10
jae 0x406e10
push 0x190
jmp 0x406e15
push 0x2bc
push str.FontWeight
push dword [ebp - 0x220]
call fcn.00407415
add esp, 0xc
mov dword [ebp - 0x228], eax
push 0
push str.FullScreen
push dword [ebp - 0x220]
call fcn.00407415
push 0x32
mov esi, eax
or esi, dword [ebp - 0x22c]
or esi, dword [ebp - 0x228]
push str.HistoryBufferSize
push dword [ebp - 0x220]
call fcn.00407415
or esi, eax
xor eax, eax
inc eax
push eax
push str.InsertMode
push dword [ebp - 0x220]
call fcn.00407415
push 4
push str.NumberOfHistoryBuffers
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0xf5
push str.PopupColors
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
push 0
push str.QuickEdit
push dword [ebp - 0x220]
or esi, eax
call fcn.00407415
add esp, 0x48
or esi, eax
push 7
push str.ScreenColors
push dword [ebp - 0x220]
call fcn.00407415
add esp, 0xc
or esi, eax
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
and dword [ebp - 0x220], 0
mov eax, dword [ebp - 0x224]
test eax, eax
je 0x406f03
and dword [ebp - 0x224], 0
mov dword [ebp - 0x220], eax
test eax, eax
jne 0x406bfb
test esi, esi
jne 0x406f1f
push str.:5:SetConsoleFont___encountered_a_problem:_One_of_the_SetRegDwords___seems_to_have_failed.
call fcn.0040d7f3
pop ecx
jmp 0x406f1f
test ecx, ecx
je 0x406f1f
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0043f5c5
leave
ret