Function at 0x404230
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424432
mov eax, dword fs:[0]
push eax
sub esp, 0x3c0
mov eax, dword [0x435014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x388], ecx
xor eax, eax
lea ecx, [ebp - 0x380]
mov dword [ebp - 0x384], eax
mov dword [ebp - 0x394], eax
call dword [sym.imp.mfc140u.dll_Ordinal_296]
lea ecx, [ebp - 0x37c]
mov dword [ebp - 4], 0
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov dword [ebp - 0x3a4], 0
mov dword [ebp - method.CFont.virtual_0], vtable.CFont.0
lea eax, [ebp - 0x180]
mov byte [ebp - 4], 2
push eax
mov dword [ebp - 0x378], 0x1f8
mov dword [ebp - 0x180], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
mov eax, dword [ebp - 0x378]
mov ecx, 0x1f4
cmp dword [ebp - 0x17c], 6
push 0
cmovb eax, ecx
lea ecx, [ebp - 0x378]
push ecx
push eax
push 0x29
mov dword [ebp - 0x378], eax
call dword [sym.imp.USER32.dll_SystemParametersInfoW]
lea eax, [ebp - 0x6c]
mov ecx, 0x17
lea esi, [ebp - 0x298]
lea edi, [ebp - 0x6c]
rep movsd dword es:[edi], dword [esi]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectW]
push eax
lea ecx, [ebp - 0x3a8]
call dword [sym.imp.mfc140u.dll_CGdiObject::Attach]
call dword [sym.imp.mfc140u.dll_AfxGetThread]
test eax, eax
je 0x404339
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0x7c]
mov dword [ebp - 0x3ac], eax
test eax, eax
jne 0x40434c
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push eax
call dword [sym.imp.mfc140u.dll_CWnd::FromHandle]
mov dword [ebp - 0x3ac], eax
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetDC]
push eax
call dword [sym.imp.mfc140u.dll_CDC::FromHandle]
lea ecx, [ebp - 0x3a8]
mov dword [ebp - 0x390], eax
push ecx
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x30]
mov esi, dword [ebp - 0x388]
mov dword [ebp - 0x3bc], eax
push dword [esi + 4]
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor edi, edi
mov dword [ebp - 0x3a0], eax
mov dword [ebp - 0x39c], 0xffffffff
test eax, eax
jle 0x4044f3
nop
cmp edi, dword [esi + 0x10]
jge 0x4044ed
mov eax, dword [esi + 0xc]
mov esi, dword [eax + edi*4]
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 3
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov ecx, dword [esi]
mov ebx, eax
mov eax, dword [ebp - 0x384]
or eax, 1
mov dword [ebp - 0x384], eax
mov dword [ebp - 0x394], eax
test ecx, ecx
je 0x4043e9
push ecx
lea ecx, [ebp - 0x38c]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
push ebx
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__13]
and dword [ebp - 0x384], 0xfffffffe
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
push 0
push 9
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
lea ecx, [ebp - 0x37c]
mov esi, eax
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::Empty]
cmp esi, 0xffffffff
je 0x404467
push esi
lea eax, [ebp - 0x398]
push eax
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__5]
push eax
lea ecx, [ebp - 0x37c]
mov byte [ebp - 4], 4
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__13]
lea ecx, [ebp - 0x398]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
jmp 0x40447a
lea eax, [ebp - 0x380]
push eax
lea ecx, [ebp - 0x37c]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__13]
push 0x427cdc
lea ecx, [ebp - 0x37c]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator_2]
mov eax, dword [ebp - 0x37c]
mov edx, eax
lea esi, [edx + 2]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x404496
sub edx, esi
lea ecx, [ebp - 0x3b8]
push ecx
sar edx, 1
push edx
push eax
mov eax, dword [ebp - 0x390]
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov ecx, dword [ebp - 0x39c]
cmp dword [ebp - 0x3b8], ecx
mov eax, dword [ebp - 0x3a0]
cmovg ecx, dword [ebp - 0x3b8]
inc edi
mov esi, dword [ebp - 0x388]
mov dword [ebp - 0x39c], ecx
cmp edi, eax
jl 0x4043a0
jmp 0x4044f9
call dword [sym.imp.mfc140u.dll_AfxThrowInvalidArgException]
mov eax, dword [ebp - 0x3a0]
xor ebx, ebx
mov dword [ebp - 0x398], ebx
test eax, eax
jle 0x4046f4
nop dword [eax]
cmp ebx, dword [esi + 0x10]
jge 0x4044ed
mov eax, dword [esi + 0xc]
lea ecx, [ebx*4]
mov esi, dword [eax + ecx]
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 5
call dword [sym.imp.mfc140u.dll_Ordinal_296]
mov ecx, dword [esi]
mov edi, eax
mov eax, dword [ebp - 0x384]
or eax, 2
mov dword [ebp - 0x384], eax
mov dword [ebp - 0x394], eax
test ecx, ecx
je 0x40455c
push ecx
lea ecx, [ebp - 0x38c]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator]
push edi
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__13]
and dword [ebp - 0x384], 0xfffffffd
lea ecx, [ebp - 0x38c]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
push 0
push 9
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__9]
mov esi, eax
mov dword [ebp - 0x394], esi
cmp esi, 0xffffffff
je 0x4046db
lea ecx, [ebp - 0x37c]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::Empty]
push esi
lea eax, [ebp - 0x3b0]
push eax
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__5]
push eax
lea ecx, [ebp - 0x37c]
mov byte [ebp - 4], 6
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__13]
lea ecx, [ebp - 0x3b0]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov eax, dword [ebp - 0x37c]
mov edx, eax
lea esi, [edx + 2]
nop dword [eax]
mov cx, word [edx]
add edx, 2
test cx, cx
jne 0x4045f0
sub edx, esi
lea ecx, [ebp - 0x3c4]
push ecx
sar edx, 1
push edx
push eax
mov eax, dword [ebp - 0x390]
push dword [eax + 8]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
mov edi, dword [ebp - 0x39c]
cmp dword [ebp - 0x3c4], edi
jge 0x40467f
mov ebx, dword [ebp - 0x390]
nop dword [eax + eax]
push 0x20
lea ecx, [ebp - 0x37c]
call dword [sym.imp.mfc140u.dll_ATL::CSimpleStringT_wchar_t_1_::operator_1]
mov eax, dword [ebp - 0x37c]
mov ecx, eax
lea esi, [ecx + 2]
nop dword [eax]
mov dx, word [ecx]
add ecx, 2
test dx, dx
jne 0x404650
sub ecx, esi
lea edx, [ebp - 0x3cc]
push edx
sar ecx, 1
push ecx
push eax
push dword [ebx + 8]
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32W]
cmp dword [ebp - 0x3cc], edi
jl 0x404630
mov ebx, dword [ebp - 0x398]
push dword [ebp - 0x394]
lea eax, [ebp - 0x3b4]
push eax
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_ATL::CStringT_wchar_t_StrTraitMFC_DLL_wchar_t_ATL::ChTraitsCRT_wchar_t__6]
push eax
lea ecx, [ebp - 0x37c]
mov byte [ebp - 4], 7
call dword [0x42798c]
lea ecx, [ebp - 0x3b4]
mov byte [ebp - 4], 2
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov esi, dword [ebp - 0x388]
cmp ebx, dword [esi + 0x10]
jge 0x4044ed
mov ecx, dword [esi + 0xc]
push dword [ebp - 0x37c]
mov ecx, dword [ecx + ebx*4]
call fcn.004016f0
jmp 0x4046e1
mov esi, dword [ebp - 0x388]
inc ebx
mov dword [ebp - 0x398], ebx
cmp ebx, dword [ebp - 0x3a0]
jl 0x404510
mov ebx, dword [ebp - 0x390]
mov ecx, ebx
push dword [ebp - 0x3bc]
mov eax, dword [ebx]
call dword [eax + 0x30]
mov eax, dword [ebp - 0x3ac]
push dword [ebx + 4]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_ReleaseDC]
lea ecx, [ebp - 0x3a8]
call dword [sym.imp.mfc140u.dll_CGdiObject::DeleteObject]
lea ecx, [ebp - 0x3a8]
mov dword [ebp - method.CFont.virtual_0], vtable.CFont.0
call fcn.00406680
lea ecx, [ebp - 0x37c]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
lea ecx, [ebp - 0x380]
call dword [sym.imp.mfc140u.dll_Ordinal_1045]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00422eb6
mov esp, ebp
pop ebp
ret