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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov al, byte [ebp + 0xc]
push ebx
push esi
push edi
test al, al
lea eax, [esp + 0x6c]
push eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
push str.model
mov dword [esp + 0x20], 0
push ecx
je 0x407b5f
lea edx, [esp + 0x54]
push edx
mov dword [esp + 0x28], 1
call fcn.0040df70
jmp 0x407b71
lea edx, [esp + 0x4c]
push edx
mov dword [esp + 0x28], 2
call fcn.0040e1d0
add esp, 0x10
push eax
lea ecx, [esp + 0x18]
call fcn.0040d000
test byte [esp + 0x18], 2
je 0x407b99
mov eax, dword [esp + 0x18]
and eax, 0xfffffffd
lea ecx, [esp + 0x40]
mov dword [esp + 0x18], eax
call fcn.0040d5f0
test byte [esp + 0x18], 1
je 0x407ba9
lea ecx, [esp + 0x48]
call fcn.0040d5f0
mov eax, dword [esp + 0x6c]
test eax, eax
lea ecx, [esp + 0x14]
jne 0x4084a2
push 0
push str.environment
lea eax, [esp + 0x24]
push eax
call fcn.0040d600
push 0
push str.gravity
lea ecx, [esp + 0x24]
call fcn.0040d080
test eax, eax
je 0x408495
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fstp qword [ebx]
add esp, 4
push 0
push str.friction
lea ecx, [esp + 0x24]
call fcn.0040d080
test eax, eax
je 0x408495
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fstp qword [ebx + 8]
add esp, 4
push 0
push str.springyness
lea ecx, [esp + 0x24]
call fcn.0040d080
test eax, eax
je 0x408495
push eax
call dword [sym.imp.MSVCRT.dll_atof]
fstp qword [ebx + 0x10]
add esp, 4
push 0
push str.collisions
lea ecx, [esp + 0x38]
push ecx
lea ecx, [esp + 0x20]
call fcn.0040d600
lea edx, [ebx + 0x18]
push edx
lea eax, [esp + 0x34]
push str.surface_friction
push eax
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40848c
lea ecx, [ebx + 0x20]
push ecx
lea edx, [esp + 0x34]
push str.surface_reflection
push edx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40848c
push 0
push str.wave
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [ebx + 0x28]
push ecx
lea edx, [esp + 0x30]
push str.amplitude
push edx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x408483
lea eax, [ebx + 0x30]
push eax
lea ecx, [esp + 0x30]
push str.phase
push ecx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x408483
lea edx, [ebx + 0x38]
push edx
lea eax, [esp + 0x30]
push str.speed
push eax
call fcn.004027a0
add esp, 0xc
test al, al
je 0x408483
push 0
push str.settings
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [esp + 0x28]
call fcn.0040d110
test al, al
mov edi, dword [sym.imp.MSVCRT.dll__strcmpi]
jne 0x407dd2
fld qword [0x41a2a8]
push 0
fstp qword [ebx + 0x40]
push str.gravitydirection
fld qword [0x41a2b8]
lea ecx, [esp + 0x30]
fstp qword [ebx + 0x48]
mov byte [ebx + 0x50], 0
call fcn.0040d080
mov esi, eax
test esi, esi
je 0x407d7f
push str.down
push esi
call edi
add esp, 8
test eax, eax
jne 0x407d67
fld qword [0x41a370]
jmp 0x407d7c
push 0x41a430
push esi
call edi
add esp, 8
test eax, eax
jne 0x407d7f
fld qword [0x41a2b8]
fstp qword [ebx + 0x40]
push 0
push str.autoreverse
lea ecx, [esp + 0x30]
call fcn.0040d080
test eax, eax
je 0x407da6
push 0x41a420
push eax
call edi
add esp, 8
test eax, eax
jne 0x407da6
mov byte [ebx + 0x50], 1
push 0
push str.wavedirection
lea ecx, [esp + 0x30]
call fcn.0040d080
test eax, eax
je 0x407dd2
push str.reverse
push eax
call edi
add esp, 8
test eax, eax
jne 0x407dd2
fld qword [0x41a370]
fstp qword [ebx + 0x48]
mov byte [esp + 0x18], 0x80
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0xff
mov edx, dword [esp + 0x18]
mov byte [esp + 0x18], 0
mov byte [esp + 0x19], 0
mov byte [esp + 0x1a], 0
mov byte [esp + 0x1b], 0xff
mov eax, dword [esp + 0x18]
mov dword [ebx + 0xd8], eax
lea esi, [ebx + 0xd8]
mov al, 0x60
mov byte [esp + 0x19], al
mov byte [esp + 0x1a], al
mov al, 0xe0
mov byte [esp + 0x18], 0xff
mov byte [esp + 0x1b], 0xff
mov ecx, dword [esp + 0x18]
push 0
mov byte [esp + 0x1c], al
mov byte [esp + 0x1d], al
mov byte [esp + 0x1e], al
lea edi, [ebx + 0xdc]
mov dword [edi], edx
push str.colors
lea eax, [esp + 0x28]
mov dword [ebx + 0xd0], ecx
mov byte [esp + 0x23], 0xff
mov edx, dword [esp + 0x20]
push eax
lea ecx, [esp + 0x20]
mov dword [ebx + 0xd4], edx
call fcn.0040d600
lea ecx, [esp + 0x20]
call fcn.0040d110
test al, al
jne 0x407f42
push 0
mov eax, str.nodes
lea ecx, [esp + 0x24]
call fcn.00402870
push 0
mov edi, esi
mov eax, str.links
lea ecx, [esp + 0x28]
call fcn.00402870
push 0
lea edi, [ebx + 0xd0]
mov eax, str.triangles
lea ecx, [esp + 0x2c]
call fcn.00402870
add esp, 0xc
push 0
push str.fill
lea ecx, [esp + 0x28]
call fcn.0040d080
mov edi, eax
test edi, edi
je 0x407f42
push str.transparent
push edi
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x407ef5
mov byte [ebx + 0xd7], al
mov byte [ebx + 0xd6], al
mov byte [ebx + 0xd5], al
mov byte [ebx + 0xd4], al
jmp 0x407f42
mov eax, edi
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x407f00
sub eax, edx
cmp eax, 6
jne 0x407f42
push edi
call fcn.004027d0
lea ecx, [edi + 2]
push ecx
mov byte [ebx + 0xd4], al
call fcn.004027d0
add edi, 4
push edi
mov byte [ebx + 0xd5], al
call fcn.004027d0
add esp, 0xc
mov byte [ebx + 0xd6], al
mov byte [ebx + 0xd7], 0xff
push 0
push str.nodes
lea edx, [esp + 0x3c]
push edx
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [esp + 0x34]
call fcn.0040d110
test al, al
jne 0x4080c0
push 0x41a2f8
lea ecx, [esp + 0x38]
call fcn.0040d020
mov edi, eax
imul eax, eax, 0x98
add eax, 4
push eax
mov dword [ebx + 0x70], edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
test eax, eax
je 0x407fa9
push 0x402150
push edi
lea esi, [eax + 4]
push 0x98
push esi
mov dword [eax], edi
call fcn.004028f0
jmp 0x407fab
xor esi, esi
mov eax, dword [ebx + 0x70]
mov dword [ebx + 0x74], esi
xor esi, esi
test eax, eax
jle 0x4080c0
jmp 0x407fc0
push esi
push 0x41a2f8
lea ecx, [esp + 0x20]
push ecx
lea ecx, [esp + 0x40]
call fcn.0040d6a0
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x1c]
push 0x41a394
push eax
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40812d
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x1c]
push 0x41a390
push edx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40812d
lea eax, [esp + 0x48]
push eax
lea ecx, [esp + 0x1c]
push 0x41a3d8
push ecx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40812d
lea edx, [esp + 0x50]
push edx
lea eax, [esp + 0x1c]
push 0x41a3d4
push eax
call fcn.004027a0
add esp, 0xc
test al, al
je 0x40812d
push 0
push 0x41a3a8
lea ecx, [esp + 0x20]
call fcn.0040d080
test eax, eax
je 0x40812d
cmp byte [eax], 0
je 0x40812d
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
fld qword [esp + 0x54]
sub esp, 0x1c
fstp qword [esp + 0x18]
mov ecx, ebx
fld qword [esp + 0x68]
fstp qword [esp + 0x10]
fld qword [esp + 0x60]
fstp qword [esp + 8]
fld qword [esp + 0x78]
fstp qword [esp]
push eax
call fcn.00404b70
test al, al
je 0x40812d
lea ecx, [esp + 0x18]
call fcn.0040d5f0
mov eax, dword [ebx + 0x70]
inc esi
cmp esi, eax
jl 0x407fc0
push 0
push str.links
lea ecx, [esp + 0x2c]
push ecx
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [esp + 0x24]
call fcn.0040d110
test al, al
jne 0x4082c3
push str.spring
lea ecx, [esp + 0x28]
call fcn.0040d020
push str.muscle
lea ecx, [esp + 0x28]
mov esi, eax
call fcn.0040d020
mov edi, eax
add edi, esi
lea edx, [edi + edi*4]
shl edx, 3
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
test esi, esi
je 0x408136
push 0x4021a0
push edi
push 0x28
push esi
call fcn.004028f0
jmp 0x408138
lea ecx, [esp + 0x18]
jmp 0x408463
xor esi, esi
lea ecx, [esp + 0x24]
mov dword [ebx + 0x7c], esi
call fcn.0040d100
test eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x40], 0
jle 0x4082c3
jmp 0x408160
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x2c]
call fcn.0040d720
push 0
push 0x41a36c
lea ecx, [esp + 0x20]
call fcn.0040d080
test eax, eax
je 0x408447
cmp byte [eax], 0
je 0x408447
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
push 0
push 0x41a368
lea ecx, [esp + 0x20]
mov edi, eax
call fcn.0040d080
test eax, eax
je 0x408447
cmp byte [eax], 0
je 0x408447
inc eax
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
lea edx, [esp + 0x54]
push edx
mov esi, eax
lea eax, [esp + 0x20]
push str.restlength
push eax
call fcn.004027a0
add esp, 0x10
test al, al
je 0x408447
push str.spring
lea ecx, [esp + 0x1c]
call fcn.0040d0f0
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x40821c
fld qword [0x41a2a8]
sub esp, 0x18
fstp qword [esp + 0x10]
fld qword [0x41a2a8]
jmp 0x408289
push str.muscle
lea ecx, [esp + 0x1c]
call fcn.0040d0f0
push eax
call dword [sym.imp.MSVCRT.dll__strcmpi]
add esp, 8
test eax, eax
jne 0x408447
lea ecx, [esp + 0x60]
push ecx
lea edx, [esp + 0x1c]
push str.amplitude
push edx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x408447
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x1c]
push str.phase
push ecx
call fcn.004027a0
add esp, 0xc
test al, al
je 0x408447
fld qword [esp + 0x58]
sub esp, 0x18
fstp qword [esp + 0x10]
fld qword [esp + 0x78]
fstp qword [esp + 8]
mov ecx, ebx
fld qword [esp + 0x68]
fstp qword [esp]
push esi
push edi
call fcn.00404cf0
test al, al
je 0x408447
lea ecx, [esp + 0x18]
call fcn.0040d5f0
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x48]
inc eax
cmp eax, ecx
mov dword [esp + 0x40], eax
jl 0x408160
push 0
push str.drawings
lea edx, [esp + 0x44]
push edx
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [esp + 0x3c]
call fcn.0040d110
test al, al
jne 0x408334
lea ecx, [esp + 0x3c]
call fcn.0040d100
mov edi, eax
xor esi, esi
test edi, edi
jle 0x408334
push esi
lea eax, [esp + 0x44]
push eax
lea ecx, [esp + 0x44]
call fcn.0040d720
lea ecx, [esp + 0x40]
call fcn.0040d110
test al, al
jne 0x408326
lea ecx, [ebx + 0xb4]
push ecx
lea edx, [esp + 0x44]
push edx
call fcn.00407730
add esp, 8
lea ecx, [esp + 0x40]
call fcn.0040d5f0
inc esi
cmp esi, edi
jl 0x4082f6
push 0
push str.triangles
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x20]
call fcn.0040d600
lea ecx, [esp + 0x38]
call fcn.0040d110
test al, al
jne 0x4083b8
lea ecx, [esp + 0x38]
call fcn.0040d100
xor edi, edi
test eax, eax
mov dword [esp + 0x40], eax
jle 0x4083b8
lea esp, [esp]
lea eax, [ebx + 0xa8]
push eax
push edi
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x44]
call fcn.0040d720
mov esi, eax
call fcn.00404e70
add esp, 4
neg al
sbb al, al
inc al
lea ecx, [esp + 0x48]
mov byte [esp + 0x13], al
call fcn.0040d5f0
mov al, byte [esp + 0x13]
test al, al
jne 0x40844d
mov eax, dword [esp + 0x40]
inc edi
cmp edi, eax
jl 0x408370
mov ecx, ebx
call fcn.00406c60
lea edx, [ebx + 0xc0]
push edx
mov ecx, ebx
call fcn.00402960
mov ecx, ebx
call fcn.00404ab0
mov al, byte [ebx + 0x51]
test al, al
jne 0x4083e2
mov ecx, ebx
call fcn.00404d90
lea ecx, [esp + 0x38]
call fcn.0040d5f0
lea ecx, [esp + 0x3c]
call fcn.0040d5f0
lea ecx, [esp + 0x24]
call fcn.0040d5f0
lea ecx, [esp + 0x34]
call fcn.0040d5f0
lea ecx, [esp + 0x20]
call fcn.0040d5f0
lea ecx, [esp + 0x28]
call fcn.0040d5f0
lea ecx, [esp + 0x2c]
call fcn.0040d5f0
lea ecx, [esp + 0x30]
call fcn.0040d5f0
lea ecx, [esp + 0x1c]
call fcn.0040d5f0
lea ecx, [esp + 0x14]
call fcn.0040d5f0
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea ecx, [esp + 0x18]
jmp 0x40845a
lea ecx, [esp + 0x38]
call fcn.0040d5f0
lea ecx, [esp + 0x3c]
call fcn.0040d5f0
lea ecx, [esp + 0x24]
call fcn.0040d5f0
lea ecx, [esp + 0x34]
call fcn.0040d5f0
lea ecx, [esp + 0x20]
call fcn.0040d5f0
lea ecx, [esp + 0x28]
call fcn.0040d5f0
lea ecx, [esp + 0x2c]
call fcn.0040d5f0
lea ecx, [esp + 0x30]
call fcn.0040d5f0
lea ecx, [esp + 0x1c]
call fcn.0040d5f0
lea ecx, [esp + 0x14]
call fcn.0040d5f0
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8