Function at 0x40e778
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push esi
sub esp, 0x8c
mov eax, dword [eax]
cmp eax, 1
je 0x40e89e
cmp eax, 2
jne 0x40e881
mov dword [esp + 0x60], 0
lea edx, [esp + 0x60]
lea eax, [esp]
mov dword [esp], 6
mov dword [esp + 4], str.ENDSEC
push 0x4c8ab8
push eax
push 0x4af7b0
push 0x384ff00
push 0x14
push edx
call fcn.00416ff4
lea ecx, [esp + 0x78]
lea edx, [esp + 0x28]
xor eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x28], eax
push 0x4c8ac4
push edx
push 0x4af7b8
push 0x384ff00
push 0x14
push ecx
call fcn.00416ff4
mov dword [esp + 0x90], 0
lea edx, [esp + 0x90]
lea eax, [esp + 0x38]
mov dword [esp + 0x38], 3
mov dword [esp + 0x3c], 0x4b1624
push 0x4c8ad8
push eax
push 0x4af7c0
push 0x384ff00
push 0x14
push edx
call fcn.00416ff4
mov dword [esp + 0xa8], 0
lea eax, [esp + 0xa8]
push 0x384ff00
push 0x14
push eax
call fcn.00428ffc
lea edx, [esp + 0xb4]
xor eax, eax
mov dword [esp + 0xb4], eax
push eax
push 0x4af7c8
push 0x384ff00
push 0x14
push edx
call fcn.00429ffc
add esp, 0x68
jmp 0x40ea41
xor eax, eax
push eax
push eax
push 0x384ff00
push 0x19
push str._Open_or_End_CAD__error__
call fcn.0042a614
add esp, 0x14
jmp 0x40ea41
mov esi, ecx
test ecx, ecx
jle 0x40e8b1
movzx eax, byte [ecx + edx - 1]
add ecx, 0xffffffff
cmp eax, 0x20
je 0x40e89e
test esi, esi
jle 0x40e8db
mov dword [esp + 0x54], edi
xor eax, eax
mov ecx, 1
movzx edi, byte [ecx + edx - 1]
cmp edi, 0x2e
jne 0x40e8cc
mov eax, ecx
add ecx, 1
cmp ecx, esi
jle 0x40e8c0
mov edi, dword [esp + 0x54]
test eax, eax
jne 0x40e8de
lea eax, [esi + 1]
mov dword [esp + 0x18], str..dxf
mov dword [esp + 8], edx
add eax, 0xffffffff
mov dword [esp + 0x20], 4
lea esi, [esp + 8]
jns 0x40e900
mov eax, 0
xor ecx, ecx
cdq
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x14], edx
push ecx
push 0x50
push 0x3724760
push ecx
push 2
push esi
call fcn.00416bd4
mov dword [esp + 0x78], 0
lea edx, [esp + 0x78]
lea eax, [esp + 0x60]
mov dword [esp + 0x60], 0x50
mov dword [esp + 0x64], 0x3724760
mov dword [esp + 0x68], 4
push eax
push 0x4af7d0
push 0x384ff00
push 0x14
push edx
call fcn.0041da04
mov dword [esp + 0x8c], 0
lea edx, [esp + 0x8c]
lea eax, [esp + 0x64]
mov dword [esp + 0x64], 0xe
mov dword [esp + 0x68], str.d:plot9033dd
mov dword [esp + 0x6c], 3
mov dword [esp + 0x70], 0x4b1640
push eax
push 0x4af7e0
push 0x384ff01
push 0xc
push edx
call fcn.0041da04
add esp, 0x40
test eax, eax
jle 0x40ea4c
mov dword [esp + 0x60], 0
lea edx, [esp + 0x60]
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 4
mov dword [esp + 0x2c], str.33dd
mov dword [esp + 0x30], 3
mov dword [esp + 0x34], 0x4b164c
push eax
push 0x4af7f0
push 0x384ff01
push 0xc
push edx
call fcn.0041da04
add esp, 0x14
test eax, eax
jle 0x40ea4c
mov dword [esp + 0x60], 0
lea edx, [esp + 0x60]
lea eax, [esp]
mov dword [esp], 0x1d
mov dword [esp + 4], str._Can_not_open_33DD_file_.....
push eax
push 0x4af800
push 0x384ff00
push 0xffffffffffffffff
push edx
call fcn.00423530
xor eax, eax
push eax
push eax
push 0x384ff00
push eax
push 0x4b1670
call fcn.0042a614
add esp, 0x28
add esp, 0x8c
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esp + 0x60], 0
lea edx, [esp + 0x60]
lea eax, [esp + 0x58]
mov dword [esp + 0x58], 0x50
mov dword [esp + 0x5c], 0x3724760
push 0x4c8aa0
push eax
push 0x4af808
push 0x384ff02
push 0xc
push edx
call fcn.0041a518
add esp, 0x18
cmp eax, 0xffffffff
je 0x40eae9
mov edx, 0x50
mov eax, edx
test edx, edx
jle 0x40eaa6
movzx ecx, byte [edx + 0x372475f]
add edx, 0xffffffff
cmp ecx, 0x20
je 0x40ea91
mov dword [esp + 0x60], 0
lea edx, [esp + 0x60]
test eax, eax
jge 0x40eabb
mov eax, 0
mov dword [esp], eax
mov dword [esp + 4], 0x3724760
lea eax, [esp]
push 0x4c8aac
push eax
push 0x4af810
push 0x384ff00
push 0x14
push edx
call fcn.00416ff4
add esp, 0x18
jmp 0x40ea4c
lea edx, [esp + 0x60]
xor eax, eax
mov dword [esp + 0x60], eax
push eax
push 0x4af818
push 0x384ff00
push 0xc
push edx
call fcn.00429ffc
add esp, 0x14
jmp 0x40ea41