Function at 0x4018f0
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x418
mov eax, dword [0x4133d8]
xor eax, esp
mov dword [esp + 0x414], eax
push ebx
mov ebx, dword [esp + 0x420]
cmp dword [ebx], 0
push ebp
mov ebp, dword [esp + 0x428]
je 0x401932
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x414]
xor ecx, esp
call fcn.00405e15
add esp, 0x418
ret
push 0x400
lea eax, [esp + 0x20]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x1c]
push 0x5c
push ecx
call fcn.004064f0
add esp, 8
test eax, eax
je 0x401963
add eax, 1
jmp 0x401967
lea eax, [esp + 0x1c]
mov byte [eax], 0
mov eax, str.gsdll32.dll
mov edx, eax
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x401971
push esi
push edi
lea edi, [esp + 0x24]
sub eax, edx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x401985
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
lea edx, [esp + 0x24]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edx
call esi
cmp eax, 0x20
mov dword [ebx], eax
jae 0x401a31
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x28]
push ecx
push str.GS_DLL
mov dword [esp + 0x1c], 0x400
call fcn.00401dd0
add esp, 0xc
test eax, eax
jne 0x4019df
lea edx, [esp + 0x24]
push edx
call esi
mov dword [ebx], eax
cmp dword [ebx], 0x20
jae 0x401a31
push str.gsdll32.dll
call esi
cmp eax, 0x20
mov dword [ebx], eax
jae 0x401a31
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x28]
push str.Cant_load_DLL__LoadLibrary_error_code__ld
push eax
call fcn.00405885
mov ecx, dword [esp + 0x440]
add ecx, 0xffffffff
push ecx
lea edx, [esp + 0x34]
push edx
push ebp
call fcn.004063c0
add esp, 0x18
mov dword [ebx], 0
mov eax, 1
jmp 0x401d01
mov eax, dword [ebx]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.gsapi_revision
push eax
call esi
test eax, eax
mov dword [ebx + 4], eax
jne 0x401a71
mov ecx, dword [esp + 0x434]
add ecx, 0xffffffff
push ecx
push str.Cant_find_gsapi_revision_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
push 0x10
lea edx, [esp + 0x18]
push edx
call eax
test eax, eax
je 0x401ab6
lea eax, [esp + 0x24]
push str.Unable_to_identify_Ghostscript_DLL_revision___it_must_be_newer_than_needed._n
push eax
call fcn.00405885
mov ecx, dword [esp + 0x43c]
add ecx, 0xffffffff
push ecx
lea edx, [esp + 0x30]
push edx
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x18
mov eax, 1
jmp 0x401d01
mov eax, dword [esp + 0x1c]
mov ecx, dword [0x410758]
cmp eax, ecx
je 0x401afe
push ecx
push eax
lea eax, [esp + 0x2c]
push str.Wrong_version_of_DLL_found._n__Found_version__ld_n__Need_version___ld_n
push eax
call fcn.00405885
mov ecx, dword [esp + 0x444]
add ecx, 0xffffffff
push ecx
lea edx, [esp + 0x38]
push edx
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x20
mov eax, 1
jmp 0x401d01
mov eax, dword [ebx]
push str.gsapi_new_instance
push eax
call esi
test eax, eax
mov dword [ebx + 8], eax
jne 0x401b38
mov ecx, dword [esp + 0x434]
add ecx, 0xffffffff
push ecx
push str.Cant_find_gsapi_new_instance_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov edx, dword [ebx]
push str.gsapi_delete_instance
push edx
call esi
test eax, eax
mov dword [ebx + 0xc], eax
jne 0x401b72
mov eax, dword [esp + 0x434]
add eax, 0xffffffff
push eax
push str.Cant_find_gsapi_delete_instance_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov ecx, dword [ebx]
push str.gsapi_set_stdio
push ecx
call esi
test eax, eax
mov dword [ebx + 0x10], eax
jne 0x401bac
mov edx, dword [esp + 0x434]
add edx, 0xffffffff
push edx
push str.Cant_find_gsapi_set_stdio_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov eax, dword [ebx]
push str.gsapi_set_poll
push eax
call esi
test eax, eax
mov dword [ebx + 0x14], eax
jne 0x401be6
mov ecx, dword [esp + 0x434]
add ecx, 0xffffffff
push ecx
push str.Cant_find_gsapi_set_poll_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov edx, dword [ebx]
push str.gsapi_set_display_callback
push edx
call esi
test eax, eax
mov dword [ebx + 0x18], eax
jne 0x401c20
mov eax, dword [esp + 0x434]
add eax, 0xffffffff
push eax
push str.Cant_find_gsapi_set_display_callback_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov ecx, dword [ebx]
push str.gsapi_init_with_args
push ecx
call esi
test eax, eax
mov dword [ebx + 0x1c], eax
jne 0x401c5a
mov edx, dword [esp + 0x434]
add edx, 0xffffffff
push edx
push str.Cant_find_gsapi_init_with_args_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov eax, dword [ebx]
push str.gsapi_run_string
push eax
call esi
test eax, eax
mov dword [ebx + 0x20], eax
jne 0x401c91
mov ecx, dword [esp + 0x434]
add ecx, 0xffffffff
push ecx
push str.Cant_find_gsapi_run_string_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov edx, dword [ebx]
push str.gsapi_exit
push edx
call esi
test eax, eax
mov dword [ebx + 0x24], eax
jne 0x401cc8
mov eax, dword [esp + 0x434]
add eax, 0xffffffff
push eax
push str.Cant_find_gsapi_exit_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
mov ecx, dword [ebx]
push str.gsapi_set_visual_tracer
push ecx
call esi
test eax, eax
mov dword [ebx + 0x28], eax
jne 0x401cff
mov edx, dword [esp + 0x434]
add edx, 0xffffffff
push edx
push str.Cant_find_gsapi_set_visual_tracer_n
push ebp
call fcn.004063c0
push ebx
call fcn.004018b0
add esp, 0x10
mov eax, 1
jmp 0x401d01
xor eax, eax
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00405e15
add esp, 0x418
ret