Function at 0x40cb70
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea eax, [ebp - 0xac]
push ebx
sub esp, 0xec
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xac], 8
mov dword [esp], eax
mov dword [ebp - 0xa8], 0x604
call sym.unk_170
sub esp, 4
mov dword [esp + 4], 0x4118dc
mov dword [esp], ebx
call sym.unk_180
mov dword [ebp - 0x48], 0x30
sub esp, 8
mov esi, eax
mov dword [ebp - 0x44], 0
mov dword [esp + 4], 0x66
mov dword [esp], ebx
mov dword [ebp - 0x40], sym.unk_100
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 4
mov dword [ebp - 0x34], ebx
call sub.user32.dll_LoadIconW
sub esp, 8
mov dword [ebp - 0x30], eax
mov dword [esp], 0x32
call sub.user32.dll_GetSystemMetrics
sub esp, 4
mov edi, eax
mov dword [esp], 0x31
call sub.user32.dll_GetSystemMetrics
sub esp, 4
mov dword [esp + 0x10], edi
lea edi, [ebp - 0x48]
mov dword [esp + 0x14], 0x8000
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 0x66
mov dword [esp], ebx
call sub.user32.dll_LoadImageW
sub esp, 0x18
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
call sub.user32.dll_LoadCursorW
sub esp, 8
mov dword [ebp - 0x2c], eax
mov dword [esp], 5
call sub.user32.dll_GetSysColorBrush
mov dword [ebp - 0x24], 0x898
sub esp, 4
mov dword [ebp - 0x28], eax
mov dword [esp], edi
mov dword [ebp - 0x20], str.WORDPADTOP
call sym.unk_166
mov dword [ebp - 0x44], 0
sub esp, 4
mov dword [ebp - 0x40], sym.unk_50
mov dword [esp + 4], 0x7f01
mov dword [esp], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x1c], 0
call sub.user32.dll_LoadCursorW
mov dword [ebp - 0x28], 0
sub esp, 8
mov dword [ebp - 0x2c], eax
mov dword [esp], edi
lea edi, [ebp - 0x9c]
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], str.PrtPreview
call sym.unk_166
sub esp, 4
mov dword [esp], edi
call sym.unk_56
mov dword [esp + 4], 1
mov dword [esp], edi
call sym.unk_185
lea edx, [ebp - 0x70]
mov dword [ebp - 0x70], 0x28
sub esp, 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.user32.dll_GetMonitorInfoW
lea eax, [ebp - 0x5c]
mov edx, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0x98]
sub esp, 8
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], eax
mov dword [ebp - 0xc0], edx
mov dword [ebp - 0xbc], ecx
call sub.user32.dll_IntersectRect
mov eax, dword [ebp - 0x54]
sub esp, 0xc
cmp dword [ebp - 0x5c], eax
jge 0x40d190
mov ecx, dword [ebp - 0xbc]
mov edx, dword [ebp - 0xc0]
mov eax, 0x80000000
mov edi, dword [ebp - 0x58]
cmp edi, dword [ebp - 0x50]
cmovge ecx, eax
cmovge edx, eax
mov eax, dword [ebp - 0x90]
sub eax, dword [ebp - 0x98]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x1c], eax
mov eax, dword [ebp - 0x94]
sub eax, dword [ebp - 0x9c]
mov dword [esp + 0x10], edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x18], eax
mov dword [esp + 0xc], 0x2cf0000
mov dword [esp + 8], 0x411978
mov dword [esp + 4], str.WORDPADTOP
mov dword [esp], 0
call sub.user32.dll_CreateWindowExW
sub esp, 0x30
mov dword [0x41a728], eax
lea eax, [ebp - 0xb0]
mov dword [esp], eax
call sym.unk_57
cmp dword [ebp + 0x14], 1
je 0x40d120
cmp dword [ebp + 0x14], 0xa
je 0x40d120
mov eax, dword [ebp + 0x14]
lea edi, [ebp - 0xa4]
mov dword [esp + 4], eax
mov eax, dword [0x41a728]
mov dword [esp], eax
call sym.unk_155
xor eax, eax
sub esp, 8
call sym.unk_91
call sym.unk_84
mov eax, 2
call sym.unk_85
mov dword [esp], ebx
mov dword [esp + 4], 0x89a
call sub.user32.dll_LoadMenuW
sub esp, 8
mov dword [0x41a71c], eax
call sym.unk_44
mov eax, dword [0x4102a4]
mov dword [esp], eax
call sym.unk_60
mov eax, dword [eax*4 + 0x41a710]
mov dword [esp + 4], eax
mov eax, dword [0x41a728]
mov dword [esp], eax
call sym.unk_40
mov eax, dword [0x41a728]
mov dword [esp + 4], 0x7d4
mov dword [esp], eax
call sub.user32.dll_GetDlgItem
sub esp, 8
mov dword [esp + 4], 0x7df
mov dword [esp], eax
call sub.user32.dll_GetDlgItem
mov ebx, eax
mov eax, dword [0x41a728]
sub esp, 8
mov dword [esp + 4], 0x7d1
mov dword [esp], eax
call sub.user32.dll_GetDlgItem
sub esp, 8
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0xd6
mov dword [esp], eax
call sym.unk_169
sub esp, 0x10
mov dword [esp + 8], sym.unk_42
mov dword [esp + 4], 0xfffffffc
mov dword [esp], ebx
call sym.unk_161
sub esp, 0xc
mov dword [esp + 0xc], eax
mov dword [esp + 8], edi
mov dword [esp + 4], 0x400
mov dword [esp], ebx
call sym.unk_169
sub esp, 0x10
call sub.kernel32.dll_GetCommandLineW
movzx edx, word [eax]
cmp dx, 0x20
jne 0x40cf4c
lea esi, [esi]
lea esi, [esi]
add eax, 2
movzx edx, word [eax]
cmp dx, 0x20
je 0x40cf40
cmp dx, 0x22
je 0x40d1a0
mov edx, 0x20
movzx ecx, word [eax]
test cx, cx
jne 0x40cf7f
jmp 0x40d03e
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x40d03e
cmp cx, dx
jne 0x40cf70
movzx ebx, word [eax + 2]
lea edx, [eax + 2]
test bx, bx
je 0x40d03e
xor edi, edi
cmp bx, 9
je 0x40cfa2
cmp bx, 0x20
jne 0x40cfb4
add edx, 2
movzx ebx, word [edx]
cmp bx, 0x20
je 0x40cfa2
cmp bx, 9
je 0x40cfa2
and ebx, 0xfffffffd
cmp bx, 0x2d
jne 0x40cffd
movzx ebx, word [edx + 4]
test bx, bx
je 0x40d150
movzx eax, bx
mov dword [ebp - 0xbc], edx
mov dword [esp], eax
call sym._isspace
mov edx, dword [ebp - 0xbc]
test eax, eax
je 0x40cffd
movzx eax, word [edx + 2]
cmp ax, 0x50
je 0x40d180
cmp ax, 0x70
je 0x40d180
movzx eax, word [edx]
test ax, ax
je 0x40d036
cmp ax, 0x22
je 0x40d1b0
mov eax, edx
call sym.unk_95
mov eax, dword [0x41a728]
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.user32.dll_InvalidateRect
sub esp, 0xc
test edi, edi
jne 0x40d164
lea ebx, [ebp - 0x8c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.user32.dll_GetMessageW
sub esp, 0x10
test eax, eax
je 0x40d140
mov eax, dword [0x41a720]
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.user32.dll_IsDialogMessageW
sub esp, 8
test eax, eax
jne 0x40d044
mov eax, dword [0x41a728]
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.user32.dll_TranslateAcceleratorW
sub esp, 0xc
test eax, eax
jne 0x40d044
mov dword [esp], ebx
call sym.unk_178
sub esp, 4
mov dword [esp], ebx
call sub.user32.dll_DispatchMessageW
sub esp, 4
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
call sub.user32.dll_PeekMessageW
sub esp, 0x14
test eax, eax
jne 0x40d044
mov eax, dword [0x41a728]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x400
mov dword [esp], eax
call sym.unk_169
sub esp, 0x10
jmp 0x40d044
mov edx, dword [ebp - 0xb0]
mov eax, 3
test edx, edx
cmove eax, dword [ebp + 0x14]
mov dword [ebp + 0x14], eax
jmp 0x40ce15
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret 0x10
movzx eax, word [edx + 2]
cmp ax, 0x50
je 0x40d164
cmp ax, 0x70
jne 0x40cffd
mov eax, dword [0x41a728]
xor ecx, ecx
mov edx, 0x6af
call sym.unk_94
jmp 0x40d03e
add edx, 4
mov edi, 1
jmp 0x40cf96
mov ecx, 0x80000000
mov edx, 0x80000000
jmp 0x40cd83
add eax, 2
jmp 0x40cf5b
cmp word [edx + 2], 0
lea ecx, [edx + 2]
je 0x40d1d1
mov eax, ecx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x40d1c0
sub eax, ecx
sar eax, 1
lea edx, [ecx + eax*2 - 2]
xor eax, eax
mov word [edx], ax
mov edx, ecx
jmp 0x40d00f