Function at 0x404370
Capabilities:
Accept command line arguments
Terminate process

Disassembly:
sub esp, 0x438
mov eax, dword [0x415060]
xor eax, esp
mov dword [esp + 0x434], eax
cmp dword [esp + 0x440], 0
push ebx
mov ebx, dword [esp + 0x440]
mov dword [esp + 0x14], 0x100
mov dword [0x416b94], ebx
je 0x4043d2
push 0x10
push str.Ghostscript
push str.Cant_run_twice
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x434]
xor ecx, esp
call fcn.00406a2d
add esp, 0x438
ret 0x10
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, eax
push esi
xor edi, edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
add eax, 1
push eax
call fcn.00406a8b
add esp, 4
test eax, eax
jne 0x404413
push str.Insufficient_memory_in_WinMain___n
call fcn.00407651
add eax, 0x20
push eax
call fcn.00407502
add esp, 8
lea eax, [edi + 1]
jmp 0x40473e
mov ecx, eax
mov al, byte [esi]
test al, al
je 0x404496
jmp 0x404420
cmp edi, 0x7f
jge 0x404496
mov edx, ecx
cmp al, 0x20
je 0x404468
cmp al, 0x22
jne 0x404454
mov al, byte [esi + 1]
add esi, 1
test al, al
je 0x404468
lea esp, [esp]
cmp al, 0x22
je 0x404459
add esi, 1
mov byte [ecx], al
mov al, byte [esi]
add ecx, 1
test al, al
jne 0x404440
jmp 0x404468
mov byte [ecx], al
add ecx, 1
cmp byte [esi], 0
je 0x404468
mov al, byte [esi + 1]
add esi, 1
test al, al
jne 0x404427
mov byte [ecx], 0
mov al, byte [esi]
mov dword [esp + edi*4 + 0x40], edx
add ecx, 1
add edi, 1
test al, al
je 0x404496
jmp 0x404480
cmp al, 0x20
jne 0x404490
mov al, byte [esi + 1]
add esi, 1
test al, al
jne 0x404480
jmp 0x404496
mov al, byte [esi]
test al, al
jne 0x404420
mov dword [esp + edi*4 + 0x40], 0
mov eax, dword [esp + 0x40]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4044a5
sub eax, edx
jne 0x4044d1
push 0xff
lea eax, [esp + 0x344]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x340]
mov dword [esp + 0x40], ecx
call fcn.00404d00
test eax, eax
mov dword [0x416b90], eax
jne 0x4044fc
push 0x10
push str.Ghostscript
push str.Cant_create_text_window
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
jmp 0x40473e
push 0x32
push ebx
call dword [sym.imp.USER32.dll_LoadIconA]
mov edx, dword [0x416b90]
push eax
push edx
call fcn.00406310
call fcn.004042a0
mov eax, dword [0x416b90]
push 0x50
push 0x50
push eax
call fcn.004049c0
mov ecx, dword [0x416b90]
push str.__run_r
push 0x412808
push ecx
call fcn.00404bd0
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x264]
push eax
push str.Text
call fcn.00406670
add esp, 0x2c
test eax, eax
jne 0x4045ab
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x10]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x250]
push str._d__d__d__d
push edx
call fcn.00406cc0
add esp, 0x18
cmp eax, 4
jne 0x4045ab
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [0x416b90]
push edx
push eax
push ecx
call fcn.00404c90
add esp, 0x14
mov edx, dword [esp + 0x454]
mov eax, dword [0x416b90]
push edx
push str.Ghostscript
push eax
call fcn.00404e40
add esp, 0xc
test eax, eax
je 0x4045d1
push 1
call fcn.00407476
mov ecx, dword [0x416b90]
push ebp
push ecx
call fcn.00406300
push eax
mov dword [0x416b98], eax
call fcn.00401470
lea edx, [esp + 0x4c]
push edx
push edi
call fcn.00403f90
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4046c2
mov eax, dword [0x416b90]
cmp dword [eax + 0x34], 0
jne 0x4046c7
push str._nClose_this_window_with_the_close_button_on_the_title_bar_or_the_system_menu._n
push eax
call fcn.004052a0
mov eax, dword [0x416b90]
push eax
call fcn.00406300
add esp, 0xc
push eax
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x40464c
mov ecx, dword [0x416b90]
push 1
push ecx
call fcn.00406300
add esp, 4
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov edx, dword [0x416b90]
push edx
call fcn.00406300
add esp, 4
push eax
call dword [sym.imp.USER32.dll_BringWindowToTop]
mov eax, dword [0x416b90]
push 1
push eax
call fcn.00406300
add esp, 4
push eax
call dword [sym.imp.USER32.dll_FlashWindow]
mov eax, dword [0x416b90]
cmp dword [eax + 0x34], 0
jne 0x4046c7
mov ebp, dword [sym.imp.USER32.dll_GetMessageA]
mov esi, dword [sym.imp.USER32.dll_TranslateMessage]
mov edi, dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
push 0
lea ecx, [esp + 0x34]
push ecx
call ebp
test eax, eax
je 0x4046c2
lea edx, [esp + 0x28]
push edx
call esi
lea eax, [esp + 0x28]
push eax
call edi
mov eax, dword [0x416b90]
cmp dword [eax + 0x34], 0
je 0x404696
jmp 0x4046c7
mov eax, dword [0x416b90]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x28]
push edx
push eax
call fcn.00404cc0
add esp, 0x14
test eax, eax
pop ebp
jne 0x404724
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push ecx
push edx
push eax
lea ecx, [esp + 0x250]
push str._d__d__d__d
push ecx
call fcn.00406984
lea edx, [esp + 0x258]
push edx
push str.Text
call fcn.00406780
add esp, 0x20
mov eax, dword [0x416b90]
push eax
call fcn.00404da0
add esp, 4
mov dword [0x416b90], 0
mov eax, ebx
mov ecx, dword [esp + 0x440]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00406a2d
add esp, 0x438
ret 0x10