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

Disassembly:
mov eax, dword [esp + 0x14]
inc dword [eax]
mov eax, dword [eax]
sub esp, 0x6c
cmp byte [0x41b78c], 1
push ebx
push ebp
push esi
push edi
jbe 0x405c61
push eax
push str.agglomerative_ink_bundling_internal__recurse_level__________d_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
mov eax, dword [esp + 0xa4]
mov edi, dword [sym.imp.MSVCR90.dll_clock]
mov dword [eax], 0
call edi
fld qword [esp + 0xb0]
mov ebx, dword [esp + 0x88]
mov esi, dword [esp + 0x84]
sub esp, 0x10
fstp qword [esp + 8]
mov ebp, eax
fld qword [esp + 0xb8]
fstp qword [esp]
push ebx
call fcn.00405bb0
add esp, 0x14
cmp byte [0x41b78c], 1
mov dword [esp + 0x40], eax
jbe 0x405ce4
call edi
sub eax, ebp
mov dword [esp + 0x3c], eax
fild dword [esp + 0x3c]
sub esp, 8
fdiv qword [0x41dde8]
fstp qword [esp]
push str.CPU_for_agglomerative_bundling__f_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
mov esi, dword [esp + 0x40]
mov eax, dword [esi + 0x18]
fld qword [esi + 0x28]
fst qword [esp + 0x50]
test eax, eax
je 0x405cff
mov esi, eax
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x405cf6
fld qword [esi + 0x28]
mov edi, dword [esp + 0x9c]
mov ebp, dword [esp + 0xa0]
fst qword [esp + 0x48]
fldz
fcomp qword [edi]
fnstsw ax
test ah, 0x41
jne 0x405d5b
cmp byte [0x41b78c], 1
fxch st(1)
fst qword [ebp]
fst qword [edi]
jbe 0x405d59
sub esp, 8
fstp st(1)
fstp qword [esp]
push str.initial_total_ink___f_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
fld qword [esp + 0x58]
fld qword [esp + 0x60]
add esp, 0x10
jmp 0x405d5d
fxch st(1)
fxch st(1)
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x405d6e
fld st(0)
fsub st(2)
fsubr qword [edi]
fstp qword [edi]
cmp byte [0x41b78c], 1
jbe 0x405dc5
fld st(0)
mov ecx, dword [esi + 4]
fsub st(2)
mov edx, dword [esp + 0x40]
mov eax, dword [edx + 4]
sub esp, 0x10
fdiv qword [ebp]
fstp qword [esp + 8]
fld qword [edi]
fstp qword [esp]
fxch st(1)
push ecx
push eax
sub esp, 0x10
fstp qword [esp + 8]
fstp qword [esp]
push str.ink:__f___f__edges:__d___d__current_ink___f__percentage_gain_over_original___f_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
fld qword [esp + 0x78]
fld qword [esp + 0x80]
add esp, 0x30
fsubrp st(1)
fdiv qword [ebp]
fcomp qword [0x41de08]
fnstsw ax
test ah, 5
jnp 0x406360
mov ecx, dword [esp + 0x90]
mov edx, dword [ecx]
cmp edx, dword [esp + 0x94]
jg 0x406360
mov esi, dword [esi + 0x10]
mov edi, dword [esi]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x18]
lea edx, [edi*4]
push edx
mov dword [esp + 0x2c], esi
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x40], edi
call sub.gvc.dll_gmalloc
add esp, 4
shl edi, 5
push edi
mov dword [esp + 0x30], eax
call sub.gvc.dll_gmalloc
mov edi, dword [esp + 0x84]
add esp, 4
cmp dword [esi], 0
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], 0
jle 0x405f7b
mov ebp, dword [esp + 0x30]
mov esi, eax
mov eax, dword [esp + 0x2c]
add esi, 0x10
sub eax, ebp
mov dword [esp + 0x38], ebp
mov dword [esp + 0x48], eax
nop
mov ecx, dword [ebp]
fldz
mov eax, dword [esp + 0x24]
fst qword [esp + 0x18]
lea edx, [eax + ecx*4]
mov eax, dword [ebp + 4]
cmp ecx, eax
mov dword [esp + 0x44], edx
jge 0x405ee8
mov edx, eax
sub edx, ecx
cmp edx, 4
jl 0x405ed4
lea edx, [ebx + ecx*4 + 8]
mov dword [esp + 0x18], edx
mov edx, eax
sub edx, ecx
sub edx, 4
shr edx, 2
inc edx
lea ecx, [ecx + edx*4]
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp - 8]
fadd qword [ebp]
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp - 4]
fadd qword [ebp]
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp]
fadd qword [ebp]
mov ebp, dword [esp + 0x18]
mov ebp, dword [ebp + 4]
add dword [esp + 0x18], 0x10
sub edx, 1
fadd qword [ebp]
jne 0x405e9a
mov ebp, dword [esp + 0x38]
fst qword [esp + 0x18]
cmp ecx, eax
jge 0x405ee8
mov edx, dword [ebx + ecx*4]
fadd qword [edx]
inc ecx
cmp ecx, eax
jl 0x405ed8
fstp qword [esp + 0x18]
jmp 0x405eea
fstp st(0)
fld qword [esp + 0xb0]
sub eax, dword [ebp]
sub esp, 0x10
fstp qword [esp + 8]
lea ecx, [esp + 0x78]
fld qword [esp + 0xb8]
lea edx, [esp + 0x68]
fstp qword [esp]
push ecx
push edx
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x68]
push ecx
push edx
push eax
push ebx
call fcn.00404bd0
fstp st(0)
fld qword [esp + 0x80]
lea eax, [esi - 0x10]
fstp qword [eax]
add esp, 0x20
fld qword [esp + 0x68]
fstp qword [esi - 8]
fld qword [esp + 0x70]
fstp qword [esi]
fld qword [esp + 0x78]
fstp qword [esi + 8]
fld qword [esp + 0x20]
fstp qword [esp]
push eax
call fcn.00402440
mov ecx, dword [esp + 0x54]
mov edx, dword [esp + 0x34]
mov dword [ecx + ebp], eax
mov eax, dword [esp + 0x20]
inc eax
add ebp, 4
add esp, 0xc
add esi, 0x20
cmp eax, dword [edx]
mov dword [esp + 0x14], eax
mov dword [esp + 0x38], ebp
jl 0x405e60
mov ebx, dword [esp + 0x8c]
mov eax, dword [esp + 0x3c]
cmp ebx, eax
mov ecx, ebx
jl 0x405f8e
mov ecx, eax
fldz
mov ebp, dword [esp + 0x34]
sub esp, 8
fstp qword [esp]
push ebp
push ecx
call fcn.004044f0
fld qword [esp + 0xc0]
mov ecx, dword [esp + 0xb0]
fstp qword [esp + 8]
fld qword [esp + 0xb8]
mov edx, dword [esp + 0xac]
fstp qword [esp]
mov esi, eax
mov eax, dword [esp + 0xb4]
push eax
mov eax, dword [esp + 0xac]
push ecx
mov ecx, dword [esp + 0xac]
push edx
mov edx, dword [esp + 0xac]
push eax
mov eax, dword [esp + 0x4c]
push ecx
push edx
push ebx
push eax
push esi
push edi
call fcn.00405c30
push esi
call fcn.00408580
add esp, 0x3c
push ebp
call dword [sym.imp.MSVCR90.dll_free]
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp dword [ecx], 0
mov dword [esp + 0x14], 0
jle 0x406323
mov edx, dword [esp + 0x30]
add edx, 4
mov dword [esp + 0xa0], edx
jmp 0x406030
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
mov ebx, dword [eax + ecx*4]
mov eax, dword [ebx + 8]
add eax, 2
mov dword [esp + 0xa4], eax
mov eax, dword [esp + 0xa0]
mov ecx, dword [eax - 4]
cmp ecx, dword [eax]
mov dword [esp + 0x38], ecx
jge 0x406306
mov edi, edi
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
mov eax, dword [edx + eax*4]
mov ecx, dword [esp + 0x88]
mov esi, dword [ecx + eax*4]
mov ebp, dword [esp + 0xa4]
cmp ebp, dword [esi + 8]
mov dword [esp + 0x90], eax
jle 0x4060ec
mov edx, dword [esi + 0x10]
mov eax, dword [esi + 0x20]
imul edx, ebp
add edx, edx
add edx, edx
add edx, edx
push edx
push eax
call sub.gvc.dll_grealloc
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x24]
add esp, 8
lea ecx, [ebp*8 - 8]
push ecx
test eax, eax
jne 0x4060d6
push eax
call sub.gvc.dll_grealloc
mov dword [esi + 0x24], eax
xor eax, eax
add esp, 8
cmp dword [esi + 8], eax
jle 0x4060e2
mov edx, dword [esi + 0x24]
fld qword [esi]
fstp qword [edx + eax*8]
inc eax
cmp eax, dword [esi + 8]
jl 0x4060c6
jmp 0x4060e2
push eax
call sub.gvc.dll_grealloc
add esp, 8
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x90]
mov dword [esi + 0xc], ebp
cmp edi, 4
mov edx, dword [esp + 0x88]
mov dword [edx + eax*4], esi
mov dword [esp + 0x90], 0
jl 0x406168
mov eax, dword [esp + 0xa4]
dec eax
imul eax, edi
add eax, eax
add eax, eax
lea ebp, [edi - 4]
shr ebp, 2
add eax, eax
inc ebp
lea edx, [ebp*4]
lea ecx, [edi*8]
mov dword [esp + 0x90], edx
mov edx, dword [esi + 0x20]
fld qword [edx + ecx]
add ecx, 0x20
fstp qword [edx + eax]
mov edx, dword [esi + 0x20]
fld qword [edx + ecx - 0x18]
add eax, 0x20
sub ebp, 1
fstp qword [edx + eax - 0x18]
mov edx, dword [esi + 0x20]
fld qword [edx + ecx - 0x10]
fstp qword [edx + eax - 0x10]
mov edx, dword [esi + 0x20]
fld qword [edx + ecx - 8]
fstp qword [edx + eax - 8]
jne 0x406133
mov edx, dword [esp + 0x90]
cmp edx, edi
jge 0x4061a7
mov eax, dword [esp + 0xa4]
dec eax
imul eax, edi
add eax, edx
add eax, eax
lea ecx, [edx + edi]
add ecx, ecx
add eax, eax
add ecx, ecx
mov ebp, edi
add eax, eax
add ecx, ecx
sub ebp, edx
mov edx, dword [esi + 0x20]
fld qword [edx + ecx]
add ecx, 8
fstp qword [edx + eax]
add eax, 8
sub ebp, 1
jne 0x406193
xor ecx, ecx
cmp dword [ebx + 8], ecx
mov dword [esp + 0x9c], ecx
jle 0x4062db
xor eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], eax
lea eax, [edi*8]
mov dword [esp + 0x34], eax
mov edi, edi
xor edx, edx
cmp edi, 4
jl 0x40624a
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
lea edx, [edi - 4]
shr edx, 2
inc edx
lea edi, [edx*4]
mov dword [esp + 0x90], edi
mov edi, dword [ebx + 0x20]
fld qword [eax + edi]
mov ebp, dword [esi + 0x20]
fstp qword [ecx + ebp]
mov edi, dword [ebx + 0x20]
fld qword [edi + eax + 8]
mov ebp, dword [esi + 0x20]
fstp qword [ecx + ebp + 8]
mov edi, dword [ebx + 0x20]
fld qword [edi + eax + 0x10]
mov ebp, dword [esi + 0x20]
fstp qword [ecx + ebp + 0x10]
mov edi, dword [ebx + 0x20]
fld qword [edi + eax + 0x18]
mov ebp, dword [esi + 0x20]
fstp qword [ecx + ebp + 0x18]
add eax, 0x20
add ecx, 0x20
sub edx, 1
jne 0x4061f4
mov edx, dword [esp + 0x90]
mov ecx, dword [esp + 0x9c]
mov edi, dword [esp + 0x80]
cmp edx, edi
jge 0x406293
mov ecx, dword [esp + 0x18]
lea eax, [ecx + edx]
add eax, edi
add ecx, edx
add eax, eax
add ecx, ecx
add eax, eax
add ecx, ecx
mov ebp, edi
add eax, eax
add ecx, ecx
sub ebp, edx
mov dword [esp + 0x90], ebp
mov edx, dword [ebx + 0x20]
fld qword [ecx + edx]
mov ebp, dword [esi + 0x20]
fstp qword [eax + ebp]
add ecx, 8
add eax, 8
sub dword [esp + 0x90], 1
jne 0x406270
mov ecx, dword [esp + 0x9c]
mov eax, dword [ebx + 8]
dec eax
cmp ecx, eax
jge 0x4062b7
mov eax, dword [ebx + 0x24]
test eax, eax
je 0x4062ae
mov edx, dword [esi + 0x24]
fld qword [eax + ecx*8]
fstp qword [edx + ecx*8 + 8]
jmp 0x4062b7
mov eax, dword [esi + 0x24]
fld qword [ebx]
fstp qword [eax + ecx*8 + 8]
add dword [esp + 0x18], edi
lea eax, [edi*8]
add dword [esp + 0x30], eax
add dword [esp + 0x34], eax
inc ecx
cmp ecx, dword [ebx + 8]
mov dword [esp + 0x9c], ecx
jl 0x4061d0
mov eax, dword [esi + 0x24]
fld qword [eax]
mov ecx, dword [esp + 0xa4]
fstp qword [eax + ecx*8 - 0x10]
mov eax, dword [esp + 0x38]
mov dword [esi + 8], ecx
mov ecx, dword [esp + 0xa0]
inc eax
cmp eax, dword [ecx]
mov dword [esp + 0x38], eax
jl 0x406060
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x28]
add dword [esp + 0xa0], 4
inc eax
cmp eax, dword [edx]
mov dword [esp + 0x14], eax
jl 0x406030
xor esi, esi
cmp dword [esp + 0x3c], esi
jle 0x406556
mov ebp, dword [esp + 0x3c]
mov ebx, dword [sym.imp.MSVCR90.dll_free]
lea esp, [esp]
mov eax, dword [esp + 0x2c]
mov edi, dword [eax + esi*4]
mov ecx, dword [edi + 0x20]
push ecx
call ebx
add esp, 4
push edi
call ebx
inc esi
add esp, 4
cmp esi, ebp
jl 0x406340
jmp 0x406556
mov esi, dword [esi + 0x10]
mov dword [esp + 0x28], esi
test esi, esi
je 0x406556
cmp dword [esi], 0
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], 0
jle 0x406556
lea esi, [eax + 4]
mov dword [esp + 0x90], esi
jmp 0x4063a7
mov esi, dword [esp + 0x90]
fld qword [esp + 0xb0]
mov eax, dword [esi - 4]
sub esp, 0x10
fstp qword [esp + 8]
lea ecx, [esp + 0x78]
fld qword [esp + 0xb8]
lea edx, [esp + 0x68]
fstp qword [esp]
push ecx
push edx
mov edx, dword [esp + 0x3c]
lea ecx, [esp + 0x68]
push ecx
lea ecx, [edx + eax*4]
mov edx, dword [esi]
push ecx
sub edx, eax
push edx
push ebx
call fcn.00404bd0
fstp st(0)
mov eax, dword [esi]
fldz
mov esi, dword [esi - 4]
fst qword [esp + 0x70]
mov ecx, eax
sub ecx, esi
add esp, 0x28
cmp ecx, 1
jle 0x40652e
mov ebp, esi
cmp ebp, eax
jge 0x406509
mov eax, dword [esp + 0x80]
mov ecx, eax
shl ecx, 4
mov dword [esp + 0xa4], ecx
mov ecx, eax
lea eax, [eax + eax*2]
add eax, eax
shl ecx, 5
add eax, eax
add eax, eax
mov dword [esp + 0xa0], ecx
mov dword [esp + 0x9c], eax
lea ebx, [ebx]
mov edx, dword [esp + 0x24]
fstp st(0)
mov edi, dword [edx + ebp*4]
mov eax, dword [ebx + edi*4]
push eax
call fcn.004031b0
add esp, 4
push eax
mov dword [ebx + edi*4], eax
call fcn.004031b0
mov esi, eax
add esp, 4
mov dword [ebx + edi*4], esi
mov ecx, dword [esi + 0x24]
push 0x20
push ecx
call sub.gvc.dll_grealloc
fld qword [esp + 0x60]
mov edx, dword [esi + 0x20]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x88]
fstp qword [edx + eax*8]
mov ecx, dword [esi + 0x20]
fld qword [esp + 0x68]
inc ebp
fstp qword [ecx + eax*8 + 8]
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0xac]
fld qword [esp + 0x70]
fstp qword [eax + edx]
mov ecx, dword [esi + 0x20]
fld qword [esp + 0x78]
mov edx, dword [esp + 0xa4]
fstp qword [ecx + eax + 8]
mov eax, dword [esi + 0x20]
mov ecx, dword [esp + 0xa8]
fld qword [ecx + eax]
add esp, 8
fstp qword [edx + eax]
mov eax, dword [esi + 0x20]
fld qword [ecx + eax + 8]
fstp qword [edx + eax + 8]
mov dword [esi + 8], 4
mov edx, dword [esi + 0x24]
fld qword [esi]
fstp qword [edx]
mov eax, dword [esi + 0x24]
fld qword [esi]
mov edx, dword [esp + 0x90]
fstp qword [eax + 8]
mov ecx, dword [esi + 0x24]
fld qword [esi]
fstp qword [ecx + 0x10]
cmp ebp, dword [edx]
fld qword [esi]
fadd qword [esp + 0x48]
fst qword [esp + 0x48]
jl 0x406440
mov ecx, dword [esp + 0x90]
mov eax, dword [ecx - 4]
cmp eax, dword [ecx]
jge 0x406535
mov edx, dword [esp + 0x24]
mov esi, dword [edx + eax*4]
mov esi, dword [ebx + esi*4]
mov esi, dword [esi + 0x24]
inc eax
fst qword [esi + 8]
cmp eax, dword [ecx]
jl 0x40651b
jmp 0x406535
mov ecx, dword [esp + 0x90]
mov eax, dword [esp + 0x14]
fstp st(0)
add ecx, 4
inc eax
mov dword [esp + 0x90], ecx
mov ecx, dword [esp + 0x28]
cmp eax, dword [ecx]
mov dword [esp + 0x14], eax
jl 0x4063a0
mov esi, dword [esp + 0x40]
mov eax, dword [esi + 8]
test eax, eax
je 0x406575
cmp dword [esi], 0
jne 0x40656c
cmp dword [esi + 0x34], 0
je 0x406575
push eax
call fcn.00408580
add esp, 4
mov edx, dword [esi + 0xc]
push edx
call fcn.00408580
add esp, 4
cmp dword [esi], 1
jle 0x406592
mov eax, dword [esi + 0x10]
push eax
call fcn.00408580
add esp, 4
mov ecx, dword [esi + 0x14]
push ecx
call fcn.00408580
mov edx, dword [esi + 0x20]
mov edi, dword [sym.imp.MSVCR90.dll_free]
add esp, 4
push edx
call edi
mov eax, dword [esi + 0x18]
add esp, 4
push eax
call fcn.004053b0
add esp, 4
push esi
call edi
mov eax, dword [esp + 0x8c]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret