Function at 0x4cbcc0
Capabilities:
Create thread

Disassembly:
push 0xffffffffffffffff
push 0x4ffb4e
mov eax, dword fs:[0]
push eax
mov eax, 0x3008
call fcn.004e6a80
mov eax, dword [0x519bc0]
xor eax, esp
mov dword [esp + 0x3004], eax
push ebx
push esi
push edi
mov eax, dword [0x519bc0]
xor eax, esp
push eax
lea eax, [esp + 0x3018]
mov dword fs:[0], eax
mov eax, dword [esp + 0x3030]
mov esi, dword [esp + 0x3028]
mov dword [esp + 0x10], esi
test eax, eax
jne 0x4cbd67
push 0x800
push 0x501ac8
lea eax, [esp + 0x1c]
push eax
push str.ExternalViewer
push str.Viewer
call fcn.0049c4e0
push 0x800
lea ecx, [esp + 0x2018]
push ecx
lea edx, [esp + 0x1c]
push edx
call dword [0x501324]
test eax, eax
jbe 0x4cbd7f
push 0x800
lea eax, [esp + 0x2018]
push eax
lea ecx, [esp + 0x1c]
push ecx
call fcn.004694f0
jmp 0x4cbd7f
lea edx, [esp + 0x14]
sub edx, eax
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4cbd70
cmp word [esp + 0x14], 0
je 0x4cbf54
push 0x800
push esi
lea edx, [esp + 0x101c]
push edx
call fcn.004694f0
push 0x800
lea eax, [esp + 0x1018]
push eax
call fcn.004a3ca0
lea ecx, [esp + 0x14]
push ecx
call fcn.00445500
test al, al
jne 0x4cbeb6
cmp word [esp + 0x14], 0x22
jne 0x4cbe93
lea edx, [esp + 0x16]
push 0x22
push edx
call fcn.004e9565
add esp, 8
test eax, eax
je 0x4cbeb6
push 0x50a8dc
push eax
call fcn.004e9c9d
mov esi, eax
add esp, 8
test esi, esi
je 0x4cbeb6
movzx eax, word [esi]
push eax
mov edi, esi
call fcn.004691b0
test al, al
je 0x4cbe21
lea esp, [esp]
movzx ecx, word [edi + 2]
add edi, 2
push ecx
call fcn.004691b0
test al, al
jne 0x4cbe10
push 0x800
push edi
lea edx, [esp + 0x201c]
push edx
call fcn.004694f0
push 0x800
push 0x504848
lea eax, [esp + 0x201c]
push eax
call fcn.00469570
push 0x800
lea ecx, [esp + 0x1018]
push ecx
lea edx, [esp + 0x201c]
push edx
call fcn.00469570
movzx ebx, word [esi]
xor eax, eax
mov word [esi], ax
cmp word [esp + 0x14], 0x22
je 0x4cbe9c
lea ecx, [esp + 0x14]
push ecx
call fcn.00445500
test al, al
jne 0x4cbe9c
lea eax, [edi + 2]
mov word [esi], bx
test eax, eax
jne 0x4cbde5
jmp 0x4cbeb6
lea eax, [esp + 0x14]
jmp 0x4cbde5
push 0x800
lea edx, [esp + 0x2018]
push edx
lea eax, [esp + 0x101c]
push eax
call fcn.004694f0
or esi, 0xffffffff
test byte [0x57d8ac], 1
jne 0x4cbef2
or dword [0x57d8ac], 1
mov dword [esp + 0x3020], 0
mov ecx, 0x579788
call fcn.004c9650
push 0x5006d0
call fcn.004ea7e0
add esp, 4
mov dword [esp + 0x3020], esi
mov ecx, dword [esp + 0x10]
push 1
push ecx
mov ecx, 0x579788
call fcn.004ca580
mov bl, byte [esp + 0x302c]
push 0
test bl, bl
sete dl
push 0x579788
movzx eax, dl
push eax
lea ecx, [esp + 0x1020]
push ecx
push 0
lea edx, [esp + 0x28]
push edx
push 0
call fcn.004c9e90
test al, al
jne 0x4cbf58
mov eax, dword [0x579790]
cmp eax, esi
je 0x4cbf4a
push eax
call dword [0x5011e4]
mov dword [0x579790], esi
mov ecx, 0x57d7aa
call fcn.00466bc0
xor al, al
jmp 0x4cbfa0
test bl, bl
je 0x4cbf7e
cmp dword [0x579788], 0
je 0x4cbf7e
push 0x579788
push 0x10000
push 0x4cb470
call fcn.004ebcc6
add esp, 0xc
jmp 0x4cbf9e
mov eax, dword [0x579790]
cmp eax, esi
je 0x4cbf94
push eax
call dword [0x5011e4]
mov dword [0x579790], esi
mov ecx, 0x57d7aa
call fcn.00466bc0
mov al, 1
mov ecx, dword [esp + 0x3018]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x3004]
xor ecx, esp
call fcn.004e6a64
add esp, 0x3014
ret 0xc