Function at 0x402d0f
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x278
push ebx
push esi
push edi
mov esi, ecx
push 0x3f
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x277]
mov byte [ebp - 0x278], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 9
xor eax, eax
pop ecx
lea edi, [ebp - 0xa7]
mov byte [ebp - 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x402ffa
mov ecx, dword [ebp + 8]
push dword [ebp + 0x10]
mov dword [esi + 0xc], ecx
lea ecx, [esi + 0x10]
mov dword [esi + 8], eax
call fcn.00403a7b
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x278]
push 0x100
push eax
push 5
push dword [0x416f0c]
call edi
lea eax, [ebp - 0xa8]
push 0x28
push eax
push 6
push dword [0x416f0c]
call edi
lea eax, [ebp - 0xa8]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
cmp eax, ebx
pop ecx
mov dword [ebp + 0xc], eax
jne 0x402db5
mov dword [ebp + 0xc], 8
lea eax, [ebp - 0x178]
mov dword [ebp - 0x178], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
xor eax, eax
cmp dword [ebp - 0x168], 2
push 0x42
sete al
pop edi
mov dword [ebp - 8], eax
push edi
lea eax, [ebp - 0x64]
push ebx
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x64]
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x5c], ebx
push eax
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x50], 0x400
call sub.comdlg32.dll_PrintDlgA
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x64]
push eax
mov dword [ebp - 0x50], 0x100
mov dword [ebp - 0x60], edi
call sub.comdlg32.dll_PrintDlgA
test eax, eax
je 0x402fee
push 0x7f02
push ebx
call dword [sym.imp.USER32.dll_LoadCursorA]
push eax
call dword [sym.imp.USER32.dll_SetCursor]
push ebx
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x54]
push ebx
push 0x31
push edi
mov dword [ebp + 8], eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
cmp eax, ebx
je 0x402eb5
lea ecx, [ebp - 0xe4]
push ecx
push 0x3c
push eax
call dword [sym.imp.GDI32.dll_GetObjectA]
push 0x48
push 0x5a
push dword [ebp - 0x54]
call edi
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_MulDiv]
neg eax
mov dword [ebp - 0xe4], eax
lea eax, [ebp - 0xe4]
push eax
mov dword [ebp - 0xe0], ebx
mov dword [ebp - 0xd4], 0x190
mov byte [ebp - 0xd0], bl
call dword [sym.imp.GDI32.dll_CreateFontIndirectA]
cmp eax, ebx
mov dword [ebp + 0x10], eax
je 0x402eb8
push eax
push dword [ebp - 0x54]
call dword [sym.imp.GDI32.dll_SelectObject]
jmp 0x402eb8
mov dword [ebp + 0x10], ebx
push 0x58
push dword [ebp + 8]
call edi
push 0x5a
mov dword [ebp + 0xc], eax
push dword [ebp + 8]
call edi
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push 4
lea eax, [eax + eax*2]
pop ecx
cdq
idiv ecx
push 8
push dword [ebp + 8]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 4]
cdq
idiv ecx
mov dword [ebp - 4], eax
mov dword [esi + 0x24], eax
call edi
sub eax, dword [ebp - 4]
push 0xa
push dword [ebp + 8]
mov dword [esi + 0x28], eax
call edi
mov ecx, eax
mov eax, dword [ebp + 0xc]
push 4
cdq
pop edi
idiv edi
push 0x14
pop edi
push edi
push ebx
sub ecx, eax
lea eax, [ebp - 0x20]
push eax
mov dword [esi + 0x2c], ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 0x20], edi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x20]
push eax
push edi
mov dword [ebp - 0x1c], str.ccLgView
mov dword [ebp - 0x18], ebx
call dword [sym.imp.GDI32.dll_StartDocA]
test eax, eax
jl 0x402fde
lea eax, [esi + 0x34]
lea ecx, [esi + 0x38]
push eax
mov byte [eax], bl
call fcn.0040ef43
test al, al
je 0x402ffa
lea eax, [ebp + 0xc]
push eax
push ebx
push esi
push 0x403993
push ebx
push ebx
call dword [sym.imp.MSVCRT.dll__beginthreadex]
add esp, 0x18
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x402ffa
push edi
mov ecx, esi
push dword [ebp + 0x10]
call fcn.00403001
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
push 4
push 0xff
lea eax, [ebp + 8]
push 0xffffffffffffffff
push eax
push 1
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjectsEx]
sub eax, ebx
je 0x402fce
dec eax
jne 0x402fce
push 1
push ebx
push ebx
lea eax, [ebp - 0x80]
push ebx
push eax
call esi
test eax, eax
je 0x402f87
cmp dword [ebp - 0x7c], 0x12
je 0x402fce
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x402fa3
push edi
call dword [sym.imp.GDI32.dll_EndDoc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
push dword [ebp - 0xc]
call dword [sym.imp.USER32.dll_SetCursor]
cmp dword [ebp - 8], 1
jne 0x402ffa
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
pop edi
pop esi
pop ebx
leave
ret 0xc