Function at 0x401410
Capabilities:
Create thread

Disassembly:
push ebp
lea ebp, [esp - 0x184]
sub esp, 0x184
push 0xfffffffffffffffe
push 0x411ab0
push 0x405e30
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x4133d8]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp + 0x180], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 0x190]
mov dword [ebp - 0x24], eax
call fcn.00405189
push eax
call fcn.00407d89
push eax
call fcn.00405db7
add esp, 8
test eax, eax
jne 0x401491
push 0x8000
call fcn.00405189
push eax
call fcn.00407d89
add esp, 4
push eax
call fcn.00405cc0
add esp, 8
push 0x8000
call fcn.00405189
add eax, 0x20
push eax
call fcn.00407d89
add esp, 4
push eax
call fcn.00405cc0
add esp, 8
push 0x8000
call fcn.00405189
add eax, 0x40
push eax
call fcn.00407d89
add esp, 4
push eax
call fcn.00405cc0
add esp, 8
call dword [sym.imp.USER32.dll_GetForegroundWindow]
mov dword [0x414b78], eax
push 0x100
push 0
lea ecx, [ebp]
push ecx
call fcn.00406340
push 0x100
lea edx, [ebp]
push edx
push 0x414b40
call fcn.004018f0
add esp, 0x18
test eax, eax
je 0x40153e
push str.Cant_load_Ghostscript_DLL_n
call fcn.00405189
add eax, 0x40
push eax
call fcn.00405ab5
add esp, 8
lea eax, [ebp]
push eax
push 0x41037c
call fcn.00405189
add eax, 0x40
push eax
call fcn.00405ab5
add esp, 0xc
mov eax, 1
jmp case.0x401803.110
push 0
push 0x414b6c
call dword [0x414b48]
test eax, eax
jge 0x40156f
push str.Cant_create_Ghostscript_instance_n
call fcn.00405189
add eax, 0x40
push eax
call fcn.00405ab5
add esp, 8
mov eax, 1
jmp case.0x401803.110
push 0
push 0xffff
push 0x4010b0
call fcn.004059fe
add esp, 0xc
or ebx, 0xffffffff
cmp eax, ebx
jne 0x401591
push str.GUI_thread_creation_failed_n
jmp 0x4015e5
mov esi, 0x1e
push 0
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
call edi
cmp dword [0x414b74], ebx
jne 0x4015b3
sub esi, 1
push 0x64
call edi
test esi, esi
jne 0x4015a0
test esi, esi
je 0x4015e0
push 0
push 0
push 0x400
mov ecx, dword [0x414b70]
push ecx
call dword [sym.imp.USER32.dll_PostThreadMessageA]
test eax, eax
jne 0x4015dc
sub esi, 1
push 0x64
call edi
test esi, esi
jne 0x4015b7
test esi, esi
jne 0x4015f6
push str.Cant_post_message_to_GUI_thread_n
call fcn.00405189
add eax, 0x40
push eax
call fcn.00405ab5
add esp, 8
push 0x401070
push 0x401030
push section..text
mov edx, dword [0x414b6c]
push edx
call dword [0x414b50]
push 0x41301c
mov eax, dword [0x414b6c]
push eax
call dword [0x414b58]
mov dword [ebp - 0x1c], 0x30101
push 0
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0xe
push esi
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
call ebx
mov edi, eax
push 0xc
push esi
call ebx
imul edi, eax
push 0x5a
push esi
call ebx
push eax
push str._dDisplayResolution_d
lea ecx, [ebp + 0x100]
push ecx
call fcn.00405885
add esp, 0xc
push esi
push 0
call dword [sym.imp.USER32.dll_ReleaseDC]
cmp edi, 0x20
jne 0x40167a
mov dword [ebp - 0x1c], 0x30884
jmp 0x4016ad
cmp edi, 0x10
jne 0x401688
mov dword [ebp - 0x1c], 0x32001
jmp 0x4016ad
cmp edi, 8
jle 0x401696
mov dword [ebp - 0x1c], 0x30804
jmp 0x4016ad
jl 0x4016a1
mov dword [ebp - 0x1c], 0x30801
jmp 0x4016ad
cmp edi, 4
jl 0x4016ad
mov dword [ebp - 0x1c], 0x30401
mov edx, dword [ebp - 0x1c]
push edx
push str._dDisplayFormat_d
lea eax, [ebp + 0x140]
push eax
call fcn.00405885
mov ebx, dword [ebp + 0x18c]
lea edi, [ebx + 2]
lea ecx, [edi*4 + 4]
push ecx
call fcn.004057c2
mov esi, eax
mov dword [ebp - 0x1c], esi
mov eax, dword [ebp - 0x24]
mov edx, dword [eax]
mov dword [esi], edx
lea ecx, [ebp + 0x140]
mov dword [esi + 4], ecx
lea edx, [ebp + 0x100]
mov dword [esi + 8], edx
lea ecx, [ebx*4]
push ecx
add eax, 4
push eax
lea edx, [esi + 0xc]
push edx
call fcn.00405fd0
add esp, 0x1c
mov dword [ebp - 4], 0
push esi
push edi
mov eax, dword [0x414b6c]
push eax
call dword [0x414b5c]
mov edi, eax
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x401748
lea ecx, [ebp - 0x28]
push ecx
push eax
push str.systemdict__start_get_exec_n
mov edx, dword [0x414b6c]
push edx
call dword [0x414b60]
mov edi, eax
mov dword [ebp - 0x20], edi
mov eax, dword [0x414b6c]
push eax
call dword [0x414b64]
test edi, edi
je 0x401761
cmp edi, 0xffffff9b
jne 0x401766
test eax, eax
je 0x401766
mov edi, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xfffffffe
jmp 0x4017ae
mov edx, dword [0x414b6c]
push edx
call dword [0x414b4c]
push 0x414b40
call fcn.004018b0
push esi
call fcn.004056e5
add esp, 8
mov dword [0x4140c0], 1
push 0
push 0
push 0x12
mov eax, dword [0x414b70]
push eax
call dword [sym.imp.USER32.dll_PostThreadMessageA]
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
xor eax, eax
lea ecx, [edi + 0x6e]
cmp ecx, 0x6e
ja case.0x401803.109
movzx ecx, byte [ecx + 0x401840]
jmp dword [ecx*4 + 0x401834]
mov eax, 0xff
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x180]
xor ecx, ebp
call fcn.00405e15
add ebp, 0x184
mov esp, ebp
pop ebp
ret