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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x529e9c
mov eax, dword fs:[0]
push eax
sub esp, 0xa4
push ebx
push ebp
push esi
push edi
mov eax, dword [0x59c6b8]
xor eax, esp
push eax
lea eax, [esp + 0xb8]
mov dword fs:[0], eax
mov esi, ecx
mov eax, 0xd
mov dword [esp + 0x54], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x34], eax
mov eax, dword [esi + 8]
test eax, eax
js 0x4066da
mov edx, dword [esi + 0xc]
push 0
lea ecx, [esp + 0x58]
push ecx
mov ecx, dword [esi + 4]
push edx
push eax
call fcn.00478400
cmp dword [esp + 0x54], 7
jne 0x406a70
push 8
call fcn.00511699
add esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0xc0], 0
test eax, eax
je 0x4066e7
mov ecx, eax
call fcn.004a1c60
jmp 0x4066e9
mov dword [esp + 0x54], 5
jmp 0x406a70
xor eax, eax
mov ecx, dword [esp + 0x5c]
mov dword [esi + 0x28], eax
push 0
lea eax, [esp + 0x48]
push eax
push 0x531738
mov dword [esp + 0xcc], 0xffffffff
call fcn.00412200
mov eax, dword [eax]
mov ebp, 1
mov ebx, 2
cmp eax, ebp
je 0x406720
cmp eax, ebx
jne 0x406767
mov ecx, dword [esi]
mov eax, dword [ecx + 0x20]
push eax
lea ecx, [esp + 0x78]
call fcn.0044e8a0
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x48]
call fcn.0044e950
push 0x531960
mov edi, eax
call fcn.004a3170
mov ecx, dword [esp + 0x80]
add esp, 4
push edi
push eax
call fcn.00412270
mov ecx, dword [esi + 0x28]
push str._GS1_gs_n
call fcn.004a1e60
lea ecx, [esp + 0x44]
call fcn.0044ea50
mov ecx, dword [esi + 0x54]
lea eax, [esp + 0x2c]
push eax
push ecx
mov ecx, esi
call fcn.00405ee0
mov eax, dword [esi + 0x54]
mov ecx, dword [eax + 0x38]
push ecx
add eax, 0x18
push eax
mov ecx, esi
call fcn.00405fa0
mov ecx, dword [esp + 0x5c]
push 0
lea edx, [esp + 0x48]
push edx
push str.Vertices
call fcn.00412200
cmp dword [eax], 6
jne 0x406a47
mov ecx, dword [esp + 0x4c]
xor edi, edi
cmp dword [ecx + 0xc], ebp
jle 0x40687d
nop
lea eax, [esp + 0x34]
push eax
push edi
call fcn.00408350
mov eax, dword [eax]
cmp eax, ebp
je 0x4067d9
cmp eax, ebx
jne 0x406a3e
cmp dword [esp + 0x34], ebp
jne 0x4067e5
fild dword [esp + 0x3c]
jmp 0x4067e9
fld qword [esp + 0x3c]
lea ecx, [esp + 0x34]
fstp qword [esp + 0x24]
call fcn.0044ea50
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x50]
lea edx, [edi + 1]
push edx
call fcn.00408350
mov eax, dword [eax]
cmp eax, ebp
je 0x406816
cmp eax, ebx
jne 0x406a3e
cmp dword [esp + 0x34], ebp
jne 0x406822
fild dword [esp + 0x3c]
jmp 0x406826
fld qword [esp + 0x3c]
lea ecx, [esp + 0x34]
fstp qword [esp + 0x2c]
call fcn.0044ea50
fld qword [esp + 0x24]
fsub qword [esi + 0x30]
sub esp, 0x10
fld qword [esp + 0x3c]
fsub qword [esi + 0x38]
fstp qword [esp + 8]
fstp qword [esp]
test edi, edi
jne 0x40685a
mov eax, dword [esi + 0x28]
push 0x531438
push eax
jmp 0x406863
mov ecx, dword [esi + 0x28]
push str.0:.4f_1:.4f_l_n
push ecx
call fcn.004a2fb0
mov ecx, dword [esp + 0x64]
add edi, ebx
lea edx, [edi + 1]
add esp, 0x18
cmp edx, dword [ecx + 0xc]
jl 0x4067c0
mov ecx, dword [esi + 0x28]
push 0x53144c
call fcn.004a1e60
lea ecx, [esp + 0x44]
call fcn.0044ea50
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
push eax
lea ecx, [esp + 0x68]
call fcn.0044e8a0
mov eax, dword [esi + 0x28]
mov eax, dword [eax]
push str.Length
mov dword [esp + 0x48], ebp
mov dword [esp + 0x50], eax
call fcn.004a3170
add esp, 4
lea ecx, [esp + 0x44]
push ecx
mov ecx, dword [esp + 0x70]
push eax
call fcn.00412270
push str.Form
mov dword [esp + 0x48], 4
call fcn.004a3170
push str.Subtype
mov dword [esp + 0x54], eax
call fcn.004a3170
mov ecx, dword [esp + 0x74]
add esp, 8
lea edx, [esp + 0x44]
push edx
push eax
call fcn.00412270
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
push eax
lea ecx, [esp + 0x48]
call fcn.0044e830
fldz
lea ecx, [esp + 0x34]
fstp qword [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 0x38], ebx
call fcn.004082f0
fldz
mov ecx, dword [esp + 0x4c]
fstp qword [esp + 0x3c]
lea edx, [esp + 0x34]
push edx
mov dword [esp + 0x38], ebx
call fcn.004082f0
fld qword [esi + 0x40]
fsub qword [esi + 0x30]
mov ecx, dword [esp + 0x4c]
lea eax, [esp + 0x34]
push eax
fstp qword [esp + 0x40]
mov dword [esp + 0x38], ebx
call fcn.004082f0
fld qword [esi + 0x48]
fsub qword [esi + 0x38]
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x50]
fstp qword [esp + 0x40]
mov dword [esp + 0x38], ebx
call fcn.004082f0
push str.BBox
call fcn.004a3170
mov ecx, dword [esp + 0x70]
add esp, 4
lea edx, [esp + 0x44]
push edx
push eax
call fcn.00412270
cmp dword [esp + 0x74], 7
jne 0x406a09
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
push eax
lea ecx, [esp + 0x48]
call fcn.0044e8a0
mov ecx, dword [esi]
mov eax, dword [ecx + 0x20]
push eax
lea ecx, [esp + 0x38]
call fcn.0044e8a0
push 0x531944
call fcn.004a3170
mov ecx, dword [esp + 0x40]
add esp, 4
lea edx, [esp + 0x74]
push edx
push eax
call fcn.00412270
push str.ExtGState
call fcn.004a3170
add esp, 4
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x50]
push eax
call fcn.00412270
push 0x531460
call fcn.004a3170
mov ecx, dword [esp + 0x70]
add esp, 4
lea edx, [esp + 0x44]
push edx
push eax
call fcn.00412270
push 0x30
call fcn.00511699
add esp, 4
mov dword [esp + 0x24], eax
mov dword [esp + 0xc0], ebp
test eax, eax
je 0x406a52
mov edx, dword [esi + 0x28]
mov edi, dword [edx]
mov edx, dword [edx + 4]
lea ecx, [esp + 0x64]
push ecx
push edi
push 0
push edx
mov ecx, eax
call fcn.0046b1e0
mov edi, eax
jmp 0x406a54
lea ecx, [esp + 0x34]
call fcn.0044ea50
lea ecx, [esp + 0x44]
call fcn.0044ea50
jmp 0x406a70
xor edi, edi
lea ecx, [esi + 0x18]
mov dword [esp + 0xc0], 0xffffffff
call fcn.0044ea50
push edi
lea ecx, [esi + 0x18]
call fcn.0044e930
lea ecx, [esp + 0x54]
call fcn.0044ea50
mov ecx, dword [esp + 0xb8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret