Function at 0x401c00
Capabilities:
Check os version
Print debug messages

Disassembly:
sub esp, 0x3f4
push ebx
push ebp
push esi
mov esi, dword [esp + 0x408]
push edi
xor edx, edx
mov ebp, dword [esp + 0x408]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x70]
mov dword [esp + 0x6c], edx
mov dword [esp + 0x34], edx
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x2b8]
mov eax, 2
cmp ecx, eax
mov dword [esp + 0x3c], edx
mov dword [esp + 0x38], eax
jne 0x401c51
mov dword [esi + 0x2dc], edx
jmp 0x401d35
mov ecx, 0x20
xor eax, eax
lea edi, [esp + 0x178]
push 0x80
rep stosd dword es:[edi], eax
mov ecx, 0x40
lea edi, [esp + 0x308]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x308]
lea ebx, [esi + 0x218]
push eax
push 0xffffffffffffffff
push ebx
push 0
push ebp
call dword [sym.imp.GDI32.dll_GetTextCharset]
push eax
call fcn.004016d0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov al, byte [esi + 0x2b8]
push 0
push 0
lea ecx, [esp + 0x180]
push 0x80
push ecx
lea edx, [esp + 0x314]
push 0xffffffffffffffff
push edx
push 0
push eax
call fcn.004016d0
add esp, 4
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea edi, [esp + 0x178]
mov eax, ebx
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x401d02
test cl, cl
je 0x401cfe
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x401d02
add eax, 2
add edi, 2
test cl, cl
jne 0x401cda
xor eax, eax
jmp 0x401d07
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x401d2b
mov eax, dword [esi + 0x2d4]
mov dword [esi + 0x2dc], 1
test eax, eax
je 0x401d35
push esi
push ebp
call fcn.00401870
add esp, 8
jmp 0x401d35
mov dword [esi + 0x2dc], 0
mov ecx, 0xf
xor eax, eax
lea edi, [esp + 0x94]
push 0x48
lea ebx, [esi + 0x218]
push 0x5a
rep stosd dword es:[edi], eax
push ebp
mov dword [esp + 0x28], ebx
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
push eax
mov eax, dword [esi + 0x2c0]
push eax
call dword [sym.imp.KERNEL32.dll_MulDiv]
mov ecx, dword [esi + 0x2cc]
mov dword [esp + 0x98], 0
neg eax
neg ecx
mov dword [esp + 0x94], eax
mov eax, dword [esi + 0x2c4]
sbb ecx, ecx
mov dword [esp + 0x9c], eax
and ecx, 0x12c
mov dword [esp + 0xa0], eax
mov eax, dword [esi + 0x2d0]
add ecx, 0x190
mov dword [esp + 0xa4], ecx
mov ecx, dword [esi + 0x2bc]
test eax, eax
mov al, byte [esi + 0x2b8]
mov byte [esp + 0xa9], 0
setne dl
neg ecx
sbb cl, cl
mov byte [esp + 0xa8], dl
and ecx, 7
mov byte [esp + 0xaa], 0
mov byte [esp + 0xab], al
mov byte [esp + 0xac], cl
mov byte [esp + 0xad], 0
mov byte [esp + 0xae], 0
mov byte [esp + 0xaf], 0
call dword [sym.imp.KERNEL32.dll_GetACP]
cmp eax, 0x36a
jne 0x401ebd
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
xor edx, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x401ebd
mov al, byte [edx + ebx]
or ecx, 0xffffffff
cmp al, 0x80
ja 0x401e49
mov edi, ebx
xor eax, eax
inc edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp edx, ecx
jl 0x401e2f
jmp 0x401ebd
lea edx, [esi + 0x298]
xor eax, eax
mov edi, edx
mov dword [esp + 0x18], eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], eax
test ecx, ecx
jle 0x401eab
mov eax, dword [esp + 0x10]
cmp byte [eax + edx], 0x80
jbe 0x401e81
push str.flag__1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [esp + 0x18], 1
mov ecx, dword [esp + 0x10]
lea edx, [esi + 0x298]
inc ecx
mov edi, edx
mov dword [esp + 0x10], ecx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x10]
not ecx
dec ecx
cmp eax, ecx
jl 0x401e64
cmp dword [esp + 0x18], 1
je 0x401ebd
lea eax, [esi + 0x298]
push str.Microsoft_Sans_Serif
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esi + 0x298]
lea edx, [esp + 0xb0]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea eax, [esp + 0x94]
push eax
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
test eax, eax
mov dword [esp + 0x54], eax
jne 0x401f01
push 0x405124
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3f4
ret
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push ebp
call dword [sym.imp.GDI32.dll_GetFontLanguageInfo]
cmp eax, 0x8000
mov dword [esp + 0x10], eax
jne 0x401f23
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x2d8]
test eax, eax
je 0x401f34
push 0x11e
jmp 0x401f36
push 0x1e
push ebp
call dword [sym.imp.GDI32.dll_SetTextAlign]
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
call edi
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x2bc]
test eax, eax
je 0x402074
mov eax, dword [esp + 0x10]
and eax, 0x132
mov dword [esp + 0x20], eax
je 0x402074
push 1
push ebx
mov dword [esp + 0x74], 0x24
call edi
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x70], eax
test eax, eax
je 0x402074
push 1
push ebx
call edi
lea ecx, [eax + eax + 2]
push ecx
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x84], eax
test eax, eax
jne 0x401fc0
mov edx, dword [esp + 0x70]
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x40206c
push ebx
call edi
push ebx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x18], 0
call edi
test eax, eax
jle 0x401feb
mov eax, dword [esp + 0x14]
push ebx
inc eax
mov dword [esp + 0x18], eax
call edi
cmp dword [esp + 0x14], eax
jl 0x401fd9
mov eax, dword [esp + 0x20]
lea ecx, [esp + 0x6c]
push eax
push ecx
push 0
push ebx
call edi
push eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetCharacterPlacementA]
test eax, eax
je 0x402045
mov al, byte [esp + 0x10]
mov edx, dword [esp + 0x88]
test al, 2
mov dword [esp + 0x18], edx
mov dword [esp + 0x38], 0x82
je 0x402074
push ebx
mov dword [esp + 0x18], 0
call edi
test eax, eax
jle 0x402074
mov eax, dword [esp + 0x14]
push ebx
inc eax
mov dword [esp + 0x18], eax
call edi
cmp dword [esp + 0x14], eax
jl 0x402031
jmp 0x402074
mov eax, dword [esp + 0x84]
push eax
call dword [sym.imp.MSVCRT.dll_free]
mov ecx, dword [esp + 0x74]
mov dword [esp + 0x88], 0
push ecx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov dword [esp + 0x70], 0
lea edx, [esp + 0x24]
push edx
push ebx
call edi
push eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [esi + 0x2d0]
test eax, eax
je 0x4020a7
mov eax, dword [esp + 0x94]
mov ecx, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
neg eax
add ecx, eax
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x28]
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
add ecx, eax
mov ax, word [esi + 0x2c4]
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x24]
push eax
push ecx
call fcn.004015c0
mov dword [esp + 0x44], edx
mov dx, word [esi + 0x2c4]
mov ebx, eax
mov eax, dword [esp + 0x28]
push edx
push eax
call fcn.004015c0
mov ecx, eax
mov eax, edx
cdq
xor eax, edx
lea edi, [esi + 0x20c]
sub eax, edx
mov dword [esp + 0xe4], 0x94
mov dword [esp + 0x20], eax
mov eax, ebx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x44]
mov dword [edi], edx
cdq
mov ebx, eax
mov eax, ecx
xor ebx, edx
lea ecx, [esp + 0xe4]
sub ebx, edx
push ecx
cdq
xor eax, edx
sub eax, edx
add ebx, eax
mov dword [esi + 0x210], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4021db
mov ecx, dword [esp + 0xf4]
xor ebx, ebx
cmp ecx, 2
sete bl
test ebx, ebx
jne 0x402166
mov eax, dword [esp + 0xec]
mov dword [esp + 0x3c], ebx
cmp eax, 0x5a
jb 0x40216e
mov dword [esp + 0x3c], 1
test ebx, ebx
je 0x4021df
mov edx, dword [edi]
mov eax, dword [edi + 4]
mov dword [esp + 0x1f8], edx
mov dword [esp + 0x1fc], eax
mov eax, dword [esp + 0x41c]
lea edx, [esp + 0x200]
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x402195
mov ecx, dword [esp + 0x428]
mov dword [esp + 0x41c], ecx
lea edx, [esp + 0x414]
push edx
push ebp
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
jle 0x402667
push 0
push 0
test ebx, ebx
je 0x4021f9
lea eax, [esp + 0x200]
push eax
push 0x10c
jmp 0x4021fc
mov ebx, dword [esp + 0x34]
mov eax, dword [esi + 0x2bc]
test eax, eax
jne 0x4021ad
mov eax, dword [esi + 0x208]
test eax, eax
je 0x402667
jmp 0x4021ad
push edi
push 8
push 0x1387
push ebp
call dword [sym.imp.GDI32.dll_ExtEscape]
push ebp
call dword [sym.imp.GDI32.dll_StartPage]
test eax, eax
jl 0x402667
mov eax, dword [edi]
mov ecx, dword [esi + 0x2bc]
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [esi + 0x210]
cdq
sub eax, edx
mov edi, eax
xor eax, eax
sar ebx, 1
sar edi, 1
cmp ecx, eax
je 0x4025f9
mov ecx, 1
mov word [esp + 0x5c], ax
mov word [esp + 0x5e], cx
mov word [esp + 0x6a], cx
mov ecx, dword [esi + 0x2e0]
mov word [esp + 0x60], ax
cmp ecx, eax
mov word [esp + 0x62], ax
mov word [esp + 0x64], ax
mov word [esp + 0x66], ax
mov word [esp + 0x68], ax
je 0x4022d7
push ebp
mov dword [esp + 0x14], ebp
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edx, dword [esp + 0x28]
mov ebp, eax
mov eax, dword [esp + 0x24]
cmp eax, edx
mov ecx, eax
jg 0x402293
mov ecx, edx
mov eax, edx
push ecx
mov ecx, dword [esp + 0x14]
push eax
push ecx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
push ebp
mov dword [esp + 0x98], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov edx, dword [esp + 0x54]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.GDI32.dll_GetTextAlign]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SetTextAlign]
push ebp
call dword [sym.imp.GDI32.dll_BeginPath]
jmp 0x4022db
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x24]
cdq
sub eax, edx
sar eax, 1
mov ecx, eax
mov eax, dword [esi + 0x2d0]
neg ecx
test eax, eax
mov dword [esp + 0x48], ecx
je 0x40230e
mov eax, dword [esp + 0x94]
cdq
and edx, 3
add eax, edx
sar eax, 2
neg eax
add ecx, eax
mov dword [esp + 0x48], ecx
mov eax, dword [esp + 0x28]
mov cx, word [esi + 0x2c4]
cdq
and edx, 3
push ecx
add eax, edx
lea edx, [esp + 0x44]
sar eax, 2
neg eax
mov dword [esp + 0x50], eax
lea eax, [esp + 0x4c]
push edx
push eax
call fcn.00401620
mov ecx, dword [esp + 0x4c]
mov edx, dword [esi + 0x2c8]
add esp, 0xc
add ecx, ebx
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x2c], ecx
push edx
sub edi, ebx
push 3
push 0
mov dword [esp + 0x3c], edi
call dword [sym.imp.GDI32.dll_CreatePen]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push eax
push ebp
mov dword [esp + 0x3c], eax
call edi
mov dword [esp + 0x50], eax
mov eax, dword [esi + 0x2c8]
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
push ebp
mov dword [esp + 0x28], eax
call edi
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x18]
test eax, eax
mov dword [esp + 0x14], 0
jle 0x4024c4
mov eax, dword [esp + 0x84]
xor ebx, ebx
test eax, eax
je 0x4023b6
mov ecx, dword [esp + 0x14]
mov bx, word [eax + ecx*2]
jmp 0x4023e4
mov esi, dword [esp + 0x1c]
push esi
push esi
mov bl, byte [esi]
call dword [sym.imp.MSVCRT.dll__ismbslead]
add esp, 8
cmp eax, 0xffffffff
jne 0x4023df
mov eax, dword [esp + 0x14]
inc esi
xor edx, edx
mov dl, byte [esi]
shl ebx, 8
or ebx, edx
inc eax
mov dword [esp + 0x14], eax
inc esi
mov dword [esp + 0x1c], esi
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x5c]
push eax
push 0
lea ecx, [esp + 0xd8]
push 0
push ecx
push edx
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4024c4
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov edx, dword [esp + 0x3c]
add esp, 4
mov esi, eax
lea eax, [esp + 0x5c]
push eax
push esi
lea ecx, [esp + 0xd8]
push edi
push ecx
push edx
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
mov eax, dword [esi + 0xc]
push 0
push eax
call fcn.00401690
mov ecx, dword [esp + 0x38]
mov edx, dword [esi + 8]
add esp, 4
sub ecx, eax
push ecx
push edx
call fcn.00401690
mov edx, dword [esp + 0x38]
add esp, 4
add eax, edx
push eax
push ebp
call dword [sym.imp.GDI32.dll_MoveToEx]
lea eax, [esp + 0x2c]
push eax
push edi
push esi
push ebp
call entry0
push esi
call dword [sym.imp.MSVCRT.dll_free]
movsx ecx, word [esp + 0xf4]
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x50]
add esp, 0x14
add edx, ecx
test eax, eax
mov dword [esp + 0x2c], edx
je 0x4024a3
movsx edx, word [esp + 0xe2]
add dword [esp + 0x30], edx
jmp 0x4024af
movsx eax, word [esp + 0xe2]
sub dword [esp + 0x30], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jl 0x40239f
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4025cd
push ebp
call dword [sym.imp.GDI32.dll_EndPath]
push ebp
call dword [sym.imp.GDI32.dll_FlattenPath]
test eax, eax
je 0x4025b0
push 0
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_GetPath]
mov edi, eax
test edi, edi
jle 0x4025b0
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
lea ecx, [edi*8]
push ecx
call ebx
push edi
mov esi, eax
call ebx
add esp, 8
mov dword [esp + 0x18], eax
push edi
push eax
push esi
push ebp
call dword [sym.imp.GDI32.dll_GetPath]
mov edx, dword [esp + 0x34]
mov edi, dword [esp + 0x10]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push edi
mov dword [esp + 0x24], eax
call ebx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x20]
push eax
push edi
call ebx
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push 0
push ecx
push edx
push edi
mov dword [esp + 0x68], eax
call dword [sym.imp.GDI32.dll_MoveToEx]
mov eax, dword [esp + 0x1c]
mov ebx, 1
cmp eax, ebx
jle 0x40259d
mov eax, dword [esp + 0x18]
cmp byte [ebx + eax], 6
jne 0x402584
mov ecx, dword [esi + ebx*8 + 4]
mov edx, dword [esi + ebx*8]
push 0
push ecx
push edx
push edi
call dword [sym.imp.GDI32.dll_MoveToEx]
jmp 0x402594
mov eax, dword [esi + ebx*8 + 4]
mov ecx, dword [esi + ebx*8]
push eax
push ecx
push edi
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x1c]
inc ebx
cmp ebx, eax
jl 0x402566
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
add esp, 8
mov eax, dword [esp + 0x90]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push eax
call esi
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ebp, dword [esp + 0x10]
jmp 0x4025d3
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [esp + 0x50]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push ecx
push ebp
call edi
mov edx, dword [esp + 0x58]
push edx
push ebp
call edi
mov eax, dword [esp + 0x34]
push eax
call esi
mov ecx, dword [esp + 0x20]
push ecx
call esi
jmp 0x402667
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x40]
cdq
and edx, 3
mov dword [esp + 0x40], 0
add eax, edx
mov dx, word [esi + 0x2c4]
sar eax, 2
neg eax
mov dword [esp + 0x44], eax
lea eax, [esp + 0x48]
push edx
push eax
push ecx
call fcn.00401620
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x58]
add esp, 0xc
add ebx, ecx
sub edi, eax
push 1
push ebp
call dword [sym.imp.GDI32.dll_SetBkMode]
mov edx, dword [esi + 0x2c8]
push edx
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push edi
push ebx
push ebp
call dword [sym.imp.GDI32.dll_TextOutA]
mov eax, dword [esp + 0x84]
xor esi, esi
cmp eax, esi
je 0x402685
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [esp + 0x84], esi
mov eax, dword [esp + 0x70]
cmp eax, esi
je 0x40269b
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [esp + 0x70], esi
push 0xd
call dword [sym.imp.GDI32.dll_GetStockObject]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x54]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3f4
ret