Function at 0x403820
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x5ec77a
mov eax, dword fs:[0]
push eax
sub esp, 0x128
push ebx
push esi
push edi
mov eax, dword [0x615cbc]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
lea eax, [esp + 0x58]
push eax
call fcn.00423990
mov eax, dword [esp + 0x58]
mov edi, 0xa
cmp eax, edi
mov esi, eax
mov dword [esp + 0x4c], esi
jge 0x4038b2
mov esi, dword [sym.imp.MSVCR90.dll_printf]
push 0x5fa5f4
call esi
push str.Invalid_surf_ident_range_
push str._ERROR_:__s_n
call esi
push str.init_wnc_mesh0.cpp
push str.__FILE_:__s_n
call esi
push 0x151
push str.__LINE_:__d_n
call esi
push 0x5fa5f4
call esi
add esp, 0x20
push 1
call dword [sym.imp.MSVCR90.dll_exit]
xor ebx, ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x84], ebx
push eax
push edi
lea ecx, [esp + 0x7c]
mov dword [esp + 0x148], ebx
call fcn.004137d0
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
push 1
lea ecx, [esp + 0xb0]
mov byte [esp + 0x144], 2
call fcn.004120b0
add esi, 0xfffffff7
push esi
lea ecx, [esp + 0xb0]
mov byte [esp + 0x144], 3
call fcn.00412120
fld qword [ebp + 0xc]
sub esp, 8
fstp qword [esp]
push esi
push str._Tesselate__d_surfaces__tol___.4lf_..._n
call dword [sym.imp.MSVCR90.dll_printf]
add esp, 0x10
push esi
lea ecx, [esp + 0x64]
call fcn.00403fd0
cmp dword [esp + 0x4c], edi
mov dword [esp + 0x48], edi
jl 0x403b80
lea ecx, [esp + 0x60]
call fcn.00404030
push edi
lea ecx, [esp + 0x78]
call fcn.004145e0
test eax, eax
jne 0x403c70
fld qword [ebp + 0xc]
sub esp, 8
fstp qword [esp]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x40]
push edx
push edi
lea ecx, [esp + 0x88]
call fcn.00414620
cmp eax, ebx
jne 0x403b71
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x38]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 3
jb 0x403b71
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x28]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
cmp ecx, 1
jb 0x403b71
push 0x58
call sub.MSVCR90.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x44], eax
mov byte [esp + 0x140], 4
cmp eax, ebx
je 0x4039fb
mov ecx, eax
call fcn.004126f0
jmp 0x4039fd
xor eax, eax
push eax
lea ecx, [esp + 0xb0]
mov byte [esp + 0x144], 3
call fcn.00412570
lea ecx, [esp + 0xac]
call fcn.00411c70
dec eax
push eax
lea ecx, [esp + 0xb0]
call fcn.00411c80
mov esi, eax
push edi
mov ecx, esi
mov dword [esp + 0x48], esi
call fcn.00411b10
mov ecx, esi
call fcn.00411b00
mov ecx, dword [esp + 0x3c]
sub ecx, dword [esp + 0x38]
mov edi, eax
mov eax, 0x2aaaaaab
imul ecx
xor ecx, ecx
sub esp, 0x18
mov eax, esp
mov dword [eax], ecx
sar edx, 2
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov esi, edx
mov dword [eax + 0xc], ecx
shr esi, 0x1f
mov dword [eax + 0x10], ecx
add esi, edx
mov dword [eax + 0x14], ecx
push esi
mov ecx, edi
call fcn.00402e70
mov esi, dword [edi + 4]
mov ecx, dword [edi + 8]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x403add
xor ecx, ecx
lea esp, [esp]
mov eax, dword [esp + 0x38]
fld qword [ecx + eax + 0x10]
inc ebx
fld qword [ecx + eax + 8]
add ecx, 0x18
fld qword [ecx + eax - 0x18]
mov eax, 0x2aaaaaab
fstp qword [ecx + esi - 0x18]
fstp qword [ecx + esi - 0x10]
fstp qword [ecx + esi - 8]
mov esi, dword [edi + 4]
mov edx, dword [edi + 8]
sub edx, esi
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jb 0x403aa0
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x28]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
add edi, 0x10
push ecx
mov ecx, edi
call fcn.00403090
mov esi, dword [edi + 4]
mov ecx, dword [edi + 8]
sub ecx, esi
mov eax, 0x2aaaaaab
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
xor ebx, ebx
add eax, edx
je 0x403b62
xor ecx, ecx
mov edi, edi
mov eax, dword [esp + 0x28]
mov edx, dword [ecx + eax + 8]
mov dword [esp + 0x54], edx
mov edx, dword [ecx + eax + 4]
mov eax, dword [ecx + eax]
mov dword [ecx + esi], eax
mov eax, dword [esp + 0x54]
mov dword [ecx + esi + 8], eax
mov dword [ecx + esi + 4], edx
mov esi, dword [edi + 4]
mov edx, dword [edi + 8]
sub edx, esi
mov eax, 0x2aaaaaab
imul edx
sar edx, 1
mov eax, edx
shr eax, 0x1f
inc ebx
add eax, edx
add ecx, 0xc
cmp ebx, eax
jb 0x403b20
mov ecx, dword [esp + 0x44]
call fcn.00411c90
mov edi, dword [esp + 0x48]
xor ebx, ebx
inc edi
cmp edi, dword [esp + 0x4c]
mov dword [esp + 0x48], edi
jle 0x403952
lea ecx, [esp + 0x60]
call fcn.00404150
mov esi, dword [sym.imp.MSVCR90.dll_printf]
push 0x5fa4f4
call esi
push str._Write_WNC_Mesh..._n
call esi
mov edi, dword [sym.imp.MSVCR90.dll_clock]
call edi
mov ecx, dword [ebp + 8]
push ecx
lea edx, [esp + 0xb8]
push edx
mov dword [esp + 0x6c], eax
call fcn.00401580
call edi
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0x70]
push ecx
call fcn.00404060
push 0x5fa4f4
call esi
mov edi, dword [ebp + 0x14]
add esp, 0x1c
cmp edi, ebx
je 0x403bf8
push edi
lea ecx, [esp + 0xb0]
call fcn.00411cb0
push edi
push str._Output_:__s_n
call esi
add esp, 8
lea ecx, [esp + 0xac]
mov byte [esp + 0x140], 2
call fcn.004125d0
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x403c1d
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x38]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
cmp eax, ebx
je 0x403c3a
push eax
call sub.MSVCR90.dll_void___cdecl_operator_delete_void__
add esp, 4
lea ecx, [esp + 0x74]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x140], 0xffffffff
call fcn.00412e70
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.MSVCR90.dll_printf]
push 0x5fa5f4
call esi
push str.Error_in_WNC_Model::computeTrimmedSurface__
push str._ERROR_:__s_n
call esi
push str.init_wnc_mesh0.cpp
push str.__FILE_:__s_n
call esi
push 0x16a
jmp 0x403899