Function at 0x402a50
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
lea esi, [edi*8]
test esi, esi
jne 0x402a6c
mov dword [ebp - 8], esi
jmp 0x402ab3
push esi
call dword [sym.imp.MSVCR100.dll_malloc]
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x402aa4
push str._Out_of_memory._Please_run_a_smaller_problem_n
call dword [sym.imp.MSVCR100.dll_printf]
add esp, 4
call fcn.00404c60
inc dword [0x437d8c]
je 0x402a9c
call fcn.004048c0
push 3
call dword [sym.imp.MSVCR100.dll_exit]
push esi
push 0
push ebx
call sub.MSVCR100.dll_memset
add esp, 0xc
mov dword [ebp - 8], ebx
mov eax, dword [ebp + 0x14]
xor esi, esi
test edi, edi
jle 0x402b34
mov ecx, dword [ebp + 0xc]
xor edi, edi
mov dword [ebp - 0xc], ecx
xor ebx, ebx
test esi, esi
js 0x402b20
lea edx, [esi + 1]
cmp edx, 4
jl 0x402b00
mov ecx, dword [ebp - 0xc]
shr edx, 2
lea ebx, [edx*4]
nop
fld qword [ecx]
add eax, 0x20
fstp qword [eax - 0x20]
add ecx, 0x20
dec edx
fld qword [ecx - 0x18]
fstp qword [eax - 0x18]
fld qword [ecx - 0x10]
fstp qword [eax - 0x10]
fld qword [ecx - 8]
fstp qword [eax - 8]
jne 0x402ae0
cmp ebx, esi
jg 0x402b20
mov ecx, dword [ebp + 0xc]
lea edx, [edi + ebx]
lea edx, [ecx + edx*8]
mov ecx, esi
sub ecx, ebx
inc ecx
fld qword [edx]
add eax, 8
fstp qword [eax - 8]
add edx, 8
dec ecx
jne 0x402b12
mov ecx, dword [ebp + 0x18]
add edi, ecx
add ecx, ecx
add ecx, ecx
add ecx, ecx
add dword [ebp - 0xc], ecx
inc esi
cmp esi, dword [ebp + 8]
jl 0x402ac4
mov edx, dword [ebp + 0x14]
fld qword [edx]
fst qword [ebp - 0x30]
fldz
fst qword [ebp - 0x40]
fst qword [ebp - 0x48]
fld st(1)
fld st(1)
fucompp
fnstsw ax
test ah, 0x44
jnp 0x402e1c
fcom st(1)
fnstsw ax
fld1
test ah, 5
jp 0x402b78
fstp st(1)
fstp st(0)
call sub.MSVCR100.dll__CIlog
fstp qword [ebp - 0x40]
fldz
fst qword [ebp - 0x48]
fld qword [ebp - 0x30]
fld1
jmp 0x402b81
fst qword [ebp - 0x48]
fxch st(1)
fxch st(2)
fxch st(1)
cmp dword [ebp + 8], 0
fld st(0)
fdiv st(2)
mov eax, dword [ebp + 0x14]
fstp qword [eax]
jle 0x402e18
mov edi, 1
xor eax, eax
mov dword [ebp - 0x1c], edi
cmp dword [ebp + 8], edi
jle 0x402e18
jmp 0x402bb0
mov eax, dword [ebp - 0x24]
fxch st(1)
fxch st(2)
lea ecx, [eax + edi + 1]
mov edx, eax
mov eax, dword [ebp + 0x14]
fld qword [eax + ecx*8]
lea esi, [edi - 1]
mov dword [ebp - 0x24], ecx
fst qword [ebp - 0x38]
mov ecx, dword [ebp - 8]
xor ebx, ebx
mov dword [ebp - 0x20], edx
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x2c], ecx
test esi, esi
js 0x402c95
lea ecx, [eax + edx*8]
lea edx, [ecx + 8]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0xc], ecx
jmp 0x402bf0
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
fld st(3)
add dword [ebp - 0xc], 8
xor edx, edx
lea eax, [eax + ecx*8 + 8]
mov ecx, dword [ebp - 0x34]
cmp ebx, 4
jl 0x402c3c
lea esi, [ebx - 4]
shr esi, 2
inc esi
lea edx, [esi*4]
fld qword [eax]
add eax, 0x20
fmul qword [ecx]
add ecx, 0x20
dec esi
faddp st(1)
fld qword [ecx - 0x18]
fmul qword [eax - 0x18]
faddp st(1)
fld qword [ecx - 0x10]
fmul qword [eax - 0x10]
faddp st(1)
fld qword [ecx - 8]
fmul qword [eax - 8]
faddp st(1)
jne 0x402c15
cmp edx, ebx
jge 0x402c55
mov esi, ebx
sub esi, edx
add edx, esi
fld qword [eax]
add eax, 8
fmul qword [ecx]
add ecx, 8
dec esi
faddp st(1)
jne 0x402c46
fld qword [ecx]
inc edx
fmul qword [eax]
add ecx, 8
lea eax, [eax + edx*8]
faddp st(1)
cmp edx, edi
jl 0x402c55
mov eax, dword [ebp - 0x2c]
fld st(0)
mov edx, dword [ebp - 0xc]
fchs
fstp qword [eax]
add eax, 8
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 4]
fmul qword [edx]
lea ecx, [eax + ebx + 1]
inc ebx
lea esi, [edi - 1]
fsubp st(1)
mov dword [ebp - 4], ecx
cmp ebx, esi
jle 0x402bed
fst qword [ebp - 0x38]
fld st(2)
fst qword [ebp - 0x18]
fld st(1)
fmulp st(4)
fxch st(3)
fst qword [ebp - 0x30]
fld st(1)
fld st(5)
fucompp
fnstsw ax
test ah, 0x44
jnp 0x402e14
fxch st(1)
fcom st(4)
fnstsw ax
test ah, 0x41
jne 0x402ce1
fstp st(3)
fstp st(0)
fstp st(2)
fstp st(1)
call sub.MSVCR100.dll__CIlog
fadd qword [ebp - 0x40]
fstp qword [ebp - 0x40]
fld qword [ebp - 0x18]
fld qword [ebp - 0x38]
fld qword [ebp - 0x30]
fldz
fld1
jmp 0x402cf4
fxch st(2)
fst qword [ebp - 0x48]
fxch st(3)
fxch st(4)
fxch st(2)
fxch st(3)
fxch st(1)
fxch st(2)
fxch st(1)
fld st(2)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x402d54
fld st(4)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jnp 0x402d54
fstp st(2)
fxch st(3)
fst qword [ebp - 0x30]
fxch st(1)
fxch st(3)
fld st(3)
mov eax, dword [ebp - 0x24]
fdiv st(3)
mov edx, dword [ebp + 0x14]
xor ebx, ebx
fstp qword [edx + eax*8]
or eax, 0xffffffff
test esi, esi
js 0x402e01
mov ecx, dword [ebp - 0x20]
lea ecx, [edx + ecx*8]
lea edi, [esi + 1]
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
mov edi, 0x18
sub edi, ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x34], edi
jmp 0x402d61
fstp st(4)
jmp 0x402d19
mov eax, dword [ebp - 4]
mov edx, dword [ebp + 0x14]
mov ecx, dword [ebp - 0xc]
fld qword [ecx]
add dword [ebp - 0x10], 8
fdiv st(3)
mov edi, dword [ebp - 0x10]
lea eax, [eax + ebx + 1]
mov dword [ebp - 4], eax
lea eax, [edx + eax*8]
fst qword [edi]
mov edi, ebx
cmp ebx, esi
jg 0x402dec
cmp dword [ebp - 0x14], 4
jl 0x402dd0
mov edx, dword [ebp - 0x34]
add edx, dword [ebp - 0xc]
sub esi, ebx
sub esi, 3
shr esi, 2
inc esi
lea edi, [ebx + esi*4]
fld qword [ecx]
add ecx, 0x20
fmul st(1)
fadd qword [eax]
fstp qword [eax]
lea eax, [eax + edx - 0x10]
fld qword [ecx - 0x18]
fmul st(1)
fadd qword [eax]
fstp qword [eax]
lea eax, [eax + edx - 8]
fld qword [ecx - 0x10]
fmul st(1)
fadd qword [eax]
fstp qword [eax]
add eax, edx
fld qword [ecx - 8]
fmul st(1)
fadd qword [eax]
fstp qword [eax]
lea eax, [eax + edx + 8]
add edx, 0x20
dec esi
jne 0x402d96
mov esi, dword [ebp - 0x1c]
dec esi
cmp edi, esi
jg 0x402dec
fld qword [ecx]
add ecx, 8
fmul st(1)
fadd qword [eax]
fstp qword [eax]
lea eax, [eax + edi*8 + 8]
inc edi
cmp edi, esi
jle 0x402dd8
add dword [ebp - 0xc], 8
fstp st(0)
dec dword [ebp - 0x14]
inc ebx
cmp ebx, esi
jle 0x402d58
mov edi, dword [ebp - 0x1c]
inc edi
fstp st(2)
mov dword [ebp - 0x1c], edi
cmp edi, dword [ebp + 8]
jl 0x402ba9
fstp st(2)
jmp 0x402e1c
fstp st(3)
fstp st(0)
fstp st(0)
fxch st(1)
mov eax, dword [ebp - 8]
test eax, eax
je 0x402e36
fstp st(1)
push eax
fstp st(0)
call dword [sym.imp.MSVCR100.dll_free]
fld qword [ebp - 0x30]
add esp, 4
fldz
mov eax, dword [ebp + 0x14]
xor ebx, ebx
mov dword [ebp - 8], ebx
cmp dword [ebp + 8], ebx
jle 0x402f6e
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp + 0x1c]
lea edx, [ecx + esi*8]
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x2c], ecx
xor edi, edi
mov dword [ebp - 0xc], edi
test ebx, ebx
js 0x402f49
lea edx, [ebx + 1]
mov dword [ebp - 0x34], edx
cmp edx, 4
jl 0x402f04
mov edi, dword [ebp - 4]
mov edx, dword [ebp - 0x2c]
lea ebx, [ebx + esi*2]
add ebx, esi
mov dword [ebp - 0x1c], edi
mov edi, dword [ebp + 0x10]
lea ebx, [edi + ebx*8]
mov dword [ebp - 0x10], ebx
mov ebx, dword [ebp - 8]
lea ebx, [ebx + esi*2]
lea edi, [edi + ebx*8]
mov ebx, dword [ebp - 0x34]
shr ebx, 2
mov dword [ebp - 0x34], ebx
mov ecx, esi
add ebx, ebx
shl ecx, 5
add ebx, ebx
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0xc], ebx
fld qword [eax]
mov ebx, dword [ebp - 0x1c]
fstp qword [edx]
add dword [ebp - 0x1c], ecx
fld qword [eax]
add eax, 0x20
fstp qword [ebx]
mov ebx, dword [ebp - 0x14]
fld qword [eax - 0x18]
add dword [ebp - 0x14], ecx
fstp qword [edx + 8]
add edx, 0x20
fld qword [eax - 0x18]
fstp qword [edi]
add edi, ecx
fld qword [eax - 0x10]
fstp qword [edx - 0x10]
fld qword [eax - 0x10]
fstp qword [ebx]
mov ebx, dword [ebp - 0x10]
fld qword [eax - 8]
add dword [ebp - 0x10], ecx
dec dword [ebp - 0x34]
fstp qword [edx - 8]
fld qword [eax - 8]
fstp qword [ebx]
jne 0x402eb3
mov ebx, dword [ebp - 8]
mov ecx, dword [ebp + 0x10]
mov edi, dword [ebp - 0xc]
cmp edi, ebx
jg 0x402f49
mov edx, dword [ebp - 0x24]
add edx, edi
imul edi, esi
lea edx, [ecx + edx*8]
add edi, ebx
lea ecx, [ecx + edi*8]
mov dword [ebp - 0x34], ecx
mov edi, ecx
mov ecx, ebx
sub ecx, dword [ebp - 0xc]
inc ecx
jmp 0x402f28
mov edx, dword [ebp - 0x34]
fld qword [eax]
add edx, 8
fstp qword [edx - 8]
mov dword [ebp - 0x34], edx
fld qword [eax]
lea edx, [esi*8]
fstp qword [edi]
add eax, 8
add edi, edx
dec ecx
jne 0x402f25
mov ecx, dword [ebp + 0x10]
add dword [ebp - 0x24], esi
mov edx, 8
add dword [ebp - 4], edx
add dword [ebp - 0x20], edx
inc ebx
lea edx, [esi*8]
add dword [ebp - 0x2c], edx
mov dword [ebp - 8], ebx
cmp ebx, dword [ebp + 8]
jl 0x402e5c
mov eax, dword [ebp + 0x14]
fxch st(1)
fst qword [eax]
fld qword [ebp - 0x40]
fstp qword [eax + 8]
fld qword [ebp - 0x48]
fstp qword [eax + 0x10]
fld st(0)
fld st(2)
fucompp
fnstsw ax
test ah, 0x44
jp 0x402f9e
fstp st(0)
mov eax, 1
fstp st(0)
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
fcompp
fnstsw ax
test ah, 5
jp 0x402fb3
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret