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

Disassembly:
sub esp, 0xc8
fld qword [esp + 0xf0]
push ebx
push ebp
push esi
xor ebp, ebp
push edi
mov esi, eax
mov dword [esp + 0x4c], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x20], ebp
call sub.MSVCR90.dll__CIlog
fstp qword [esp + 0x58]
fld qword [0x464808]
call sub.MSVCR90.dll__CIlog
fdivr qword [esp + 0x58]
fchs
fld1
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x40104e
fstp st(1)
jmp 0x401050
fstp st(0)
call fcn.00431b00
mov ebx, eax
cmp ebx, 0x1e
mov dword [esp + 0x28], ebx
jle 0x40106c
mov dword [esp + 0x28], 0x1e
mov ebx, dword [esp + 0x28]
fld qword [0x464800]
sub esp, 0x18
fldz
mov eax, esp
fld st(0)
lea edi, [esp + 0xd8]
fxch st(2)
fstp qword [eax]
fxch st(1)
fstp qword [eax + 8]
fstp qword [eax + 0x10]
call fcn.00402740
fld qword [eax]
mov edi, dword [esi]
fld qword [eax + 8]
add esp, 0x18
fld qword [eax + 0x10]
mov dword [esp + 0x10], edi
fxch st(2)
fstp qword [esp + 0x78]
fstp qword [esp + 0x80]
fstp qword [esp + 0x88]
cmp edi, 1
jne 0x401169
cmp dword [esp + 0xdc], 2
jne 0x401122
mov esi, dword [esp + 0xf4]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x5c]
push ecx
mov ecx, dword [esp + 0xe8]
lea edx, [esp + 0x44]
push edx
push esi
lea eax, [esp + 0xb8]
push eax
push ecx
call fcn.0042e3c0
add esp, 0x18
call fcn.00402890
fld qword [0x4647f8]
mov edx, dword [esp + 0xf8]
mov eax, dword [esp + 0xfc]
fst qword [edx]
fstp qword [eax]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret
mov ecx, dword [esp + 0xe8]
cmp ecx, ebp
jle 0x401140
mov edi, dword [esp + 0xf4]
and ecx, 0x1fffffff
add ecx, ecx
xor eax, eax
rep stosd dword es:[edi], eax
fild dword [esp + 0xe8]
call sub.MSVCR90.dll__CIsqrt
mov ecx, dword [esp + 0xf8]
mov edx, dword [esp + 0xfc]
fst qword [ecx]
fstp qword [edx]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret
cmp edi, 2
jne 0x40125f
mov esi, dword [esp + 0xf4]
cmp dword [esp + 0xdc], edi
jne 0x4011ff
mov edi, dword [esp + 0xe0]
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x5c]
push ecx
lea edx, [esp + 0x44]
push edx
push esi
lea eax, [esp + 0xb8]
push eax
push edi
call fcn.0042e3c0
call fcn.00402890
mov ecx, dword [esp + 0x100]
lea edx, [esp + 0x44]
push edx
lea esi, [esi + ecx*8]
lea eax, [esp + 0x74]
push eax
lea ecx, [esp + 0x5c]
push ecx
push esi
lea edx, [esp + 0xa0]
push edx
push edi
call fcn.0042e3c0
add esp, 0x30
call fcn.00402890
fld qword [0x4647f8]
mov eax, dword [esp + 0xf8]
mov ecx, dword [esp + 0xfc]
fst qword [eax]
fstp qword [ecx]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret
mov edx, dword [esp + 0xe8]
cmp edx, ebp
jle 0x40122d
mov ecx, edx
and ecx, 0x1fffffff
add ecx, ecx
xor eax, eax
cmp edx, ebp
mov edi, esi
rep stosd dword es:[edi], eax
jle 0x40122d
mov ecx, edx
and ecx, 0x1fffffff
lea edi, [esi + edx*8]
add ecx, ecx
rep stosd dword es:[edi], eax
fld qword [0x4647d8]
fstp qword [esi + edx*8]
fild dword [esp + 0xe8]
call sub.MSVCR90.dll__CIsqrt
mov edx, dword [esp + 0xf8]
mov eax, dword [esp + 0xfc]
fst qword [edx]
fstp qword [eax]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret
cmp dword [esi + 0x10], 1
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x18]
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], edx
jne 0x40127e
mov esi, dword [esi + 0x1c]
cmp esi, ebp
je 0x40127e
mov dword [esp + 0x4c], esi
fld qword [0x4647f0]
mov eax, dword [esp + 0xf0]
fst qword [esp + 0xa0]
push eax
fst qword [esp + 0x9c]
fstp qword [esp + 0x94]
call dword [sym.imp.MSVCR90.dll_srand]
mov esi, dword [esp + 0xec]
imul edi, esi
add esp, 4
test edi, edi
jle 0x4012d3
call fcn.00426e60
fmul qword [str.ffffff]
mov ecx, dword [esp + 0xf4]
inc ebp
cmp ebp, edi
fstp qword [ecx + ebp*8 - 8]
jl 0x4012b8
lea edx, [edi*8]
push edx
call sub.gvc.dll_gmalloc
add esp, 4
cmp dword [esp + 0xe4], 0
mov dword [esp + 0x1c], eax
je 0x401309
mov eax, dword [esp + 0x10]
lea ecx, [eax*8]
push ecx
call sub.gvc.dll_gmalloc
add esp, 4
mov dword [esp + 0x20], eax
cmp dword [esp + 0xec], 0
fldz
fld st(0)
fst qword [esp + 0x50]
fld qword [0x4647e0]
fld st(0)
fxch st(3)
fst qword [esp + 0x40]
jle 0x4015fc
fld qword [esp + 0x30]
jmp 0x40134b
fld qword [esp + 0x50]
fld qword [esp + 0x40]
fld qword [esp + 0x70]
fld qword [esp + 0x68]
fxch st(4)
fxch st(1)
fxch st(2)
fxch st(1)
inc dword [esp + 0x18]
fxch st(3)
fcom st(4)
fnstsw ax
test ah, 0x41
je 0x401430
fucom st(4)
fnstsw ax
fstp st(4)
test ah, 0x44
jp 0x401607
fcom st(1)
fnstsw ax
fstp st(1)
test ah, 0x41
je 0x401434
fstp st(1)
fstp st(0)
cmp dword [esp + 0xdc], 2
fstp st(0)
jne 0x4013fd
cmp dword [esp + 0x10], 0
jle 0x4013fd
mov ebp, dword [esp + 0x10]
lea ebx, [esi*8]
mov esi, dword [esp + 0xf4]
add esi, 0x10
jmp 0x4013b0
fld qword [esi - 0x10]
sub esp, 0x18
fld qword [esi - 8]
mov eax, esp
fld qword [esi]
lea edi, [esp + 0xd8]
fxch st(2)
fstp qword [eax]
fstp qword [eax + 8]
fstp qword [eax + 0x10]
call fcn.004028e0
fld qword [eax]
add esp, 0x18
fld qword [eax + 8]
fld qword [eax + 0x10]
fld qword [0x4646d8]
fdiv st(3), st(0)
fxch st(3)
fstp qword [esi - 0x10]
fxch st(1)
fdiv st(2)
fstp qword [esi - 8]
fdivrp st(1)
fstp qword [esi]
add esi, ebx
sub ebp, 1
jne 0x4013b0
mov ecx, dword [esp + 0xf8]
fld qword [esp + 0x50]
mov eax, dword [esp + 0x1c]
fstp qword [ecx]
mov edx, dword [esp + 0xfc]
fld qword [esp + 0x40]
push eax
fstp qword [edx]
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc8
ret
fstp st(4)
fstp st(1)
fxch st(2)
xor ecx, ecx
cmp dword [esp + 0x10], ecx
fst qword [esp + 0x68]
fxch st(2)
mov dword [esp + 0x14], ecx
fst qword [esp + 0x70]
jle 0x4015aa
fstp st(0)
fstp st(1)
jmp 0x40145a
fstp st(0)
fstp st(0)
mov edx, dword [esp + 0x60]
mov edi, dword [edx + ecx*4]
lea edx, [edx + ecx*4 + 4]
xor ebp, ebp
cmp edi, dword [edx]
mov dword [esp + 0x24], edx
jge 0x4014d8
mov ebx, dword [esp + 0x1c]
add esi, esi
add esi, esi
add esi, esi
mov eax, dword [esp + 0x64]
mov eax, dword [eax + edi*4]
cmp eax, ecx
je 0x4014c8
imul eax, dword [esp + 0xe8]
fstp st(0)
mov ecx, dword [esp + 0xf4]
push esi
lea edx, [ecx + eax*8]
push edx
push ebx
call sub.MSVCR90.dll_memcpy
mov eax, dword [esp + 0x2c]
add esp, 0xc
test eax, eax
je 0x4014b9
mov ecx, dword [esp + 0x4c]
test ecx, ecx
je 0x4014b9
fld qword [ecx + edi*8]
fstp qword [eax + ebp*8]
fld qword [esp + 0x30]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x24]
inc ebp
add ebx, esi
inc edi
cmp edi, dword [edx]
jl 0x401479
mov esi, dword [esp + 0xe8]
mov ebx, dword [esp + 0x28]
mov edx, dword [esp + 0xf4]
mov eax, ecx
imul eax, esi
lea eax, [edx + eax*8]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0xdc]
cmp eax, 2
jne 0x401522
mov eax, dword [esp + 0xe0]
fstp st(0)
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x34]
push edx
mov edx, dword [esp + 0x28]
push ebx
push eax
push ecx
push edx
push esi
push ebp
call fcn.00402160
add esp, 0x20
jmp 0x401560
test eax, eax
je 0x40152b
cmp eax, 1
jne 0x401568
sub esp, 8
fstp st(0)
fld qword [0x4647f0]
lea eax, [esp + 0x2c]
fstp qword [esp]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x3c]
push ecx
mov ecx, dword [esp + 0x30]
push ebx
lea edx, [esp + 0xa4]
push edx
push eax
push ecx
push esi
push ebp
call fcn.00401c80
add esp, 0x28
mov ecx, dword [esp + 0x14]
fld qword [esp + 0x30]
test ecx, ecx
jne 0x401576
fld st(0)
fst qword [esp + 0x50]
fld st(1)
jmp 0x401591
fld qword [esp + 0x50]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x40158b
fstp st(0)
fld st(0)
fst qword [esp + 0x50]
fld st(1)
fadd qword [esp + 0x40]
inc ecx
fst qword [esp + 0x40]
cmp ecx, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
jl 0x401456
fxch st(1)
fxch st(2)
fxch st(1)
cmp byte [0x431a44], 0
je 0x4015e2
mov edx, dword [esp + 0x18]
fstp st(1)
sub esp, 0x10
fstp qword [esp + 8]
fstp qword [esp]
push edx
push str.iter_______d______color_diff___f__color_diff_sum___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 + 0x4c]
add esp, 0x1c
jmp 0x4015e6
fstp st(0)
fstp st(1)
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0xec]
jl 0x401333
jmp 0x401380
fstp st(0)
fstp st(1)
fstp st(1)
jmp 0x401380
fstp st(2)
fstp st(1)
fstp st(1)
jmp 0x401380