Function at 0x46b710
Capabilities:
Hide graphical window

Disassembly:
push 0xffffffffffffffff
push 0x5d2933
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
mov eax, dword [0x613ad0]
xor eax, esp
mov dword [esp + 0xa0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x613ad0]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov eax, dword [esp + 0xc8]
mov ebx, dword [esp + 0xcc]
mov esi, ecx
mov ecx, dword [0x615468]
mov ebp, 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], ebp
call fcn.0040d440
test ebx, ebx
mov edi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], edi
mov dword [esi + 0x6c], ebx
mov dword [esi + 0x64], eax
mov edx, 0x424f5743
je 0x46b7b2
mov ecx, dword [ebx + 0x10]
test ecx, ecx
je 0x46b7b2
cmp dword [ebx + 8], edx
jne 0x46b7b2
cmp dword [ecx + 8], edx
jne 0x46b7b2
lea eax, [esp + 0x20]
push eax
push ecx
mov ecx, dword [0x615468]
call fcn.0040d880
push 0
mov ecx, ebx
mov dword [esi + 0x68], eax
call fcn.0041cce0
cmp eax, 0xffffffff
jne 0x46b80f
mov ecx, edi
imul ecx, ecx, 0xc8
mov eax, 0x51eb851f
imul ecx
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
lea edx, [esp + 0x30]
push edx
lea edx, [edi + edi*4]
shl edx, 4
mov eax, 0x51eb851f
imul edx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push ecx
mov ecx, esi
call fcn.00459880
push 0
lea ecx, [esp + 0x34]
push ecx
mov ecx, ebx
call fcn.0041d010
mov edx, dword [esp + 0x20]
push ebx
push edx
mov ecx, esi
call fcn.0045bfa0
test eax, eax
je 0x46c05b
cmp dword [0x615428], ebp
jne 0x46b8db
mov eax, dword [esi + 0x6c]
mov ecx, dword [eax + 0x10]
cmp dword [ecx + 8], 0x5453514f
mov dword [esp + 0x18], ecx
jne 0x46b8db
cmp dword [ecx + 0x84], 7
jne 0x46b8db
push eax
call fcn.004277b0
mov edi, eax
test edi, edi
je 0x46b8db
cmp dword [edi + 0x48], 0
je 0x46b8db
cmp dword [edi + 0x14], 0
jne 0x46b8db
mov ecx, dword [edi + 0x10]
push 0
call fcn.0041ce20
mov ecx, dword [edi + 0x48]
mov ebp, dword [ecx + 0x20]
mov ecx, dword [edi + 0x10]
cdq
sub eax, edx
sar eax, 1
push 0
sub ebp, eax
call fcn.0041ce00
cdq
sub eax, edx
mov edx, dword [edi + 0x48]
mov edi, dword [edx + 0x1c]
mov edx, dword [esp + 0x18]
sar eax, 1
push 5
sub edi, eax
mov eax, dword [esi + 0x64]
mov ecx, dword [eax + 0x74]
push 0
push 0
push ecx
mov ecx, dword [edx + 0x8c]
call fcn.0041cd70
mov edx, dword [esp + 0x24]
add eax, ebp
push eax
mov eax, dword [esi + 0x64]
mov ecx, dword [eax + 0x74]
push ecx
mov ecx, dword [edx + 0x8c]
call fcn.0041cce0
add eax, edi
push eax
push 0
mov ecx, esi
call fcn.0058a9ae
mov eax, dword [ebx + 0xd0]
test eax, eax
lea edi, [ebx + 0xcc]
mov dword [esp + 0x24], edi
jne 0x46b8f4
mov eax, dword [0x60f8d4]
push 5
push str._rtf
push eax
call fcn.005adda6
add esp, 0xc
test eax, eax
je 0x46b910
mov dword [esp + 0x1c], 0
mov ecx, edi
call fcn.00442dc0
test eax, eax
lea ecx, [ebx + 0xe0]
jne 0x46b925
xor edx, edx
jmp 0x46b93f
mov edx, eax
lea ebp, [edx + 2]
lea ebx, [ebx]
mov di, word [edx]
add edx, 2
test di, di
jne 0x46b930
sub edx, ebp
sar edx, 1
push edx
push eax
call fcn.00402270
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x28]
push eax
mov eax, dword [edx + 0x74]
lea ecx, [esp + 0x5c]
push ecx
push eax
call fcn.0042d130
add esp, 0xc
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0x5a
push edi
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [esp + 0x58]
push eax
push 0x48
push ecx
call dword [sym.imp.KERNEL32.dll_MulDiv]
push edi
push 0
mov dword [esp + 0x1c], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov ecx, ebx
call fcn.0042a6d0
push 0
mov ecx, ebx
mov dword [esp + 0x1c], eax
lea ebp, [eax + eax]
call fcn.0041ce00
mov edi, eax
push 0
mov ecx, ebx
sub edi, ebp
call fcn.0041ce20
mov ebp, eax
mov eax, dword [esp + 0x18]
add eax, eax
sub ebp, eax
mov eax, dword [esp + 0x18]
mov ecx, 1
mov dword [esi + 0x154], eax
mov dword [esi + 0x158], eax
xor eax, eax
mov dword [esi + 0x168], ecx
mov dword [esi + 0x174], ecx
mov ecx, dword [esi + 0x6c]
cmp ecx, eax
mov dword [esi + 0x15c], edi
mov dword [esi + 0x160], ebp
mov dword [esi + 0x164], 0x186a0
mov dword [esi + 0x16c], eax
mov dword [esi + 0x170], eax
mov dword [esi + 0x178], eax
mov dword [esi + 0x17c], eax
mov dword [esi + 0x180], eax
je 0x46ba3b
cmp dword [ecx + 8], 0x424f5743
jne 0x46ba3b
cmp dword [ecx + 0x54], eax
jne 0x46ba3b
test dword [ecx + 0x120], 0x2000
je 0x46ba3b
mov eax, 1
jmp 0x46ba3d
xor eax, eax
xor ecx, ecx
mov dword [esi + 0x184], eax
xor edx, edx
mov eax, 1
mov dword [esi + 0x194], eax
mov dword [esi + 0x198], eax
mov dword [esi + 0x188], ecx
mov dword [esi + 0x18c], ecx
mov dword [esi + 0x190], ecx
cmp dword [0x615428], ecx
mov dword [esi + 0x19c], eax
sete dl
mov dword [esi + 0x224], ecx
mov dword [esi + 0x228], ecx
mov byte [esi + 0x1a0], 0x42
mov byte [esi + 0x22c], 0xd
mov dword [esi + 0x230], 3
mov dword [esi + 0x26c], edx
mov eax, dword [0x61531c]
mov edx, dword [esi + 0x20]
mov dword [esi + 0x234], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0x238], edx
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 0x23c], ecx
mov dword [esi + 0x264], ecx
mov dword [esi + 0x284], ecx
mov dword [esi + 0x288], ecx
lea ecx, [esp + 0x44]
mov dword [esi + 0x240], 0x40000000
mov dword [esp + 0x14], eax
mov dword [esi + 0x260], eax
call fcn.00442960
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x48]
mov dword [esp + 0xc4], 0
call fcn.00442ce0
mov ecx, dword [esp + 0x48]
test ecx, ecx
jne 0x46bb1c
mov ecx, dword [0x60f8d4]
lea edx, [esi + 0x244]
mov al, byte [ecx]
mov byte [edx], al
add ecx, 1
add edx, 1
test al, al
jne 0x46bb22
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x280], ecx
push 0
mov ecx, ebx
call fcn.0041ce20
push eax
push 0
mov ecx, ebx
call fcn.0041ce00
push eax
lea ecx, [esi + 0x29c]
call fcn.004146c0
mov ecx, dword [esp + 0x2c]
imul ebp, ecx
imul edi, ecx
mov eax, 0x51eb851f
imul ebp
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
mov eax, 0x51eb851f
imul edi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
lea ecx, [esi + 0x2c4]
call fcn.004146c0
cmp dword [esi + 0x2b0], 0
je 0x46bba6
mov edx, dword [esi + 0x2a0]
mov eax, dword [edx + 4]
jmp 0x46bba8
xor eax, eax
mov ecx, dword [esi + 0x158]
push 0x4300004
mov ebp, 1
mov dword [esi + 0x270], eax
mov eax, dword [esi + 0x154]
lea edi, [esi + 0x154]
push ebp
push 0
mov dword [esi + 0x274], eax
mov dword [esi + 0x278], ecx
call sym.LectoraViewer.exe__TerSetFlags_12
push 0x92002
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags2_12
push 0x24000000
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags3_12
mov eax, dword [esi + 0x6c]
test eax, eax
je 0x46bc3d
cmp dword [eax + 8], 0x424f5743
jne 0x46bc3d
cmp dword [eax + 0x54], 0
jne 0x46bc3d
test dword [eax + 0x120], 0x2000
je 0x46bc3d
push 0x8000
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags_12
push 0x200
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags2_12
push 0x80
push 0
jmp 0x46bc5f
push 0x8000
push 0
push 0
call sym.LectoraViewer.exe__TerSetFlags_12
push 0x200
push 0
push 0
call sym.LectoraViewer.exe__TerSetFlags2_12
push 0x80
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags3_12
push ebp
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags4_12
push 0x10000
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags7_12
push 0x2000
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags3_12
xor edx, edx
cmp dword [0x615428], ebp
push 0x40000
sete dl
push edx
push 0
call sym.LectoraViewer.exe__TerSetFlags3_12
xor eax, eax
cmp dword [0x615428], ebp
push 0x20000
sete al
push eax
push 0
call sym.LectoraViewer.exe__TerSetFlags7_12
cmp dword [0x615428], ebp
jne 0x46bcec
mov ecx, dword [esi + 0x6c]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
call eax
test eax, eax
jne 0x46bce8
mov eax, dword [esi + 0x6c]
mov ecx, dword [eax + 0x10]
cmp dword [ecx + 8], 0x5453514f
jne 0x46bcec
push eax
call fcn.004277b0
test eax, eax
je 0x46bcec
mov eax, ebp
jmp 0x46bcee
xor eax, eax
push 0x40000
push eax
push 0
call sym.LectoraViewer.exe__TerSetFlags7_12
xor ecx, ecx
cmp dword [0x615428], ebp
push 0x80000
setne cl
push ecx
push 0
call sym.LectoraViewer.exe__TerSetFlags7_12
push 0x200000
push ebp
push 0
call sym.LectoraViewer.exe__TerSetFlags7_12
cmp dword [esp + 0x1c], 0
jne 0x46bd31
mov dword [esi + 0x228], 0
push edi
call sym.LectoraViewer.exe__CreateTerWindow_4
mov edx, dword [0x61d614]
mov eax, dword [0x61d610]
mov ecx, dword [0x61d60c]
push edx
mov edx, dword [0x61d608]
push eax
mov eax, dword [0x61d604]
push ecx
mov ecx, dword [0x61d57c]
push edx
mov edx, dword [esi + 0x23c]
push eax
push ecx
push edx
call sym.LectoraViewer.exe__TerInitSSCE_28
mov ebp, dword [esp + 0x2c]
mov ecx, ebp
imul ecx, ecx, 0x64
mov eax, 0x51eb851f
imul ecx
mov ecx, dword [esi + 0x23c]
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
push eax
push ecx
call sym.LectoraViewer.exe__TerSetZoom_8
cmp dword [esp + 0x1c], 0
jne 0x46bf07
mov edx, dword [esp + 0x24]
push edx
lea ecx, [esp + 0x34]
call fcn.00442f50
test ebx, ebx
mov byte [esp + 0xc0], 1
je 0x46bde0
cmp dword [ebx + 8], 0x424f5743
jne 0x46bde0
cmp dword [ebx + 0x54], 0
jne 0x46bde0
test dword [ebx + 0x120], 0xff0
je 0x46bde0
push 0x5da43c
lea ecx, [esp + 0x34]
call fcn.00442bc0
xor eax, eax
cmp dword [esp + 0x68], 0x2bc
jl 0x46bdf1
mov eax, 2
cmp byte [esp + 0x6c], 0
je 0x46bdfb
or eax, 4
cmp byte [esp + 0x6d], 0
je 0x46be05
or eax, 1
mov ecx, dword [esp + 0x48]
test ecx, ecx
jne 0x46be13
mov ecx, dword [0x60f8d4]
mov edx, dword [esp + 0x28]
push 1
push edx
movzx edx, byte [esp + 0x77]
push edx
push eax
mov eax, dword [esp + 0x24]
push eax
push ecx
mov ecx, dword [esi + 0x23c]
push ecx
call sym.LectoraViewer.exe__SetTerDefaultFont_28
cmp dword [0x615428], 0
jne 0x46beca
test ebx, ebx
je 0x46beca
mov eax, dword [ebx + 8]
cmp eax, 0x424f5743
jne 0x46beca
cmp dword [ebx + 0x54], 0
jne 0x46be89
test dword [ebx + 0x120], 0x4000
je 0x46be89
mov edx, dword [esi + 0x23c]
push 0xffffffffffffffff
push 0
push 0xb1
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi + 0x23c]
push 1
push 1
push 1
push eax
jmp 0x46bec5
cmp eax, 0x424f5743
jne 0x46beca
cmp dword [ebx + 0x54], 0
jne 0x46beca
test dword [ebx + 0x120], 0x8000
je 0x46beca
mov ecx, dword [esi + 0x23c]
push 0xffffffffffffffff
push 0
push 0xb1
push ecx
call dword [sym.imp.USER32.dll_SendMessageW]
mov edx, dword [esi + 0x23c]
push 1
push 1
push 2
push edx
call sym.LectoraViewer.exe__SetTerParaFmt_16
lea ecx, [esp + 0x30]
call fcn.00442dc0
push 1
push 0xffffffffffffffff
push 0
push eax
mov eax, dword [esi + 0x23c]
push eax
call sym.LectoraViewer.exe__TerInsertTextU_20
mov ecx, dword [esi + 0x23c]
push 0
push ecx
call sym.LectoraViewer.exe__TerSetModify_8
lea ecx, [esp + 0x30]
mov byte [esp + 0xc0], 0
call fcn.00442b40
jmp 0x46bf31
mov ecx, dword [esp + 0x24]
mov eax, dword [ecx + 4]
test eax, eax
mov edi, dword [0x60f8d4]
je 0x46bf1a
mov edi, eax
push 0
push 0
call fcn.00442560
mov edx, dword [esi + 0x23c]
push eax
push edi
push edx
call sym.LectoraViewer.exe__SetTerBuffer_20
mov ecx, dword [esi + 0x6c]
mov edx, dword [ecx + 0x114]
test edx, edx
ja 0x46bf50
cmp dword [ecx + 0x128], 0
jne 0x46bf50
cmp dword [ecx + 0x118], 0
jbe 0x46bfa5
imul edx, ebp
mov eax, 0x51eb851f
mul edx
shr edx, 5
mov dword [esi + 0x2f8], edx
mov edx, dword [ecx + 0x118]
imul edx, ebp
mov eax, 0x51eb851f
mul edx
shr edx, 5
xor eax, eax
mov dword [esi + 0x2fc], edx
cmp dword [ecx + 0x128], eax
setne al
mov dword [esi + 0x300], eax
mov edx, dword [ecx + 0x11c]
mov dword [esi + 0x304], edx
mov eax, dword [ecx + 0x124]
mov dword [esi + 0x308], eax
cmp dword [esp + 0x1c], 0
jne 0x46c024
cmp dword [0x615428], 0
jne 0x46c024
test ecx, ecx
je 0x46bfd4
cmp dword [ecx + 8], 0x424f5743
jne 0x46bfd4
cmp dword [ecx + 0x54], 0
jne 0x46bfd4
test dword [ecx + 0x120], 0xff0
jne 0x46c024
mov edx, dword [esi + 0x23c]
push 0
lea ecx, [esp + 0x28]
push ecx
push edx
call sym.LectoraViewer.exe__GetTerBuffer_12
mov edi, eax
test edi, edi
je 0x46c024
mov ebx, dword [esi + 0x6c]
push edi
call fcn.00467a60
add esp, 4
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x46c000
sub eax, edx
sar eax, 1
lea ecx, [ebx + 0xcc]
jne 0x46c01e
call fcn.00442930
jmp 0x46c024
push edi
call fcn.00442bc0
mov eax, dword [esi + 0x6c]
test dword [eax + 0x120], 0xff0
je 0x46c042
mov ecx, dword [esi + 0x23c]
push 0
push ecx
call dword [sym.imp.USER32.dll_ShowWindow]
lea ecx, [esp + 0x44]
mov dword [esp + 0xc0], 0xffffffff
call fcn.00442b40
mov eax, 1
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.005aac48
add esp, 0xb0
ret 8