Function at 0x401c00
Capabilities:
Check os version

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 + 0x24], 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
mov byte [esp + 0xa8], dl
mov byte [esp + 0xab], al
sbb cl, cl
lea edx, [esi + 0x298]
lea eax, [esp + 0xb0]
and ecx, 7
push edx
push eax
mov byte [esp + 0xb2], 0
mov byte [esp + 0xb4], cl
mov byte [esp + 0xb5], 0
mov byte [esp + 0xb6], 0
mov byte [esp + 0xb7], 0
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea ecx, [esp + 0x94]
push ecx
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
test eax, eax
mov dword [esp + 0x54], eax
jne 0x401e4c
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 + 0x14], eax
jne 0x401e6e
mov dword [esp + 0x14], 0
mov eax, dword [esi + 0x2d8]
test eax, eax
je 0x401e7f
push 0x11e
jmp 0x401e81
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 + 0x20], eax
mov eax, dword [esi + 0x2bc]
test eax, eax
je 0x401fbf
mov eax, dword [esp + 0x14]
and eax, 0x132
mov dword [esp + 0x1c], eax
je 0x401fbf
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 0x401fbf
push 1
push ebx
call edi
lea edx, [eax + eax + 2]
push edx
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
mov dword [esp + 0x84], eax
test eax, eax
jne 0x401f0b
mov eax, dword [esp + 0x70]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
jmp 0x401fb7
push ebx
call edi
push ebx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x14], 0
call edi
test eax, eax
jle 0x401f36
mov eax, dword [esp + 0x10]
push ebx
inc eax
mov dword [esp + 0x14], eax
call edi
cmp dword [esp + 0x10], eax
jl 0x401f24
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x6c]
push ecx
push edx
push 0
push ebx
call edi
push eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetCharacterPlacementA]
test eax, eax
je 0x401f90
mov eax, dword [esp + 0x88]
mov dword [esp + 0x38], 0x82
mov dword [esp + 0x20], eax
mov al, byte [esp + 0x14]
test al, 2
je 0x401fbf
push ebx
mov dword [esp + 0x14], 0
call edi
test eax, eax
jle 0x401fbf
mov eax, dword [esp + 0x10]
push ebx
inc eax
mov dword [esp + 0x14], eax
call edi
cmp dword [esp + 0x10], eax
jl 0x401f7c
jmp 0x401fbf
mov ecx, dword [esp + 0x84]
push ecx
call dword [sym.imp.MSVCRT.dll_free]
mov edx, dword [esp + 0x74]
mov dword [esp + 0x88], 0
push edx
call dword [sym.imp.MSVCRT.dll_free]
add esp, 8
mov dword [esp + 0x70], 0
lea eax, [esp + 0x24]
push eax
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 0x401ff2
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
mov edx, dword [esp + 0x24]
sar eax, 3
add ecx, eax
mov dword [esp + 0x28], ecx
mov cx, word [esi + 0x2c4]
push ecx
push edx
call fcn.004015c0
mov ecx, dword [esp + 0x28]
mov ebx, eax
mov ax, word [esi + 0x2c4]
mov dword [esp + 0x44], edx
push eax
push ecx
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 + 0x1c], eax
mov eax, ebx
cdq
xor eax, edx
sub eax, edx
mov edx, dword [esp + 0x1c]
add edx, eax
mov eax, dword [esp + 0x44]
mov dword [edi], edx
cdq
mov ebx, eax
mov eax, ecx
xor ebx, edx
sub ebx, edx
cdq
xor eax, edx
sub eax, edx
lea edx, [esp + 0xe4]
add ebx, eax
push edx
mov dword [esi + 0x210], ebx
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x402126
mov ecx, dword [esp + 0xf4]
xor ebx, ebx
cmp ecx, 2
sete bl
test ebx, ebx
jne 0x4020b1
mov eax, dword [esp + 0xec]
mov dword [esp + 0x3c], ebx
cmp eax, 0x5a
jb 0x4020b9
mov dword [esp + 0x3c], 1
test ebx, ebx
je 0x40212a
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [esp + 0x1f8], eax
mov eax, dword [esp + 0x41c]
lea edx, [esp + 0x200]
mov dword [esp + 0x1fc], ecx
sub edx, eax
mov cl, byte [eax]
mov byte [eax + edx], cl
inc eax
test cl, cl
jne 0x4020e0
mov edx, dword [esp + 0x428]
mov dword [esp + 0x41c], edx
lea eax, [esp + 0x414]
push eax
push ebp
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
jle 0x4025b2
push 0
push 0
test ebx, ebx
je 0x402144
lea ecx, [esp + 0x200]
push ecx
push 0x10c
jmp 0x402147
mov ebx, dword [esp + 0x34]
mov eax, dword [esi + 0x2bc]
test eax, eax
jne 0x4020f8
mov eax, dword [esi + 0x208]
test eax, eax
je 0x4025b2
jmp 0x4020f8
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 0x4025b2
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 0x402544
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 0x402222
push ebp
mov dword [esp + 0x18], 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 0x4021de
mov ecx, edx
mov eax, edx
mov edx, dword [esp + 0x14]
push ecx
push eax
push edx
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
push eax
push ebp
mov dword [esp + 0x98], eax
call dword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [esp + 0x54]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov ecx, dword [esp + 0x14]
push ecx
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 0x402226
mov dword [esp + 0x14], 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 0x402259
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]
lea ecx, [esp + 0x48]
cdq
and edx, 3
add eax, edx
mov dx, word [esi + 0x2c4]
sar eax, 2
neg eax
mov dword [esp + 0x4c], eax
lea eax, [esp + 0x40]
push edx
push eax
push ecx
call fcn.00401620
mov edx, dword [esp + 0x4c]
mov eax, dword [esi + 0x2c8]
add esp, 0xc
add edx, ebx
mov ebx, dword [esp + 0x44]
mov dword [esp + 0x2c], edx
push eax
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 ecx, dword [esi + 0x2c8]
mov dword [esp + 0x50], eax
push ecx
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
push ebp
mov dword [esp + 0x24], eax
call edi
mov dword [esp + 0x58], eax
mov eax, dword [esp + 0x20]
test eax, eax
mov dword [esp + 0x10], 0
jle 0x40240f
mov eax, dword [esp + 0x84]
xor ebx, ebx
test eax, eax
je 0x402301
mov edx, dword [esp + 0x10]
mov bx, word [eax + edx*2]
jmp 0x40232f
mov esi, dword [esp + 0x18]
push esi
push esi
mov bl, byte [esi]
call dword [sym.imp.MSVCRT.dll__ismbslead]
add esp, 8
cmp eax, 0xffffffff
jne 0x40232a
inc esi
xor eax, eax
shl ebx, 8
mov al, byte [esi]
or ebx, eax
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
inc esi
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x5c]
push ecx
push 0
lea edx, [esp + 0xd8]
push 0
push edx
push eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40240f
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
lea ecx, [esp + 0x5c]
mov esi, eax
mov eax, dword [esp + 0x38]
push ecx
push esi
lea edx, [esp + 0xd8]
push edi
push edx
push eax
push ebx
push ebp
call dword [sym.imp.GDI32.dll_GetGlyphOutlineA]
mov ecx, dword [esi + 0xc]
push 0
push ecx
call fcn.00401690
mov edx, dword [esp + 0x38]
add esp, 4
sub edx, eax
mov eax, dword [esi + 8]
push edx
push eax
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 ecx, [esp + 0x2c]
push ecx
push edi
push esi
push ebp
call entry0
push esi
call dword [sym.imp.MSVCRT.dll_free]
movsx edx, word [esp + 0xf4]
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x50]
add esp, 0x14
add ecx, edx
test eax, eax
mov dword [esp + 0x2c], ecx
je 0x4023ee
movsx eax, word [esp + 0xe2]
add dword [esp + 0x30], eax
jmp 0x4023fa
movsx ecx, word [esp + 0xe2]
sub dword [esp + 0x30], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x4022ea
mov eax, dword [esp + 0x14]
test eax, eax
je 0x402518
push ebp
call dword [sym.imp.GDI32.dll_EndPath]
push ebp
call dword [sym.imp.GDI32.dll_FlattenPath]
test eax, eax
je 0x4024fb
push 0
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_GetPath]
mov edi, eax
test edi, edi
jle 0x4024fb
mov ebx, dword [sym.imp.MSVCRT.dll_malloc]
lea edx, [edi*8]
push edx
call ebx
push edi
mov esi, eax
call ebx
add esp, 8
mov dword [esp + 0x20], eax
push edi
push eax
push esi
push ebp
call dword [sym.imp.GDI32.dll_GetPath]
mov edi, dword [esp + 0x14]
mov ebx, dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x34]
push eax
push edi
call ebx
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x50], eax
push ecx
push edi
call ebx
mov edx, dword [esi + 4]
mov dword [esp + 0x58], eax
mov eax, dword [esi]
push 0
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_MoveToEx]
mov eax, dword [esp + 0x18]
mov ebx, 1
cmp eax, ebx
jle 0x4024e8
mov ecx, dword [esp + 0x20]
cmp byte [ebx + ecx], 6
jne 0x4024cf
mov edx, dword [esi + ebx*8 + 4]
mov eax, dword [esi + ebx*8]
push 0
push edx
push eax
push edi
call dword [sym.imp.GDI32.dll_MoveToEx]
jmp 0x4024df
mov ecx, dword [esi + ebx*8 + 4]
mov edx, dword [esi + ebx*8]
push ecx
push edx
push edi
call dword [sym.imp.GDI32.dll_LineTo]
mov eax, dword [esp + 0x18]
inc ebx
cmp ebx, eax
jl 0x4024b1
push esi
mov esi, dword [sym.imp.MSVCRT.dll_free]
call esi
mov eax, dword [esp + 0x24]
push eax
call esi
add esp, 8
mov ecx, dword [esp + 0x90]
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
push ecx
call esi
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
mov ebp, dword [esp + 0x14]
jmp 0x40251e
mov esi, dword [sym.imp.GDI32.dll_DeleteObject]
mov edx, dword [esp + 0x50]
mov edi, dword [sym.imp.GDI32.dll_SelectObject]
push edx
push ebp
call edi
mov eax, dword [esp + 0x58]
push eax
push ebp
call edi
mov ecx, dword [esp + 0x34]
push ecx
call esi
mov edx, dword [esp + 0x1c]
push edx
call esi
jmp 0x4025b2
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x48]
cdq
and edx, 3
mov dword [esp + 0x40], 0
add eax, edx
lea edx, [esp + 0x40]
sar eax, 2
neg eax
mov dword [esp + 0x44], eax
mov ax, word [esi + 0x2c4]
push eax
push ecx
push edx
call fcn.00401620
mov edx, dword [esp + 0x54]
mov ecx, dword [esp + 0x58]
add esp, 0xc
add ebx, edx
sub edi, ecx
push 1
push ebp
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi + 0x2c8]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SetTextColor]
mov esi, dword [esp + 0x18]
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 0x4025d0
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 0x4025e6
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 ecx, dword [esp + 0x54]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3f4
ret