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

Disassembly:
sub esp, 0x58
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x18], ecx
mov ecx, dword [eax + 0x1ec]
push ebp
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x70]
mov edx, dword [ecx]
push esi
push edi
call dword [edx + 0x18]
mov ecx, dword [0x10066ad4]
mov ebp, eax
mov eax, 0xaaaaaaab
mul dword [ebp + 4]
mov eax, dword [esp + 0x74]
mov esi, edx
xor edi, edi
shr esi, 1
push eax
xor dl, dl
mov dword [esp + 0x64], ebp
mov dword [esp + 0x18], edi
mov dword [esp + 0x40], esi
call dword [sym.imp.rlmfc.dll_public:_static_void____fastcall_R_Memory::set_void___char__unsigned_int_]
mov eax, dword [esp + 0x70]
test eax, eax
jle 0x1003ba08
mov edx, dword [esp + 0x6c]
push ebx
lea ecx, [esi + esi*2]
lea ebx, [edx + 4]
mov dword [esp + 0x44], ecx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x50], eax
mov eax, dword [0x10066ad0]
mov ecx, dword [ebx - 4]
mov edx, dword [ebx + 4]
mov edx, dword [eax + edx*4]
and edx, dword [eax + ecx*4]
mov esi, dword [ebx]
and edx, dword [eax + esi*4]
test edx, 0xfc3f
jne 0x1003b9ed
mov dword [0x1006683c], ecx
mov ecx, dword [ebx]
mov dword [0x10066840], ecx
mov edx, dword [ebx + 4]
mov dword [0x10066844], edx
mov ecx, dword [ebx + 4]
mov esi, dword [eax + ecx*4]
mov edx, dword [ebx - 4]
or esi, dword [eax + edx*4]
mov ecx, dword [ebx]
or esi, dword [eax + ecx*4]
mov edx, dword [esp + 0x6c]
mov al, byte [edx + 0x1f4]
test al, al
mov edi, 3
mov dword [esp + 0x70], 0x1006683c
je 0x1003b67a
test esi, 0xffc3
je 0x1003b932
and esi, 0xfffffc3f
test esi, esi
je 0x1003b932
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x28]
and eax, 0xffffff00
push 1
add eax, 0x200
push eax
call fcn.10036ac0
mov edx, dword [sym.e2mfc.dll_int_P_Statistics::m_clippedPolygons]
mov ecx, dword [esp + 0x54]
inc edx
lea eax, [ecx - 1]
mov dword [sym.e2mfc.dll_int_P_Statistics::m_clippedPolygons], edx
mov edx, 1
mov ecx, eax
shl edx, cl
test eax, eax
mov dword [esp + 0x34], 0x100667f0
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], edx
jl 0x1003b932
mov ecx, dword [esp + 0x6c]
mov ebx, eax
shl ebx, 4
lea ebx, [ebx + ecx + 0xac]
lea ecx, [ecx + eax*4 + 0x1ac]
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x1c], ecx
and esi, 0xfffffc3f
test esi, edx
je 0x1003b906
mov ebx, dword [sym.e2mfc.dll_int_P_Statistics::m_clippedPlanes]
mov ecx, dword [0x10066ad0]
xor eax, eax
inc ebx
mov dword [sym.e2mfc.dll_int_P_Statistics::m_clippedPlanes], ebx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x70]
mov eax, dword [eax + edi*4 - 4]
mov ecx, dword [ecx + eax*4]
mov ebx, ecx
and ebx, edx
test edi, edi
jle 0x1003b8e6
mov ebp, dword [esp + 0x78]
mov esi, dword [esp + 0x34]
lea edx, [ebp*4]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x70]
shl ebp, 4
mov dword [esp + 0x14], esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x4c], edi
mov edx, dword [esp + 0x30]
mov edx, dword [edx]
mov edi, dword [0x10066ad0]
mov edi, dword [edi + edx*4]
mov dword [esp + 0x60], edi
and edi, dword [esp + 0x3c]
test ebx, ebx
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], edi
jne 0x1003b7a8
test edi, edi
jne 0x1003ba22
mov ebx, dword [esp + 0x74]
or ebx, ecx
mov ecx, dword [esp + 0x7c]
inc ecx
mov dword [esi], eax
add esi, 4
mov dword [esp + 0x74], ebx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x14], esi
jmp 0x1003b8bc
test edi, edi
jne 0x1003b8bc
mov esi, dword [esp + 0x78]
mov edi, dword [esp + 0x10]
mov ecx, esi
inc ecx
mov dword [esp + 0x78], ecx
mov ebx, ebp
mov ecx, edi
add ebp, 0x10
add ecx, 4
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
push ecx
mov ecx, dword [esp + 0x24]
push ecx
push eax
push edx
mov ecx, dword [esp + 0x38]
push esi
call fcn.1003afb0
mov edx, dword [sym.e2mfc.dll_int_P_Statistics::m_clipperProducedVertices]
mov eax, dword [esp + 0x38]
inc edx
test eax, eax
mov dword [sym.e2mfc.dll_int_P_Statistics::m_clipperProducedVertices], edx
mov edx, dword [0x10066ad0]
mov dword [edi + edx], 0
mov edx, 1
jle 0x1003b889
mov ecx, dword [esp + 0x6c]
add ecx, 0x1ac
mov dword [esp + 0x2c], ecx
mov ecx, dword [esp + 0x6c]
add ecx, 0xb4
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x6c]
test dword [eax + 0x1f0], edx
je 0x1003b874
mov eax, dword [0x10066ab8]
fld dword [ecx + 4]
fmul dword [ebx + eax + 0xc]
fld dword [ecx - 4]
fmul dword [ebx + eax + 4]
faddp st(1)
fld dword [ecx - 8]
fmul dword [ebx + eax]
faddp st(1)
fld dword [ebx + eax + 8]
mov eax, dword [esp + 0x2c]
fmul dword [ecx]
faddp st(1)
fadd dword [eax]
fcomp dword [0x100491f4]
fnstsw ax
test ah, 0x41
jne 0x1003b874
mov eax, dword [0x10066ad0]
or dword [edi + eax], edx
add dword [esp + 0x2c], 4
mov eax, dword [esp + 0x48]
add edx, edx
add ecx, 0x10
dec eax
mov dword [esp + 0x48], eax
jne 0x1003b828
mov ecx, dword [0x10066ad0]
mov edx, dword [edi + ecx]
mov edi, dword [esp + 0x74]
mov eax, dword [esp + 0x14]
or edi, edx
mov edx, dword [esp + 0x7c]
inc edx
mov dword [eax], esi
add eax, 4
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x5c]
mov dword [esp + 0x7c], edx
mov edx, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov esi, eax
mov ecx, dword [esp + 0x60]
mov ebx, edi
mov edi, dword [esp + 0x30]
mov eax, edx
mov edx, dword [esp + 0x4c]
add edi, 4
dec edx
mov dword [esp + 0x30], edi
mov dword [esp + 0x4c], edx
jne 0x1003b75c
mov ebp, dword [esp + 0x64]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x34]
mov edi, dword [esp + 0x7c]
mov esi, dword [esp + 0x74]
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x70], ecx
sub dword [esp + 0x1c], 4
mov ecx, dword [esp + 0x20]
dec eax
sub ecx, 0x10
shr edx, 1
test eax, eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x3c], edx
jge 0x1003b6f4
cmp edi, 3
jl 0x1003b9ed
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
lea eax, [edi + edx - 2]
cmp eax, ecx
jle 0x1003b975
mov edx, dword [esp + 0x44]
mov esi, ecx
add edx, 0xc0
add esi, 0x40
mov ecx, ebp
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], edx
call sym.e2mfc.dll_public:_void___thiscall_P_Buffer::unlock_void_
mov ecx, dword [esp + 0x44]
push 1
push ecx
mov ecx, ebp
call sym.e2mfc.dll_public:_void___thiscall_P_Buffer::reallocate_unsigned_int__bool_
mov ecx, ebp
call sym.e2mfc.dll_public:_void___thiscall_P_Buffer::lock_void_
test edi, edi
jle 0x1003b991
mov eax, dword [esp + 0x70]
mov ecx, edi
mov edx, dword [eax]
mov esi, dword [0x10066ad4]
add eax, 4
dec ecx
mov byte [edx + esi], 1
jne 0x1003b97f
add edi, 0xfffffffe
test edi, edi
jle 0x1003b9ed
mov eax, dword [esp + 0x70]
mov esi, dword [esp + 0x18]
lea ebx, [eax + 8]
mov eax, dword [esp + 0x18]
add eax, edi
lea esi, [esi + esi*2 + 2]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x70]
mov ecx, dword [eax]
mov edx, dword [ebp]
push ecx
lea eax, [esi - 2]
push eax
mov ecx, ebp
call dword [edx + 0x28]
mov eax, dword [ebx - 4]
mov edx, dword [ebp]
push eax
lea ecx, [esi - 1]
push ecx
mov ecx, ebp
call dword [edx + 0x28]
mov eax, dword [ebx]
mov edx, dword [ebp]
push eax
push esi
mov ecx, ebp
call dword [edx + 0x28]
add ebx, 4
add esi, 3
dec edi
jne 0x1003b9b1
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x50]
add ebx, 0xc
dec eax
mov dword [esp + 0x24], ebx
mov dword [esp + 0x50], eax
jne 0x1003b603
mov edi, dword [esp + 0x18]
pop ebx
lea ecx, [edi + edi*2]
push ecx
mov ecx, ebp
call sym.e2mfc.dll_protected:_void___thiscall_P_ObjectContainer::setFirstChild_class_P_BaseObject__
test edi, edi
pop edi
pop esi
pop ebp
jne 0x1003ba6e
xor eax, eax
add esp, 0x58
ret 0x14
mov edi, dword [esp + 0x74]
mov ebx, dword [esp + 0x7c]
or edi, ecx
mov dword [esi], eax
add esi, 4
mov dword [esp + 0x14], esi
mov esi, dword [esp + 0x78]
inc ebx
mov ecx, esi
inc ecx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x74], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x7c], ebx
mov ebx, ebp
mov ecx, edi
add ebp, 0x10
add ecx, 4
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x1c]
mov ecx, dword [ecx]
push ecx
mov ecx, dword [esp + 0x24]
push ecx
push edx
push eax
jmp 0x1003b7db
mov eax, dword [esp + 0x68]
add esp, 0x58
ret 0x14